libglvnd use flag has been enabled per default. This causes rebuilding of mesa, nvidia-drivers and the xorg-server which fails at make[3]: *** [Makefile:696: Xvfb] Error 1 Reproducible: Always Steps to Reproduce: 1. emerge --sync && emerge -NuDva --with-bdeps=y --keep-going @world Actual Results: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib64/libGL.so: undefined reference to `_glapi_tls_Current' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:696: Xvfb] Error 1 make[3]: Leaving directory '/var/tmp/portage/x11-base/xorg-server-1.20.7/work/xorg-server-1.20.7/hw/vfb' make[2]: *** [Makefile:762: all-recursive] Error 1 make[2]: Leaving directory '/var/tmp/portage/x11-base/xorg-server-1.20.7/work/xorg-server-1.20.7/hw/vfb' make[1]: *** [Makefile:615: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/x11-base/xorg-server-1.20.7/work/xorg-server-1.20.7/hw' make: *** [Makefile:816: all-recursive] Error 1 * ERROR: x11-base/xorg-server-1.20.7::gentoo failed (compile phase): * emake failed Expected Results: Success emerge --info Portage 2.3.92 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop, gcc-9.2.0, glibc-2.30-r4, 5.5.8-gentoo+ x86_64) ================================================================= System uname: Linux-5.5.8-gentoo+-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-gentoo-2.7 KiB Mem: 32848896 total, 24229048 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sat, 07 Mar 2020 10:00:01 +0000 Head commit of repository gentoo: b759b2f51c33735cbbe9c6371f70d42171ea37d1 Head commit of repository steam-overlay: 55f315c7e9aafb1975d0ff519fab96b39342c76c sh bash 5.0_p16 ld GNU ld (Gentoo 2.34 p1) 2.34.0 app-shells/bash: 5.0_p16::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.30.1::gentoo dev-lang/python: 2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.2::gentoo dev-util/cmake: 3.16.5::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.18::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.1-r2::gentoo sys-devel/binutils: 2.34::gentoo sys-devel/gcc: 9.2.0-r4::gentoo sys-devel/gcc-config: 2.2.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers) sys-libs/glibc: 2.30-r4::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 steam-overlay location: /usr/local/portage/steam-overlay sync-type: git sync-uri: https://github.com/anyc/steam-overlay.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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 -fomit-frame-pointer" DISTDIR="/usr/portage/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 -fomit-frame-pointer" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="de" MAKEOPTS="-j7" 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 --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac aacs acpi addc airplay alsa amd64 appindicator archive asm ayatana bash-completion bcache bdplus berkdb bittorrent bluetooth bluray branding bzip2 cairo calf cdda cdio cdr cgroups chromium clamav clamdtop clang cli client creds cron crypt cryptsetup cups curl custom-cflags custom-optimization cxx dav1d dbus device-mapper dga dhcp dhcpcd dos dri dri3 dts dvb dvd dvdr editor efi egl elogind emboss encode evdev exif f2fs faad fasttrack fat fdk ffmpeg fftw flac flambda fluidsynth fontconfig fortran fribidi fullscreen fuse gcrypt gdbm geoclue geolocation gif gles gles2 glib glut gme gnome-keyring gnutella gnutls gold googledrive gpg gpgme gpm graph graphite gssapi gstreamer gtk gtk3 haptic hddtemp highlight hostonly hpn http http2 hunspell iconv icq icu id3tag idn imagemagick imap inotify inspector ios ipp_autosetup ipv6 java jit joystick jpeg json jumbo-build kbd kerberos kms lcms libcanberra libdrm libevent libinput libnotify libreoffice libtirpc libuvc libv4l lightdm live lm-sensors lm_sensors logrotate lto lv2 lvm lz4 lzma lzo mad magic man matroska media memcached messages metalink midi mikmod minizip mjpeg mmap mms mng mod modern-top mp3 mp4 mpeg mpeg2 mtp multilib multimedia native-headset ncurses netapi network networkmanager nls nntp nptl nss ntfs ntfsdecrypt ntlm ntp nvenc nvidia oauth ocamlopt odf offensive office ogg openal opencl openconnect opengl openh264 openmp openssl openvpn opus pam pango pci pclm pcre pdf pdfimport pgo pidgin plugin-sysinfo png policykit portaudio postproc postscript ppds pptp pulseaudio qml qt5 qtaudio rar rdp readline samba sasl scanner script sdl seccomp secure-delete sensors sftp shout silc sip sipe skins smpeg snappy sound speex spell split-usr sqlite srt ssh ssl startup-notification steam steamfonts svg sync-plugin-portage syslog systray taglib tcpd tdb theora threads thunar tiff tpm tray trayicon truetype udev udf udisks unicode update_drivedb upnp upnp-av upower usb uvm v4l v4lutils vaapi vcd vdo vdpau video videoeffects vlc vnc voice vorbis vpnc vpx vte vulkan wayland wayland-compositor webcam webdav webp webserver widevine widgets winbind wxwidgets x264 x265 xa xcb xcomposite xfce xinerama xml xps xrandr xv xvfb xvid xvmc xwayland zlib zstd zvbi" ABI_X86="64" ADA_TARGET="gnat_2019" ALSA_CARDS="hda-intel usb-audio" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="nss" ELIBC="glibc" INPUT_DEVICES="libinput joystick" KERNEL="linux" L10N="de" LCD_DEVICES="ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF x86 NVPTX" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 617396 [details] build log (tar gz)
That was before it became default, but I ran into the same error when I flipped libglvnd all at once (with nvidia-drivers included). I also use [xvfb] I don't remember the specifics but I thought it may be an order issue, so I rebuilt one by one using --nodeps to force it, and finally xorg-server _last_, which built with no errors. I wasn't sure if it was just me doing weird things at the time so I opted not to fill a bug without further testing.
_glapi_tls_Current symbol is supposed to be defined in libGLdispatch.so.0, and libGL.so should be linked against libGLdispatch.so.0: # (cd /var/tmp/portage/media-libs/libglvnd-1.3.1/image; scanelf -qyRF "%F: %s" -s "+_glapi_tls_Current" *) usr/lib64/libGLdispatch.so.0.0.0: _glapi_tls_Current # (cd /var/tmp/portage/media-libs/libglvnd-1.3.1/image; scanelf -qyRF "%F: %s" -s "-_glapi_tls_Current" *) usr/lib64/libOpenGL.so.0.0.0: _glapi_tls_Current usr/lib64/libGLESv1_CM.so.1.2.0: _glapi_tls_Current usr/lib64/libGLESv2.so.2.1.0: _glapi_tls_Current usr/lib64/libGL.so.1.7.0: _glapi_tls_Current # (cd /var/tmp/portage/media-libs/libglvnd-1.3.1/image; scanelf -qyRF "%F: %n" *) usr/lib64/libOpenGL.so.0.0.0: libGLdispatch.so.0,libc.so.6 usr/lib64/libEGL.so.1.1.0: libGLdispatch.so.0,libdl.so.2,libc.so.6 usr/lib64/libGLESv1_CM.so.1.2.0: libGLdispatch.so.0,libc.so.6 usr/lib64/libGLdispatch.so.0.0.0: libdl.so.2,libc.so.6 usr/lib64/libGLX.so.0.0.0: libGLdispatch.so.0,libdl.so.2,libX11.so.6,libc.so.6 usr/lib64/libGLESv2.so.2.1.0: libGLdispatch.so.0,libc.so.6 usr/lib64/libGL.so.1.7.0: libGLdispatch.so.0,libGLX.so.0,libc.so.6 Can you check linking and symbols in your libraries?
In my case, mid-way into the transition, I think it may have tried to use /usr/lib/opengl/nvidia/lib/libGL* libraries I vaguely recall my emerge -uUD @world did xorg-server _before_ nvidia+libglnvd. Thus why emerging it with --nodeps first, and then building xorg-server fixed it. But that means anyone with a similar setup may run into the same problem.
Had the same problem, and I can confirm that Ionen's solution fixes the problem.
I've heard this also happen with other packages that use opengl if built before nvidia-drivers[+libglvnd] is rebuilt. nvidia-drivers[+libglvnd] is essentially a mesa alternative (headers + libraries), but almost nothing depends on it so orders likely get wrong. Well, it does lack GL/internal/dri_interface.h (provided by mesa) that xorg-server uses for it's non-vendor-independant GLX that nvidia users aren't even using. Otherwise everything works without mesa on nvidia-only.
Thanks for your useful informations! Simple steps that fixed that build order problem (with +libglvnd) for me: 1) emerge --nodeps -1 nvidia-drivers 2) emerge -1 mesa xorg-server
Hello Christopher, I think you shouldn’t close this bug yet, until it is resolved (or marked as) by a Gentoo dev, and for people trying to find this bug when requesting the string "libGL.so: undefined reference to `_glapi_tls_Current'", by default Bugzilla only seek for opened issues. Best regards,
You are right. In my world WORKSFORME was not a true "resolved".
Hm, I guess I need to put some blocker dependencies in place to ensure nvidia-drivers is rebuilt before xorg-server.
I'm affected by this issue as well. Thanks to Christopher for the WA.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb625716155c239585d752e7c19d113afdeb91af commit cb625716155c239585d752e7c19d113afdeb91af Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2020-03-09 00:04:45 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2020-03-09 00:07:22 +0000 x11-base/xorg-server: Block on nvidia-drivers[-libglvnd] If nvidia-drivers are installed without libglvnd support, the Xserver will fail to build. Closes: https://bugs.gentoo.org/711780 Signed-off-by: Matt Turner <mattst88@gentoo.org> x11-base/xorg-server/xorg-server-1.20.7.ebuild | 1 + x11-base/xorg-server/xorg-server-9999.ebuild | 1 + 2 files changed, 2 insertions(+)
Added a blocker. Let's see if that solves it.
(In reply to Matt Turner from comment #13) > Added a blocker. Let's see if that solves it. Adding the blocker solved the issue for me The "ebuild -uDNv world" - which failed yesterday - completes successfully in the right order: $ emerge -uDNva world These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] media-libs/mesa-19.3.4-r1::gentoo [19.3.4::gentoo] USE="X classic dri3 egl gallium gbm gles2 libglvnd llvm vaapi vdpau xvmc -d3d9 -debug -gles1 -lm-sensors -opencl -osmesa -pax_kernel (-selinux) -test -unwind -valgrind -vulkan -vulkan-overlay -wayland -xa" ABI_X86="(64) -32 (-x32)" VIDEO_CARDS="i965 intel (-freedreno) -i915 -iris (-lima) -nouveau (-panfrost) -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) -virgl (-vivante) -vmware" 0 KiB [ebuild R ] x11-drivers/nvidia-drivers-440.59:0/440::gentoo USE="X acpi driver gtk3 kms libglvnd* multilib tools uvm -compat -static-libs -wayland" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild R ] x11-base/xorg-server-1.20.7:0/1.20.7::gentoo USE="ipv6 libglvnd* suid udev xorg xvfb -debug -dmx -doc -elogind -kdrive -libressl -minimal (-selinux) -static-libs -systemd -unwind -wayland -xcsecurity -xephyr -xnest" 0 KiB [uninstall ] app-eselect/eselect-opengl-1.3.1-r4::gentoo [blocks b ] app-eselect/eselect-opengl ("app-eselect/eselect-opengl" is blocking x11-drivers/nvidia-drivers-440.59, media-libs/mesa-19.3.4-r1, x11-base/xorg-server-1.20.7) Total: 3 packages (1 upgrade, 2 reinstalls, 1 uninstall), Size of downloads: 0 KiB Conflict: 1 block Would you like to merge these packages? [Yes/No] >>> Verifying ebuild manifests >>> Running pre-merge checks for media-libs/mesa-19.3.4-r1 * Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau * Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau * Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau >>> Running pre-merge checks for x11-drivers/nvidia-drivers-440.59 * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 5.5.8-x86_64 * Checking for suitable kernel configuration options... [ ok ] >>> Emerging (1 of 3) media-libs/mesa-19.3.4-r1::gentoo >>> Installing (1 of 3) media-libs/mesa-19.3.4-r1::gentoo >>> Emerging (2 of 3) x11-drivers/nvidia-drivers-440.59::gentoo >>> Installing (2 of 3) x11-drivers/nvidia-drivers-440.59::gentoo >>> Emerging (3 of 3) x11-base/xorg-server-1.20.7::gentoo >>> Installing (3 of 3) x11-base/xorg-server-1.20.7::gentoo >>> Uninstalling app-eselect/eselect-opengl-1.3.1-r4::gentoo >>> Jobs: 3 of 3 complete Load avg: 1.93, 1.35, 0.72 * Messages for package media-libs/mesa-19.3.4-r1: * Log file: /var/log/portage/media-libs:mesa-19.3.4-r1:20200309-115217.log * Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau * Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau * Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. * After world updates, it is important to remove obsolete packages with * emerge --depclean. Refer to `man emerge` for more information. Thanks!
Excellent! Thanks a ton for confirming!
Unfortunately the solution also affects =x11-drivers/nvidia-drivers-340.108 that is still in the tree, stable and is used for older cards. This version does not have a `libglvnd' flag and blocks break a build. Probably <x11-drivers/nvidia-drivers-435.21-r1 won't build as well.
In reply to comment #6 by Ionen Wolkens: > I've heard this also happen with other packages that use opengl if built > before nvidia-drivers[+libglvnd] is rebuilt. I had the exact same error message with another package: >>> Failed to emerge dev-qt/qtdeclarative-5.14.2-r2: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib64/libGL.so: undefined reference to `_glapi_tls_Current' collect2: error: ld returned 1 exit status At that time, media-libs/libglvnd had already successfully emerged. However neither x11-base/xorg-server-1.20.8 [1.20.7] USE="elogind* libglvnd*" nor x11-drivers/nvidia-drivers-440.82-r3 had emerged yet. The solution by Christopher Frömmel in comment #7 worked for me: 1) emerge --nodeps -1 nvidia-drivers 2) continue emerge --update, during which dev-qt/qtdeclarative emerged successfully. So, it appears that there are other instances of this bug that are not yet fixed. Also, I am grateful for the comments above, that provided the solution in my specific situation. However, I am wondering, given the error message above (undefined symbol in libGL.so)... how would someone deduce that the nvidia-drivers needed to be rebuilt first? What kind of educated guess could I make in the future to deduce how to solve similar problems in the future? Thank you all.
If anybody has some answers or pointers to my last question (previous comment), I'd like to document it here: https://linux.overshoot.tv/dev-qt/qtdeclarative https://linux.overshoot.tv/usr/lib64/libGL.so
This fix has broken the most convenient way to deal with legacy nvidia drivers with no libglvnd support located here: https://gitlab.com/shibotto/nvidia-legacy.
(In reply to Georgi from comment #19) > This fix has broken the most convenient way to deal with legacy nvidia > drivers with no libglvnd support located here: > https://gitlab.com/shibotto/nvidia-legacy. I don't see how it could have because this bug's commit is older than the overlay. Cross-posted here in case of confusion, but let's continue this on the forums if in doubt: https://forums.gentoo.org/viewtopic-p-8549832.html#8549832
I apologize for my previous comment. The issue was on my side. Regards, Georgi