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

Bug 760546

Summary: media-libs/mesa-20.2.4 - ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.got2+0x4): undefined reference to `gbm_dri_backend'
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED WONTFIX    
Severity: normal CC: jstein, leho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
emerge --info

Description ernsteiswuerfel archtester 2020-12-17 22:28:17 UTC
Created attachment 678640 [details]
build.log

Discovered that during tatt testing when building with these flags:

USE='-X -classic -dri3 -egl gallium gbm -gles1 -gles2 -osmesa -unwind -valgrind -vulkan -vulkan-overlay -wayland -xa -zink zstd' failed for =media-libs/mesa-20.2.4


[...]
[79/268] powerpc-unknown-linux-gnu-gcc  -o src/gbm/libgbm.so.1.0.0 src/gbm/libgbm.so.1.0.0.p/main_backend.c.o src/gbm/libgbm.so.1.0.0.p/main_gbm.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgbm.so.1 -Os -mcpu=7450 -pipe -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu src/loader/libloader.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libxmlconfig.a -Wl,--gc-sections /usr/lib/libwayland-server.so -ldl -pthread /usr/lib/libz.so -latomic -lm /usr/lib/libexpat.so /usr/lib/libdrm.so -latomic /usr/lib/libzstd.so -latomic -Wl,--end-group
FAILED: src/gbm/libgbm.so.1.0.0 
powerpc-unknown-linux-gnu-gcc  -o src/gbm/libgbm.so.1.0.0 src/gbm/libgbm.so.1.0.0.p/main_backend.c.o src/gbm/libgbm.so.1.0.0.p/main_gbm.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgbm.so.1 -Os -mcpu=7450 -pipe -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu src/loader/libloader.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/util/libxmlconfig.a -Wl,--gc-sections /usr/lib/libwayland-server.so -ldl -pthread /usr/lib/libz.so -latomic -lm /usr/lib/libexpat.so /usr/lib/libdrm.so -latomic /usr/lib/libzstd.so -latomic -Wl,--end-group
/usr/lib/gcc/powerpc-unknown-linux-gnu/9.3.0/../../../../powerpc-unknown-linux-gnu/bin/ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.got2+0x4): undefined reference to `gbm_dri_backend'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: media-libs/mesa-20.2.4::gentoo failed (compile phase):
Comment 1 ernsteiswuerfel archtester 2020-12-17 22:28:46 UTC
Created attachment 678643 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2021-01-23 19:33:15 UTC
Had a 2nd look at the bug. It is reproducible and happens when building with -egl. Same build succeeds wenn building with +egl.

So it's about the 'egl' USE-flag and can occur on a non-desktop profile or when no deps requiring +egl are installed (e.g. cairo). I guess it won't happen on a desktop profile where mesa states it requires +egl and the USE-flag combination tatt created will not run in this bug 'cause it won't start building.
Comment 3 Tom Gillespie 2021-05-30 11:13:22 UTC
I'm seeing something similar on musl hardened when building against 21.0.3, however 20.3.5 works, so maybe that can be used as a way to figure out what is going wrong?
Comment 4 Matt Turner gentoo-dev 2021-12-05 22:39:27 UTC
IUSE=gbm is gone, gbm is always enabled now.