From the log: ... /tmp/portage/media-libs/libsdl2-2.0.14/work/SDL2-2.0.14-abi_x86_32.x86/src/thread/pthread/SDL_systhread.c:97:26: error: ‘RTLD_DEFAULT’ undeclared (first use in this function) ... /tmp/portage/media-libs/libsdl2-2.0.14/work/SDL2-2.0.14-abi_x86_32.x86/src/thread/pthread/SDL_systhread.c:261:34: error: ‘SYS_gettid’ undeclared (first use in this function) ... Reproducible: Always Steps to Reproduce: 1. Attempt to build package: emerge -p1v media-libs/libsdl2 Calculating dependencies... done! [ebuild U ] media-libs/libsdl2-2.0.14::gentoo [2.0.12-r2::gentoo] USE="X alsa dbus gles2 haptic joystick opengl pulseaudio sound threads udev video vulkan wayland xinerama (-aqua) (-custom-cflags) -fcitx4 -ibus -jack -kms -libsamplerate -nas -oss -static-libs -xscreensaver (-tslib%)" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="mmx sse sse2 -3dnow" VIDEO_CARDS="(-vc4)" 0 KiB Actual Results: package fails to build Expected Results: package builds successfully
Created attachment 680551 [details] emerge --info
Created attachment 680554 [details] media-libs:libsdl2-2.0.14:20210101-230606.log Build log for =media-libs/libsdl2-2.0.14::gentoo ...
The ebuild has a workaround for this: # libsdl2-2.0.14 build regression. Please check if still needed append-flags -D__LINUX__ However I don't see -D__LINUX__ in your build log, and it's to be expected given: * lto-overlay: append-flags OVERRIDDEN Please don't override flag-o-matic and try again. Many ebuilds use append-flags for important flags.
(In reply to Ionen Wolkens from comment #3) > The ebuild has a workaround for this: > # libsdl2-2.0.14 build regression. Please check if still needed > append-flags -D__LINUX__ > > However I don't see -D__LINUX__ in your build log, and it's to be expected > given: > * lto-overlay: append-flags OVERRIDDEN > > Please don't override flag-o-matic and try again. Many ebuilds use > append-flags for important flags. Thanks and sorry for the noise. I'll report an LTO_ENABLE_FLAGOMATIC=yes override is required for media-libs/libsdl2 Upstream. The package builds fine with that!
(In reply to Bob Wya from comment #4) > Thanks and sorry for the noise. > > I'll report an LTO_ENABLE_FLAGOMATIC=yes override is required for > media-libs/libsdl2 Upstream. > The package builds fine with that! No problem, and may want to suggest to stop overriding append-flags entirely instead. I understand the rationale for the others like strip-flags, but append-flags is really just trouble.