qtdeclarative somehow requires desktop OpenGL (link error)
I faced an error while rebuilding kwin:
/usr/lib/gcc/armv7-alpine-linux-musleabihf/8.3.0/../../../../armv7-alpine-linux-musleabihf/bin/ld: /usr/lib/libQt5Quick.so.5.12.3: undefined reference to `QOpenGLFunctions_1_0::versionProfile()@Qt_5'
/usr/lib/gcc/armv7-alpine-linux-musleabihf/8.3.0/../../../../armv7-alpine-linux-musleabihf/bin/ld: /usr/lib/libQt5Quick.so.5.12.3: undefined reference to `QOpenGLFunctions_3_2_Core::versionProfile()@Qt_5'
Steps to reproduce:
$ pmbootstrap -y zap -d -hc -p -m -o
$ pmbootstrap chroot -b armv7
...
/ # apk add qt5-qtdeclarative
WARNING: Ignoring /mnt/pmbootstrap-packages/armv7/APKINDEX.tar.gz: No such file or directory
(1/63) Installing libxau (1.0.9-r0)
...
(62/63) Installing qt5-qtbase-x11 (9999-r14)
(63/63) Installing qt5-qtdeclarative (5.12.3-r0)
Being in a chroot, perform a test and observe result:
/ # ldd /usr/lib/libQt5Quick.so.5.12.3
/usr/bin/ldd (0)
libQt5Qml.so.5 => /usr/lib/libQt5Qml.so.5 (0xff307000)
libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0xfef89000)
libQt5Network.so.5 => /usr/lib/libQt5Network.so.5 (0xfeeb7000)
libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0xfeaf2000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xfe9fb000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xfe9e3000)
libc.musl-armv7.so.1 => /usr/bin/ldd (0)
libGLESv2.so.2 => /usr/lib/libGLESv2.so.2 (0xfe9cb000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0xfe99c000)
libz.so.1 => /lib/libz.so.1 (0xfe97c000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0xfe90a000)
libssl.so.1.1 => /lib/libssl.so.1.1 (0xfe8ad000)
libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0xfe727000)
libicui18n.so.64 => /usr/lib/libicui18n.so.64 (0xfe55e000)
libicuuc.so.64 => /usr/lib/libicuuc.so.64 (0xfe431000)
libpcre2-16.so.0 => /usr/lib/libpcre2-16.so.0 (0xfe3c8000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xfe2f6000)
libglapi.so.0 => /usr/lib/libglapi.so.0 (0xfe2c0000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xfe23e000)
libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0xfe218000)
libicudata.so.64 => /usr/lib/libicudata.so.64 (0xfc7c6000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0xfc775000)
libintl.so.8 => /usr/lib/libintl.so.8 (0xfc75c000)
libbz2.so.1 => /usr/lib/libbz2.so.1 (0xfc742000)
Error relocating /usr/lib/libQt5Quick.so.5.12.3: _ZN20QOpenGLFunctions_1_014versionProfileEv: symbol not found
Error relocating /usr/lib/libQt5Quick.so.5.12.3: _ZN25QOpenGLFunctions_3_2_Core14versionProfileEv: symbol not found
Step 2, also in chroot:
# apk add binutils
# nm --demangle --dynamic --defined-only --extern-only /usr/lib/libQt5Gui.so.5.12.3 | grep -i qopenglfunctions
002e7e88 T QOpenGLFunctions::initializeOpenGLFunctions()
002e7dec T QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext*)
002e7998 T QOpenGLFunctions::QOpenGLFunctions()
002e7dec T QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext*)
002e7998 T QOpenGLFunctions::QOpenGLFunctions()
0030dbbc T QOpenGLFunctions_ES2::versionProfile()
0030db4c T QOpenGLFunctions_ES2::isContextCompatible(QOpenGLContext*)
0030dbc8 T QOpenGLFunctions_ES2::initializeOpenGLFunctions()
0030db28 T QOpenGLFunctions_ES2::QOpenGLFunctions_ES2()
0030db28 T QOpenGLFunctions_ES2::QOpenGLFunctions_ES2()
0030db14 T QOpenGLFunctions_ES2::~QOpenGLFunctions_ES2()
0030daf4 T QOpenGLFunctions_ES2::~QOpenGLFunctions_ES2()
0030daf4 T QOpenGLFunctions_ES2::~QOpenGLFunctions_ES2()
002e79a0 T QOpenGLFunctions::openGLFeatures() const
002e79c4 T QOpenGLFunctions::hasOpenGLFeature(QOpenGLFunctions::OpenGLFeature) const
0037114c D typeinfo for QOpenGLFunctions_ES2
003492c8 R typeinfo name for QOpenGLFunctions_ES2
00371158 D vtable for QOpenGLFunctions_ES2
Observe that there are no 3_2 symbols in our qtbase, only _ES2 variants.
Looks like our qtbase is incompatible with alpine's qtdeclarative.
Edited by Administrator