xorg-server-21.1.3-r2 emerge fails with the following error in the log: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: error: /usr/local/lib64/libmd.a(sin.o): requires dynamic R_X86_64_PC32 reloc against 'PIO4' which may overflow at runtime; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: error: /usr/local/lib64/libmd.a(floor.o): requires unsupported dynamic reloc 11; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.gold: error: /usr/local/lib64/libmd.a(mtherr.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC My system is built with "gcc -pie" and this may also be a cause. The complete build log and emerge --info are attached.
Created attachment 777266 [details] emerge--info.txt
Created attachment 777269 [details] xorg-server-21.1.3 build log bz2 compressed BZIP2 compressed build log
> /usr/local/lib64/libmd.a This is something you installed manually, not with portage. It's in /usr/local. I think this is invalid.
(In reply to Matt Turner from comment #3) > > /usr/local/lib64/libmd.a > > This is something you installed manually, not with portage. It's in > /usr/local. > > I think this is invalid. > You are correct. The "usr/local/lib64/libmd.a" is from the CEPHES math package that I built myself: https://github.com/jeremybarnes/cephes It has the same name as the libmd library from Gentoo and I was not aware of this name collision. After renaming the "usr/local/lib64/libmd.a" file xorg-server was successfully emerged. I apologize for the noise but maybe it will be a good idea to point out this name conflict as it may affect others.
I don't think we have a good way of doing that for unpackaged libraries. This is why it's important to be careful with /usr/local/