QtQuick(package qtdeclarative) somehow depends on the gles2/opengl use-flags of qtgui. Reproducible: Always Steps to Reproduce: 1. Install qtgui:5[-gles2] 2. Install qtdeclarative:5 3. Linking with Qt5Quick works fine 4. Install qtgui:5[+gles2] 5. /usr/lib64/libQt5Quick.so.5.2.1: undefined reference to `QOpenGLFunctions_3_2_Core::versionProfile()' 6. Recompile qtdeclarative 7. Linking works fine again
Altough recompilation of qtdeclarative fixed the problem, for reference the commandline for linking which caused the error: [30/30] Linking CXX executable tomahawk FAILED: : && /usr/lib/ccache/bin/g++ -Wl,--no-undefined -g src/tomahawk/CMakeFiles/tomahawk_bin.dir/AclRegistryImpl.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/ShortcutHandler.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/UbuntuUnityHack.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/TomahawkApp.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/main.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/Scrobbler.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/UPowerProxy.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/linux/UPowerHandler.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/GnomeSettingsDaemonMediaKeysProxy.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/linux/GnomeShortcutHandler.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/qrc_tomahawk_i18n.cxx.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/dialogs/DiagnosticsDialog.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/dialogs/LoadXSPFDialog.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/dialogs/SettingsDialog.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/SourcesModel.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/SourcesProxyModel.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/SourceTreeView.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/SourceDelegate.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/AnimationHelper.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/ScriptCollectionItem.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/SourceTreeItem.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/SourceItem.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/PlaylistItems.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/CategoryItems.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/GenericPageItems.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/LovedTracksItem.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/TemporaryPageItem.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/GroupItem.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/HistoryItem.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/sourcetree/items/InboxItem.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/TomahawkTrayIcon.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/AudioControls.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/TomahawkWindow.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/ContainedMenuButton.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/AccountListView.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/AccountListWidget.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/AccountModelFactoryProxy.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/AccountWidget.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/AccountsPopupWidget.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/AccountsToolButton.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/SlideSwitchButton.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/SocialWidget.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/SplashWidget.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/widgets/UnstyledFrame.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/breakpad/BreakPad.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/qrc_resources.cpp.o src/tomahawk/CMakeFiles/tomahawk_bin.dir/tomahawk_bin_automoc.cpp.o -o tomahawk -rdynamic /usr/lib64/libQt5Core.so.5.2.1 /usr/lib64/libQt5Widgets.so.5.2.1 /usr/lib64/libQt5Network.so.5.2.1 /usr/lib64/libQt5Sql.so.5.2.1 /usr/lib64/libQt5WebKitWidgets.so.5.2.1 -llastfm -llastfm -lqca -llastfm -llastfm -lqca libtomahawk_breakpad.a libtomahawk-widgets.so.0.7.100 libtomahawk-playdarapi.so.0.7.100 libtomahawk.so.0.7.100 -lechonest -lqjson -L/usr/lib64 -ltag /usr/lib64/libQt5Sql.so.5.2.1 /usr/lib64/libQt5WebKitWidgets.so.5.2.1 /usr/lib64/libQt5OpenGL.so.5.2.1 /usr/lib64/libQt5PrintSupport.so.5.2.1 /usr/lib64/libQt5WebKit.so.5.2.1 /usr/lib64/libQt5UiTools.a /usr/lib64/libQt5Svg.so.5.2.1 -lclucene-core -lclucene-shared -lechonest -lpthread -llastfm /home/xhochy/Development/dist/lib64/libKF5Attica.so.1.0.0 /usr/lib64/libQt5Concurrent.so.5.2.1 -lquazip -lqca /usr/lib64/libQt5Widgets.so.5.2.1 /usr/lib64/libQt5Quick.so.5.2.1 /usr/lib64/libQt5Gui.so.5.2.1 /usr/lib64/libQt5Qml.so.5.2.1 /usr/lib64/libQt5Network.so.5.2.1 /usr/lib64/libQt5Xml.so.5.2.1 /usr/lib64/libQt5DBus.so.5.2.1 /usr/lib64/libQt5Core.so.5.2.1 -Wl,-rpath,/home/xhochy/Development/tomahawk-player/build/tomahawk-ccache-phonon5:/home/xhochy/Development/dist/lib64: -Wl,-rpath-link,/home/xhochy/Development/dist/lib64 && : /usr/lib64/libQt5Quick.so.5.2.1: undefined reference to `QOpenGLFunctions_3_2_Core::versionProfile()'
Interesting... changing opengl backend breaks the ABI... I suppose we have to introduce USE=gles2 in qtdeclarative and tie it to the flag in qtgui (dev-qt/qtgui:5[gles2=,opengl]) Anyone has a better idea?
I guess this will break ABI for non-Qt consumers too?
(In reply to Michael Palimaka (kensington) from comment #3) > I guess this will break ABI for non-Qt consumers too? Not necessarily. The missing symbols may be part of the private API, if you use it outside qt, you're on your own(*). Anyway, we need to check. (*) this reminds me that I've been thinking of having SLOT="5/${PV}" for Qt modules, where the semantics of the subslot is tied to the private API/ABI. Not sure how to document that though, I don't want people to start adding random slot operator deps to packages that do not use the private API.
Cannot reproduce with 5.3.9999. All functions that are specific to the underlying OpenGL implementation are only used inside libQtGui.so and not linked to by any other Qt package.h
Fix for this issue in 5.2.1: https://github.com/gentoo/qt/pull/34
Another discovery I made related to this issue is that other distributions (Debian unstable and Ubuntu 13.10) do not export those symbols in QtGui (but this may be an issue depending on LDFLAGS).
(In reply to Uwe L. Korn from comment #7) > Another discovery I made related to this issue is that other distributions > (Debian unstable and Ubuntu 13.10) do not export those symbols in QtGui (but > this may be an issue depending on LDFLAGS). Exact same version of qtgui? IIRC ubuntu 13.10 has qt 5.0.x
Ok, I got confused that Ubuntu 13.10 has packaged Qt3dQuick 5.2.0 but everything else 5.0.2. Qt 5.2 on Debian unstable has the same problems (i.e. OpenGL backend specific functions are exported), so there is nothing wrong in this case anymore.
I don't care about 5.2.1, and this was fixed upstream for 5.3 so...
I think this bug needs to re-opened. When qtdeclarative is compiled, it makes use of some defines. Especially when removing the gles2 use flag, several programs' rendering broke. I also got a compilation error from KWin when adding the gles2 use flag (see below). This is all done on Qt 5.3.1. I've reported the rendering bug upstream at: https://bugreports.qt-project.org/browse/QTBUG-40496 . While the rendering may be fixed, the compilation directives will still be wrong between the builds. KWin linking error: Linking CXX executable kwin_x11 /usr/bin/cmake -E cmake_link_script CMakeFiles/kwin.dir/link.txt --verbose=1 /usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -ggdb3 -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wl,--enable-new-dtags -Wl,-O1 -Wl,--as-needed CMakeFiles/kwin.dir/kwin_dummy.cpp.o CMakeFiles/kwin.dir/kwin_automoc.cpp.o -o kwin_x11 -rdynamic libkdeinit5_kwin.so libkdecorations/libkdecorations.so.5.0.0 libkwineffects/libkwineffects.so.5.0.0 libkwineffects/libkwinxrenderutils.so.5.0.0 effects/libkwin4_effect_builtins.so.1.0.0 /usr/lib64/libQt5Script.so.5.3.1 /usr/lib64/libKF5Crash.so.5.0.0 /usr/lib64/libKF5Notifications.so.5.0.0 /usr/lib64/libKF5Plasma.so.5.0.0 /usr/lib64/libQt5Quick.so.5.3.1 /usr/lib64/libQt5Qml.so.5.3.1 /usr/lib64/libQt5Concurrent.so.5.3.1 /usr/lib64/libKF5GlobalAccel.so.5.0.0 /usr/lib64/libKF5ConfigWidgets.so.5.0.0 /usr/lib64/libKF5Codecs.so.5.0.0 /usr/lib64/libKF5Auth.so.5.0.0 /usr/lib64/libKF5WidgetsAddons.so.5.0.0 /usr/lib64/libKF5ConfigGui.so.5.0.0 /usr/lib64/libQt5Xml.so.5.3.1 /usr/lib64/libQt5Network.so.5.3.1 /usr/lib64/libKF5Activities.so.5.0.0 -lX11 -lXext -lXcursor -lICE -lSM -lXxf86vm -lX11 -lXext -lXcursor -lICE -lSM -lXxf86vm /usr/lib64/libxcb-damage.so /usr/lib64/libxcb-composite.so /usr/lib64/libxcb-xfixes.so /usr/lib64/libxcb-shape.so /usr/lib64/libxcb-sync.so /usr/lib64/libxcb-render.so /usr/lib64/libxcb-randr.so /usr/lib64/libxcb-keysyms.so /usr/lib64/libxcb-shm.so /usr/lib64/libxcb-xtest.so /usr/lib64/libEGL.so /usr/lib64/libwayland-cursor.so /usr/lib64/libxkbcommon.so /usr/lib64/libwayland-egl.so /usr/lib64/libwayland-client.so libkwineffects/libkwinglesutils.so.5.0.0 /usr/lib64/libKF5Service.so.5.0.0 /usr/lib64/libKF5ConfigCore.so.5.0.0 /usr/lib64/libKF5CoreAddons.so.5.0.0 /usr/lib64/libKF5I18n.so.5.0.0 /usr/lib64/libQt5DBus.so.5.3.1 /usr/lib64/libKF5WindowSystem.so.5.0.0 /usr/lib64/libQt5X11Extras.so.5.3.1 /usr/lib64/libQt5Widgets.so.5.3.1 /usr/lib64/libQt5Gui.so.5.3.1 /usr/lib64/libQt5Core.so.5.3.1 /usr/lib64/libxcb.so -lGLESv2 -lEGL -Wl,-rpath,/var/tmp/portage/kde-base/kwin-5.0.0/work/kwin-5.0.0_build:/var/tmp/portage/kde-base/kwin-5.0.0/work/kwin-5.0.0_build/libkdecorations:/var/tmp/portage/kde-base/kwin-5.0.0/work/kwin-5.0.0_build/libkwineffects:/var/tmp/portage/kde-base/kwin-5.0.0/work/kwin-5.0.0_build/effects: /usr/lib64/libQt5Quick.so.5.3.1: undefined reference to `QOpenGLFunctions_3_2_Core::versionProfile()' collect2: error: ld returned 1 exit status make[2]: *** [kwin_x11] Error 1 make[2]: Leaving directory `/var/tmp/portage/kde-base/kwin-5.0.0/work/kwin-5.0.0_build' make[1]: *** [CMakeFiles/kwin.dir/all] Error 2 make[1]: Leaving directory `/var/tmp/portage/kde-base/kwin-5.0.0/work/kwin-5.0.0_build' make: *** [all] Error 2
Reopening for further investigation.
I can confirm the qtdeclarative uses the QT_OPENGL_ES and QT_OPENGL_ES_2 from qtgui.
Fixed in git https://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=5d80ca71ee095d15aca1d9a4e654ceb41c26b1f2