Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 616398

Summary: media-libs/mesa-9999 fails building: undefined reference to `gbm_bo_create_with_modifiers'
Product: Gentoo Linux Reporter: EoD <EoD>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED OBSOLETE    
Severity: normal CC: candrews, daniel, da_risk, eva, fhlfibh, gentoo-bugs-augustin, herrtimson, ncdehnel, spiderx
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugs.freedesktop.org/show_bug.cgi?id=100259
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 652762, 668900    
Bug Blocks:    
Attachments: emerge --info
mesa build log
=media-libs/mesa-17.1.1 build.log

Description EoD 2017-04-23 16:24:38 UTC
Created attachment 470732 [details]
emerge --info

Since recently, mesa stopped building with the following error:

 /bin/mkdir -p '/var/tmp/portage/media-libs/mesa-9999/image//usr/libx32'
 /bin/mkdir -p '/var/tmp/portage/media-libs/mesa-9999/image//usr/include/EGL'
 /bin/mkdir -p '/var/tmp/portage/media-libs/mesa-9999/image//usr/include/KHR'
 /bin/mkdir -p '/var/tmp/portage/media-libs/mesa-9999/image//usr/libx32/pkgconfig'
 /bin/sh ../../libtool   --mode=install /usr/bin/install -c   libEGL.la '/var/tmp/portage/media-libs/mesa-9999/image//usr/libx32'
 /usr/bin/install -c -m 644 /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/include/EGL/eglext.h /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/include/EGL/egl.h /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/include/EGL/eglextchromium.h /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/include/EGL
 /usr/bin/install -c -m 644 /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/include/KHR/khrplatform.h '/var/tmp/portage/media-libs/mesa-9999/image//usr/include/KHR'
 /usr/bin/install -c -m 644 main/egl.pc '/var/tmp/portage/media-libs/mesa-9999/image//usr/libx32/pkgconfig'
libtool: warning: relinking 'libEGL.la'
libtool: install: (cd /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_x32.x32/src/egl; /bin/sh "/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_x32.x32/libtool"  --tag CC --mode=relink x86_64-pc-linux-gnu-gcc -mx32 -I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/include -I/var/tmp/port
libtool: relink: x86_64-pc-linux-gnu-gcc -mx32 -shared  -fPIC -DPIC  -Wl,--whole-archive ./.libs/libEGL_common.a -Wl,--no-whole-archive  -Wl,--as-needed -lpthread -L/usr/libx32 -lX11-xcb -lX11 -lxcb-dri2 -lxcb-xfixes -lxcb -lxcb-dri3 -lxcb-present -lxcb-sync -lxshmfence -L/var/tmp/portage/media-libs/mesa-9999/image//u
./.libs/libEGL_common.a(platform_drm.o): In function `get_back_bo':
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/egl/drivers/dri2/platform_drm.c:235: undefined reference to `gbm_bo_create_with_modifiers'
collect2: error: ld returned 1 exit status
libtool:   error: error: relink 'libEGL.la' with the above command before installing it
make[5]: *** [Makefile:969: install-libLTLIBRARIES] Error 1


As a similar bug has been reported upstream and it has been an issue with the build software of the respective distribution, I assume this might be a Gentoo bug here:
https://bugs.freedesktop.org/show_bug.cgi?id=100259
Comment 1 EoD 2017-04-23 16:27:04 UTC
Created attachment 470734 [details]
mesa build log
Comment 2 Matt Turner gentoo-dev 2017-05-01 16:52:27 UTC
I cannot reproduce.
Comment 3 EoD 2017-05-01 18:05:39 UTC
(In reply to Matt Turner from comment #2)
> I cannot reproduce.

Well, I can consistently reproduce the issue every single time I try to build >media-libs/mesa-17.x
Comment 4 Mart Raudsepp gentoo-dev 2017-05-01 18:32:16 UTC
Maybe this is similar to https://bugs.gentoo.org/show_bug.cgi?id=616398
Have you installed a local libdrm/mesa in the past and now have unowned *.la files hanging around?
Comment 5 Mart Raudsepp gentoo-dev 2017-05-01 18:32:39 UTC
sorry, copy-paste failure; I meant similar to https://bugs.freedesktop.org/show_bug.cgi?id=100259
Comment 6 EoD 2017-05-01 18:44:44 UTC
(In reply to Mart Raudsepp from comment #4)
> Maybe this is similar to https://bugs.gentoo.org/show_bug.cgi?id=616398
> Have you installed a local libdrm/mesa in the past and now have unowned *.la
> files hanging around?

How would I verify if this is the case? Something like the following?
> find /usr/lib*/ -type f -iname "*.la" -exec sh -c "equery b -e {} || echo {} >> /tmp/unowned_la.log" \;
Comment 7 EoD 2017-05-01 21:24:28 UTC
I was not able find any unowned .la file, but I was able to bisect the problem. It's the following commit:
 http://cgit.freedesktop.org/mesa/mesa/commit/?id=191ff914a2c77d7d982048ef21422a209e1e7e06

Reverting the commit does fix the install issue.

I was also able to successfully build mesa with only x86_64 and x86_32. This problem apparently only affects x86_x32.

I will bring this bug report back to upstream before continuing here.
Comment 8 Craig Andrews gentoo-dev 2017-05-08 18:36:15 UTC
I'm having this
Comment 9 EoD 2017-05-08 19:21:26 UTC
(In reply to candrews from comment #8)
> I'm having this

One workaround is to revert the above commit, build mesa, remove the patch and build mesa again.
Another workaround might be to completely remove mesa and install it again afterwards.
Comment 10 Phil Tooley 2017-05-09 14:30:20 UTC
This also shows up now in 17.1.0_rc4 for me.  Definitely no unowned lib files hanging around on this system.
Comment 11 EoD 2017-05-09 16:52:15 UTC
(In reply to Phil Tooley from comment #10)
> This also shows up now in 17.1.0_rc4 for me.  Definitely no unowned lib
> files hanging around on this system.

This is kind of misleading. 

According to the upstream bug ( https://bugs.freedesktop.org/show_bug.cgi?id=100259 ) the problem is in libtool, which picks up the system library instead of the local library from the current compilation. 

Hence the problem only occurs if an old version of libEGL.so (and maybe libgbm.so) is installed and if it does not yet contain the "gbm_bo_create_with_modifiers" symbol.


Maybe a newer version of libtool fixes the issue.

Gentoo could also add a (dirty) workaround by completely removing those libraries during the linking phase of Mesa and re-adding them if compilation fails or something like that.
Comment 12 Marek Bartosiewicz 2017-05-09 16:53:02 UTC
Confirming for 17.1.0_rc4 on ~amd64. I recently rebuild @world with gcc-6.3.0 and the previous mesa version built OK. This one has build failure:

Making install in egl
make[3]: Entering directory '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src/egl'
make  install-am
make[4]: Entering directory '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src/egl'
make[5]: Entering directory '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src/egl'
 /bin/mkdir -p '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/lib32'
 /bin/mkdir -p '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/include/EGL'
 /bin/mkdir -p '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/include/KHR'
 /bin/mkdir -p '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/lib32/pkgconfig'
 /bin/sh ../../libtool   --mode=install /usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c   libEGL.la '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/lib32'
 /usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c -m 644 /var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/include/EGL/eglext.h /var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/include/EGL/egl.h /var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/include/EGL/eglextchromium.h /var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/include/EGL/eglmesaext.h /var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/include/EGL/eglplatform.h '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/include/EGL'
 /usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c -m 644 main/egl.pc '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/lib32/pkgconfig'
 /usr/lib/portage/python3.5/ebuild-helpers/xattr/install -c -m 644 /var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/include/KHR/khrplatform.h '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/include/KHR'
libtool: warning: relinking 'libEGL.la'
libtool: install: (cd /var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src/egl; /bin/sh "/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/libtool"  --tag CC --mode=relink x86_64-pc-linux-gnu-gcc -m32 -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/include -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/src/egl/main -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/src/gbm/main -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/src -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_DLOPEN -DHAVE_DL_ITERATE_PHDR -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_DRI3 -DENABLE_SHADER_CACHE -DHAVE_MINCORE -DHAVE_ST_VDPAU -DHAVE_LLVM=0x0400 -DMESA_LLVM_VERSION_PATCH=0 -fvisibility=hidden -I/usr/include/libdrm -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11 -DHAVE_X11_PLATFORM -DHAVE_DRM_PLATFORM -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/src/loader -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/src/egl/drivers/dri2 -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/src/gbm/backends/dri -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/src/egl/wayland/wayland-egl -I../../src/egl/wayland/wayland-drm -I/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4/src/egl/wayland/wayland-drm -DDEFAULT_DRIVER_DIR=\"/usr/lib32/dri\" -D_EGL_BUILT_IN_DRIVER_DRI2 -march=native -O2 -pipe -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-math-errno -fno-trapping-math -no-undefined -version-number 1:0 -Wl,-Bsymbolic -Wl,--gc-sections -Wl,--no-undefined -Wl,-O1 -Wl,--as-needed -o libEGL.la -rpath /usr/lib32 libEGL_common.la -inst-prefix-dir /var/tmp/portage/media-libs/mesa-17.1.0_rc4/image/)
libtool: relink: x86_64-pc-linux-gnu-gcc -m32 -shared  -fPIC -DPIC  -Wl,--whole-archive ./.libs/libEGL_common.a -Wl,--no-whole-archive  -lpthread -L/usr/lib32 -lX11-xcb -lX11 -lxcb-dri2 -lxcb-xfixes -lxcb -lxcb-dri3 -lxcb-present -lxcb-sync -lxshmfence -L/var/tmp/portage/media-libs/mesa-17.1.0_rc4/image//usr/lib32 -lgbm -lexpat -lm -ldl -ldrm  -m32 -march=native -O2 -Wl,-Bsymbolic -Wl,--gc-sections -Wl,--no-undefined -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libEGL.so.1 -o .libs/libEGL.so.1.0.0
./.libs/libEGL_common.a(platform_drm.o): In function `get_back_bo':
platform_drm.c:(.text+0x1dd): undefined reference to `gbm_bo_create_with_modifiers'
collect2: error: ld returned 1 exit status
libtool:   error: error: relink 'libEGL.la' with the above command before installing it
make[5]: *** [Makefile:969: install-libLTLIBRARIES] Error 1
make[5]: Leaving directory '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src/egl'
make[4]: *** [Makefile:1490: install-am] Error 2
make[4]: Leaving directory '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src/egl'
make[3]: *** [Makefile:1484: install] Error 2
make[3]: Leaving directory '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src/egl'
make[2]: *** [Makefile:851: install-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src'
make[1]: *** [Makefile:1008: install] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-libs/mesa-17.1.0_rc4/work/mesa-17.1.0-rc4-abi_x86_32.x86/src'
make: *** [Makefile:642: install-recursive] Error 1
 * ERROR: media-libs/mesa-17.1.0_rc4::gentoo failed (install phase):
 *   emake failed
Comment 13 EoD 2017-05-09 16:56:05 UTC
(In reply to Marek Bartosiewicz from comment #12)
> Confirming for 17.1.0_rc4 on ~amd64. I recently rebuild @world with
> gcc-6.3.0 and the previous mesa version built OK. This one has build failure:

see comment #11, this should help.
Comment 14 Marek Bartosiewicz 2017-05-10 08:23:42 UTC
Yes, removing libgbm.so helped.
Comment 15 Chí-Thanh Christopher Nguyễn gentoo-dev 2017-05-11 09:00:53 UTC
So is the issue resolved with
https://cgit.freedesktop.org/mesa/mesa/commit/?id=90633079eccdc7b883b712695c057553d484405f
even without removing system libgbm.so?
Comment 16 sluidfoe 2017-05-22 16:50:51 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #15)
> So is the issue resolved with
> https://cgit.freedesktop.org/mesa/mesa/commit/
> ?id=90633079eccdc7b883b712695c057553d484405f
> even without removing system libgbm.so?

That does not appear to be the case. Inspecting the sources after the unpack phase shows that the linked patch has been applied to mesa-17.1.0 which still fails for me. Moving /usr/lib32/libgbm.so out of the way allowed the merge to complete successfully. Re-emerging mesa afterwords was successful with no intervention.
Comment 17 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-06-08 12:09:23 UTC
Created attachment 475598 [details]
=media-libs/mesa-17.1.1 build.log

Hitting this as well while upgrading from media-libs/mesa-17.0.5

# emerge --info mesa
Portage 2.3.6 (python 3.4.6-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.23-r3, 4.10.13-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.10.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-3687U_CPU_@_2.10GHz-with-gentoo-2.3
KiB Mem:    12182444 total,    319636 free
KiB Swap:   18874360 total,  18252652 free
Timestamp of repository gentoo: Wed, 07 Jun 2017 14:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo, 3.5.3::gentoo, 3.6.1-r1::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo, 2.28-r1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

eva
    location: /var/lib/layman/eva
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

sublime-text
    location: /var/lib/layman/sublime-text
    masters: gentoo
    priority: 50

Installed sets: @gnome-desktop, @local, @network, @portage-extras, @system-extras, @system-extras-phys
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=ivybridge -g -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /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="-O2 -march=ivybridge -g -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--load=6.0 --jobs=4 --keep-going --buildpkg-exclude 'virtual/* sys-kernel/*-sources'"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg 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 xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j5 -l5.0"
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 acl acpi alsa amd64 attr audit avahi avi bash-completion bluetooth bzip2 cairo caps cdr cgmanager cjk cli colord consolekit cracklib crypt cryptsetup cups cxx dbus dconf dri dvd eds evo exif ffmpeg filecaps flac fortran glamor gmp gnome-keyring gnome-online-accounts gnome-shell grilo gstreamer gudev hardened hwdb iconv icu introspection iptc ipv6 jit jpeg justify keymap laptop lcms ldap libnotify libsamplerate libsecret lirc lz4 lzma lzo mad matroska modules mp3 mpeg mtp multilib nautilus ncurses netlink networkmanager nfs nls nntp nptl nsplugin ntp ogg opengl openmp orc pam pax_kernel pcre pcsc-lite pdf pie pkcs11 playlist png policykit pulseaudio readline realtime seccomp sendto session smartcard spell ssl ssp startup-notification svg systemd taglib tcpd telepathy theora threads tracker udev unicode upnp upnp-av urandom usb v4l v4l2 vim vim-syntax vorbis webkit x264 xattr xattrs xcb xinerama xml xmp xtpax xv xvid xvmc zeitgeist zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="auth_digest authn_file authz_groupfile dav dav_fs" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2 directory" COLLECTD_PLUGINS="apache cpu cgroups df disk interface load logfile memory network swap syslog tail write_graphite" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 f16c" 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev libinput synaptics" KERNEL="linux" L10N="en fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="intel" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

media-libs/mesa-17.0.5::gentoo was built with the following:
USE="classic dri3 egl gallium gbm gles2 llvm nptl pax_kernel pic xvmc -bindist -d3d9 -debug -gles1 -opencl -openmax -osmesa (-selinux) -vaapi -valgrind -vdpau -vulkan -wayland -xa" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="intel (-freedreno) -i915 -i965 -imx -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) (-vivante) -vmware"
Comment 18 Sleepy Mario 2017-12-09 09:07:44 UTC
Probably redudant, but still: The problem still exists when upgrading to 17.1.10 on amd64. Removing /usr/lib32/libgdm.so did work as a solution.
Comment 19 augustin 2017-12-15 04:20:33 UTC
Same problem during the upgrade to 17.1.10 (stable amd64):
media-libs/mesa-17.1.10 [17.0.6] USE="-unwind%"

I didn't have any  /usr/lib/libgdm.so to remove.
simply removing /usr/lib/libEGL.so was not enough. Instead, I copied the new ones manually from the working directory as described here:
http://linux.overshoot.tv/ticket/14519#comment-820 
reemerging then worked.

It is a cumbersome workaround. Unfortunately, I am not knowledgeable enough to offer a proper fix.
Comment 20 Alex 2017-12-16 09:07:02 UTC
Same bug here for upgrade to mesa-17.1.10
Comment 21 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-12-17 11:24:07 UTC
*** Bug 641232 has been marked as a duplicate of this bug. ***
Comment 22 Nathan 2017-12-17 22:42:32 UTC
I experienced this bug with an upgrade to mesa-17.1.10
I verified that mesa was not in my world file and exited X then I resolved it with:
emerge -aC media-libs/mesa
emerge -a1 media-libs/mesa
Comment 23 Nathan Dehnel 2017-12-18 03:28:35 UTC
Unmerging did not work and now I don't have a functioning mesa installed on my system.
Comment 24 augustin 2017-12-18 06:08:28 UTC
@Nathan Dehnel 
Check the link in comment #19.
It's a cumbersome procedure, but your system is always in a working order. I did this without exiting KDE.
Comment 25 Nathan Dehnel 2017-12-18 18:44:14 UTC
(In reply to augustin from comment #24)
> @Nathan Dehnel 
> Check the link in comment #19.
> It's a cumbersome procedure, but your system is always in a working order. I
> did this without exiting KDE.

I didn't have any libraries in the working directory at the specified locations to copy over.
Comment 26 gentoolinux 2017-12-28 13:53:05 UTC
I had the same error when upgrading from mesa-17.0.6 to version 17.2.7. I did an "emerge -e @world", however this did not help. After manually removing /usr/lib{32,64}/libgbm.so* mesa compiled fine.
Comment 27 Alex 2017-12-29 16:57:47 UTC
(In reply to gentoolinux from comment #26)
> I had the same error when upgrading from mesa-17.0.6 to version 17.2.7. I
> did an "emerge -e @world", however this did not help. After manually
> removing /usr/lib{32,64}/libgbm.so* mesa compiled fine.

This worked for me too (i.e. mesa now builds)
Comment 28 Matt Turner gentoo-dev 2018-11-29 05:17:38 UTC
All versions in tree now use Meson (and thus not libtool).