Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489278 - [qt overlay] =dev-qt/qtdeclarative-5.2.0_beta1 - qsgbatchrenderer.cpp:(.text+0xb813): undefined reference to `glClearDepth'
Summary: [qt overlay] =dev-qt/qtdeclarative-5.2.0_beta1 - qsgbatchrenderer.cpp:(.text+...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 481744 489416 (view as bug list)
Depends on:
Blocks: qt5-porting
  Show dependency tree
 
Reported: 2013-10-24 17:19 UTC by Gianni Rossi
Modified: 2013-11-13 16:49 UTC (History)
3 users (show)

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


Attachments
Patch that resolves this issue by linking GL (gl.patch,200 bytes, patch)
2013-10-24 17:22 UTC, Gianni Rossi
Details | Diff
Patch for qtmultimedia (gl.patch,254 bytes, patch)
2013-10-24 17:32 UTC, Gianni Rossi
Details | Diff
build.log (build.log.bz2,11.37 KB, application/bzip2)
2013-10-25 12:27 UTC, Gianni Rossi
Details
/usr/lib64/libQt5Gui.prl (libQt5Gui.prl.bz2,639 bytes, application/x-bzip2)
2013-10-25 17:18 UTC, Gianni Rossi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gianni Rossi 2013-10-24 17:19:22 UTC
build fails with:
.obj/release-shared/qsgbatchrenderer.o: In function `QSGBatchRenderer::Renderer::renderBatches()':
qsgbatchrenderer.cpp:(.text+0xb813): undefined reference to `glClearDepth'
.obj/release-shared/qquickwindow.o: In function `QQuickWindow::resetOpenGLState()':
qquickwindow.cpp:(.text+0x2431): undefined reference to `glClearDepth'
collect2: error: ld returned 1 exit status
make: *** [../../lib/libQt5Quick.so.5.2.0] Error 1


Reproducible: Always

Steps to Reproduce:
1. emerge dev-qt/qtdeclarative-5.2.0_beta1

Actual Results:  
Compilation fails with:


Expected Results:  
>>> dev-qt/qtdeclarative-5.2.0_beta1 merged.


Portage 2.2.7 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.1, glibc-2.15-r3, 3.11.1-gentoo x86_64)
=================================================================
System uname: Linux-3.11.1-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_950_@_3.07GHz-with-gentoo-2.2
KiB Mem:     8158280 total,     75408 free
KiB Swap:    7999484 total,   7999484 free
Timestamp of tree: Wed, 23 Oct 2013 23:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.2.5-r3
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.3
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.3-r1, 4.8.1-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo gianni multimedia qt kde hardened-dev
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=native -fomit-frame-pointer -Wno-error -ftree-vectorize -flto -floop-block -floop-interchange -floop-strip-mine -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O3 -pipe -march=native -fomit-frame-pointer -Wno-error -fpermissive -ftree-vectorize -flto -floop-block -floop-interchange -floop-strip-mine -O2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"                                                                                                                                                                                                               
GENTOO_MIRRORS="http://distfiles.gentoo.org"                                                                                                                                                                                     
LANG="en_GB.UTF-8"                                                                                                                                                                                                               
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-flto -Wl,--hash-style=gnu"                                                                                                                                                                 
MAKEOPTS="-j4"                                                                                                                                                                                                                   
PKGDIR="/usr/portage/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" 
PORTAGE_TMPDIR="/var/tmp"                                                                                                                                                                                                        
PORTDIR="/usr/portage"                                                                                                                                                                                                           
PORTDIR_OVERLAY="/etc/portage/overlay /var/lib/layman/multimedia /var/lib/layman/qt /var/lib/layman/kde /var/lib/layman/hardened-development"                                                                                    
SYNC="rsync://bitforge.com.br/gentoo-portage"                                                                                                                                                                                    
USE="X a52 aac acl acpi aio alsa amd64 apng bash-completion berkdb bittorrent bluetooth branding bzip2 c++0x c++11 cairo cdda cddb cdr chromium cli cmake consolekit cracklib crypt cups cxx dbus declarative dhcp dhcpcd dirac dlna dri dts dvd dvdr emboss encode exif faac fam ffmpeg firefox flac fortran fuse gdbm gif git gles gles2 gpm graphite gstreamer hal iconv icu id3tag ipv6 iscsi jpeg jpeg2k kde kerberos kipi kvm latex lcms ldap libnotify libvirtd lirc lto lvm lzo macvtap mad matroska mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses networkmanager nls nouveau nptl ntpl ntplonly offensive ogg opengl openmp openvg openxml opus pam pango parted pcap pch pcre pdf phonon plasma png policykit postgres ppds pulseaudio python qemu qemu-ifup qml qt qt3support qt4 rdp readline resolvconf rtsp samba sane schroedinger sdl semantic-desktop session smp spdy spell spice sse sse2 ssl ssse3 startup-notification subversion svg syslog taglib tcpd theora threads tiff truetype udev udisks unicode upnp upower usb utf utf8 v4l v4l2 valgrind video virt-network vnc vorbis vpx wayland wayland-compositor webkit webm webp wxwidgets x264 xcb xcomposite xinerama xml xmp xsane xscreensaver xv xvid xwayland zlib" ABI_X86="64 32" 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 proxy proxy_http dbd wsgi" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB pt pt_BR es it" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64 arm armeb" QEMU_USER_TARGETS="i386 x86_64 arm armeb" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Gianni Rossi 2013-10-24 17:22:15 UTC
Created attachment 361808 [details, diff]
Patch that resolves this issue by linking GL
Comment 2 Gianni Rossi 2013-10-24 17:32:24 UTC
Created attachment 361810 [details, diff]
Patch for qtmultimedia
Comment 3 Arisu Tachibana Gentoo Infrastructure gentoo-dev 2013-10-25 09:56:43 UTC
Can you please:

1) Attach the complete build log, so we know relevant information.

Thank you very much in advance.
Comment 4 Gianni Rossi 2013-10-25 12:27:47 UTC
Created attachment 361888 [details]
build.log
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2013-10-25 16:40:53 UTC
So this affects both qtdeclarative and qtmultimedia?

Can you attach your /usr/lib64/libQt5Gui.prl please?
Comment 6 Gianni Rossi 2013-10-25 17:18:59 UTC
Created attachment 361922 [details]
/usr/lib64/libQt5Gui.prl
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2013-10-25 17:54:27 UTC
Ah you're using gles! glClearDepth() is not available on gles, there's only the single-precision variant glClearDepthf().

The code does support gles, but for some reason QT_OPENGL_ES is not defined.
The patch is wrong.
Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2013-10-25 17:59:57 UTC
We probably need to handle that define via QCONFIG_DEFINE in qtgui.

Workaround for now is to build qtgui with USE="-gles2".
Comment 9 Davide Pesavento (RETIRED) gentoo-dev 2013-10-27 19:50:13 UTC
*** Bug 481744 has been marked as a duplicate of this bug. ***
Comment 10 Sven Eden 2013-11-06 09:39:31 UTC
(In reply to Davide Pesavento from comment #8)
> We probably need to handle that define via QCONFIG_DEFINE in qtgui.
> 
> Workaround for now is to build qtgui with USE="-gles2".

Or to change the Makefile in the current workdirs and add "-lGL" to LIBS. Both packages compile fine then.
Comment 11 Sven Eden 2013-11-06 12:15:15 UTC
(In reply to Sven Eden from comment #10)
> (In reply to Davide Pesavento from comment #8)
> > We probably need to handle that define via QCONFIG_DEFINE in qtgui.
> > 
> > Workaround for now is to build qtgui with USE="-gles2".
> 
> Or to change the Makefile in the current workdirs and add "-lGL" to LIBS.
> Both packages compile fine then.

Just a quick note: I have built qtgui with USE="-gles2" now, but got the reported errors with this as well. The linker only succeeds if "-lGL" is appended to the LIBS list.
Comment 12 Davide Pesavento (RETIRED) gentoo-dev 2013-11-12 23:28:44 UTC
This should be fixed in git.

Please sync your local clone of qt overlay, then *re-emerge* *qtgui* first, and finally try again with qtdeclarative. Let me know if it works for you.
Comment 13 Sven Eden 2013-11-13 15:23:52 UTC
(In reply to Davide Pesavento from comment #12)
> This should be fixed in git.
> 
> Please sync your local clone of qt overlay, then *re-emerge* *qtgui* first,
> and finally try again with qtdeclarative. Let me know if it works for you.

WOW!

I did:

1) emerge --oneshot qtgui:5 => Merged without problems
2) emerge --oneshot qtdeclarative:5 => Merged without problems

And the biggest joy:

3) emerge --oneshot qtwekit:5 => Merged without problems, too!

Ah! USE Flags used:

qtgui:
USE="accessibility -debug eglfs evdev gif gles2 glib -harfbuzz -ibus jpeg -kms opengl png {-test} udev xcb"

qtdeclarative:
USE="-debug localstorage {-test} widgets xml"

qtwebkit:
USE="-debug gstreamer -libxml2 multimedia opengl qml {-test} udev webp widgets xslt"
Comment 14 Davide Pesavento (RETIRED) gentoo-dev 2013-11-13 16:47:58 UTC
Great! Thanks a lot.
Comment 15 Davide Pesavento (RETIRED) gentoo-dev 2013-11-13 16:49:40 UTC
*** Bug 489416 has been marked as a duplicate of this bug. ***