Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 680616 - dev-qt/qtwebkit-5.212.0_pre20180120 fails to build: undefined reference to 'glFlush'
Summary: dev-qt/qtwebkit-5.212.0_pre20180120 fails to build: undefined reference to 'g...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://bugreports.qt.io/browse/QTBUG...
Whiteboard: fixed in 5.12.3
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-16 14:25 UTC by Tiziano Müller (RETIRED)
Modified: 2019-04-28 11:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.zst (build.log.zst,808.03 KB, application/octet-stream)
2019-03-16 14:25 UTC, Tiziano Müller (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller (RETIRED) gentoo-dev 2019-03-16 14:25:54 UTC
Created attachment 569362 [details]
build.log.zst

full build log is attached (zstd since xz still too large), failure occurs when linking Qt5WebKit:

[...]
cd /var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20180120/work/qtwebkit-5.212.0_pre20180120_build/Source/WebKit && /usr/bin/perl /var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20180120/work/72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da/Tools/qt/generate-version-script.pl 5.12.1 > /var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20180120/work/qtwebkit-5.212.0_pre20180120_build/QtWebKit.version && cd /var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20180120/work/qtwebkit-5.212.0_pre20180120_build && /usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++ -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -march=broadwell -mrtm -mabm -O2 -ggdb -pipe -fno-strict-aliasing -fno-exceptions -fno-strict-aliasing -fno-rtti -std=c++11 -Wno-expansion-to-defined  -Wl,--no-undefined -Wl,-O1 -Wl,--as-needed -fuse-ld=gold -Wl,--disable-new-dtags -fuse-ld=gold -Wl,--disable-new-dtags  -Wl,--version-script,/var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20180120/work/qtwebkit-5.212.0_pre20180120_build/QtWebKit.version -shared -Wl,-soname,libQt5WebKit.so.5 -o lib/libQt5WebKit.so.5.212.0 Source/WebKit/CMakeFiles/WebKit.dir/Storage/StorageAreaImpl.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/Storage/StorageAreaSync.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/Storage/StorageNamespaceImpl.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/Storage/StorageSyncManager.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/Storage/StorageThread.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/Storage/StorageTracker.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/Storage/WebDatabaseProvider.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/Storage/WebStorageNamespaceProvider.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/WebCoreSupport/WebResourceLoadScheduler.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qhttpheader.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebdatabase.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebelement.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebfullscreenrequest.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebhistory.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebhistoryinterface.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebkitglobal.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebplugindatabase.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebpluginfactory.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebscriptworld.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebsecurityorigin.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Api/qwebsettings.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/ChromeClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/ContextMenuClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/DragClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/EditorClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/FrameLoaderClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/FrameNetworkingContextQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/HistorySerialization.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/IconDatabaseClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/InitWebCoreQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/InspectorClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/InspectorServerQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/NotificationPresenterClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/PlatformStrategiesQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/PopupMenuQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/ProgressTrackerClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/QWebFrameAdapter.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/QWebFrameData.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/QWebPageAdapter.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/QtPlatformPlugin.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/QtPluginWidgetAdapter.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/QtPrintContext.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/SearchPopupMenuQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/TextCheckerClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/TextureMapperLayerClientQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/UndoStepQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/VisitedLinkStoreQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/WebDatabaseProviderQt.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/WebCoreSupport/WebEventConversion.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/win/Plugins/PluginDatabase.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/win/Plugins/PluginDebug.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/win/Plugins/PluginPackage.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/win/Plugins/PluginStream.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/win/Plugins/PluginView.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Plugins/PluginPackageNone.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qt/Plugins/PluginViewNone.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/qrc_WebCore.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebInspectorUI/qrc_WebInspector.cpp.o Source/WebKit/CMakeFiles/WebKit.dir/WebKit_autogen/mocs_compilation.cpp.o  lib/libJavaScriptCore.a lib/libWTF.a lib/libWebCore.a -Wl,--whole-archive lib/libWebKit2.a -Wl,--no-whole-archive /usr/lib64/libQt5Quick.so.5.12.1 /usr/lib64/libQt5WebChannel.so.5.12.1 -licuuc -lX11 -lXcomposite -lXrender lib/libWebCore.a lib/libJavaScriptCore.a lib/libWTF.a -licui18n lib/libbmalloc.a -ldl -lpthread lib/libwoff2.a lib/libbrotli.a -ljpeg -lpng -lz -lwebp -lhyphen -lxml2 -lxslt -lsqlite3 -lgio-2.0 -lgstapp-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgstpbutils-1.0 -lgstaudio-1.0 -lgsttag-1.0 -lgstvideo-1.0 -lgstfft-1.0 -ljpeg -lpng -lz -lwebp -lhyphen -lxml2 -lxslt -lsqlite3 -lgio-2.0 -lgstapp-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgstpbutils-1.0 -lgstaudio-1.0 -lgsttag-1.0 -lgstvideo-1.0 -lgstfft-1.0 -licuuc -lgobject-2.0 -lglib-2.0 lib/libANGLESupport.a /usr/lib64/libQt5Gui.so.5.12.1 /usr/lib64/libQt5Qml.so.5.12.1 /usr/lib64/libQt5Network.so.5.12.1 /usr/lib64/libQt5Core.so.5.12.1 -lrt -lX11 && :
/var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20180120/work/72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:53: error: undefined reference to 'glFlush'
/var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20180120/work/72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:60: error: undefined reference to 'glReadPixels'
[...]
LES.cpp:287: error: undefined reference to 'eglGetProcAddress'
/var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20180120/work/72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp:288: error: undefined reference to 'eglGetProcAddress'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

emerge --info:

Portage 2.3.62 (python 3.6.6-final-0, default/linux/amd64/17.0/systemd, gcc-8.3.0, glibc-2.28-r5, 4.20.11-gentoo x86_64)
=================================================================
System uname: Linux-4.20.11-gentoo-x86_64-Intel-R-_Core-TM-_i5-7500_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:    16382980 total,   4264800 free
KiB Swap:   19530748 total,  19363324 free
Timestamp of repository gentoo: Fri, 15 Mar 2019 16:30:01 +0000
Head commit of repository gentoo: 3615ca8fe7b01d94562525f0f798b59531f40c42
sh bash 5.0_p2
ld GNU gold (Gentoo 2.31.1 p5 2.31.1) 1.16
app-shells/bash:          5.0_p2::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.0::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.6::gentoo
dev-util/cmake:           3.13.4::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.15::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r4::gentoo
sys-devel/gcc:            8.3.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.20::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r5::gentoo
Repositories:

gentoo
    location: /var/db/repositories/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

local
    location: /var/db/repositories/local
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ https://mirrors.evowise.com/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/cache/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl amd64 bzip2 caps cli crypt cxx dbus dri fortran gdbm iconv ipv6 libtirpc lzma multilib ncurses nls nptl openmp pam pcre readline seccomp ssl systemd tcpd udev unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

emerge -vp qtwebkit:

[ebuild   R    ] dev-qt/qtwebkit-5.212.0_pre20180120:5/5.212::gentoo  USE="X gles2 gstreamer hyphen jit opengl printsupport qml webp -geolocation -multimedia -nsplugin -orientation" 0 KiB
Comment 1 Tiziano Müller (RETIRED) gentoo-dev 2019-03-17 11:15:50 UTC
For some reason is `qtwebkit` unable to pick up the required OpenGL libraries:

  [...]
  -- Qt OpenGL implementation: GLESv2
  -- Qt OpenGL libraries: 
  -- Qt EGL libraries: 
  [...]
Comment 2 Tiziano Müller (RETIRED) gentoo-dev 2019-03-31 21:35:23 UTC
With the help of `cmake --trace-expand`, the test in `https://code.qt.io/cgit/qt/qtbase.git/tree/tests/auto/cmake/test_opengl_lib` and comparing with other distros, my guess is that we write an invalid /usr/lib64/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake under certain circumstances.

I ended up with the following: 

  [...]
  macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
      set(Qt5Gui_${Name}_LIBRARIES)
      set(Qt5Gui_${Name}_INCLUDE_DIRS ${IncDirs})
      foreach(_lib ${Libs})
          string(REGEX REPLACE [^_A-Za-z0-9] _ _cmake_lib_name ${_lib})
          if (NOT TARGET Qt5::Gui_${_cmake_lib_name} AND NOT _Qt5Gui_${_cmake_lib_name}_LIBRARY_DONE)
              find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib}
              )
  [...]
  endmacro()


  _qt5gui_find_extra_libs(EGL "/usr/lib64/libEGL.so" "" "/usr/include/libdrm")

  _qt5gui_find_extra_libs(OPENGL "/usr/lib64/libGLESv2.so" "" "")



  set(Qt5Gui_OPENGL_IMPLEMENTATION GLESv2)
  [...]

Based on the macro should the library passed along to "_qt5gui_find_extra_libs" (second argument) be a library name, not a full library path.

Comparing with either openSUSE Leap 15.0 or some APT package (https://www.apt-browse.org/browse/ubuntu/xenial/main/amd64/qtbase5-dev/5.5.1+dfsg-16ubuntu7/file/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake) I see indeed the following instead:


  _qt5gui_find_extra_libs(EGL "EGL" "" "/usr/include/libdrm")
  _qt5gui_find_extra_libs(OPENGL "GL" "" "/usr/include/libdrm")
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2019-04-01 05:33:28 UTC
This is the required fix for dev-qt/qtgui:

https://code.qt.io/cgit/qt/qtbase.git/commit/src/gui/Qt5GuiConfigExtras.cmake.in?id=131c760af60734a85cb136d2f6dadb2e43c42368

seems that it is not a mistake that absolute library paths end up in Qt5GuiConfigExtras.cmake
Comment 4 Michael Palimaka (kensington) gentoo-dev 2019-04-01 10:09:59 UTC
(In reply to Tiziano Müller from comment #3)
> This is the required fix for dev-qt/qtgui:
> 
> https://code.qt.io/cgit/qt/qtbase.git/commit/src/gui/Qt5GuiConfigExtras.
> cmake.in?id=131c760af60734a85cb136d2f6dadb2e43c42368
> 
> seems that it is not a mistake that absolute library paths end up in
> Qt5GuiConfigExtras.cmake

This is supposed to be part of 5.12.1 which is in tree, does it work?
Comment 5 Tiziano Müller (RETIRED) gentoo-dev 2019-04-01 19:56:03 UTC
(In reply to Michael Palimaka (kensington) from comment #4)
> (In reply to Tiziano Müller from comment #3)
> > This is the required fix for dev-qt/qtgui:
> > 
> > https://code.qt.io/cgit/qt/qtbase.git/commit/src/gui/Qt5GuiConfigExtras.
> > cmake.in?id=131c760af60734a85cb136d2f6dadb2e43c42368
> > 
> > seems that it is not a mistake that absolute library paths end up in
> > Qt5GuiConfigExtras.cmake
> 
> This is supposed to be part of 5.12.1 which is in tree, does it work?

No, the patch is not in 5.12.1 (see the commit date in https://code.qt.io/cgit/qt/qtbase.git/commit/src/gui/Qt5GuiConfigExtras.cmake.in?id=131c760af60734a85cb136d2f6dadb2e43c42368): I added it to /etc/portage/patches and it applied cleanly to qtgui-5.12.2, after that, qtwebkit built without further problems.