Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 843140 - x11-base/xorg-server-21.1.3-r2 build failure presumably due to libmad.a needing -fPIC
Summary: x11-base/xorg-server-21.1.3-r2 build failure presumably due to libmad.a needi...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-07 12:38 UTC by LAP
Modified: 2022-05-07 18:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge--info.txt (emerge--info.txt,6.98 KB, text/plain)
2022-05-07 12:39 UTC, LAP
Details
xorg-server-21.1.3 build log bz2 compressed (x11-base:xorg-server-21.1.3-r2:20220507-115753.log.bz2,21.98 KB, application/octet-stream)
2022-05-07 12:44 UTC, LAP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LAP 2022-05-07 12:38:34 UTC
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.
Comment 1 LAP 2022-05-07 12:39:24 UTC
Created attachment 777266 [details]
emerge--info.txt
Comment 2 LAP 2022-05-07 12:44:36 UTC
Created attachment 777269 [details]
xorg-server-21.1.3 build log bz2 compressed

BZIP2 compressed build log
Comment 3 Matt Turner gentoo-dev 2022-05-07 16:56:18 UTC
> /usr/local/lib64/libmd.a

This is something you installed manually, not with portage. It's in /usr/local.

I think this is invalid.
Comment 4 LAP 2022-05-07 18:20:37 UTC
(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.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-07 18:46:42 UTC
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/