Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 808996 - sys-devel/binutils-2.36.1: musl libc build failure relocation R_MIPS_26 against `a local symbol' cannot be used when making a shared object
Summary: sys-devel/binutils-2.36.1: musl libc build failure relocation R_MIPS_26 again...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: MIPS Linux
: Normal normal (vote)
Assignee: MIPS Porters
URL:
Whiteboard:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2021-08-19 05:29 UTC by Joshua Kinard
Modified: 2021-08-22 11:18 UTC (History)
4 users (show)

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


Attachments
Build failure when binutils-2.36.1 tries to rebuild itself under MIPS musl libc (mips-musl-binutils_2.36-rebuild-fail-relocation-fpic-20210819.txt,51.53 KB, text/plain)
2021-08-19 05:29 UTC, Joshua Kinard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2021-08-19 05:29:27 UTC
Created attachment 734005 [details]
Build failure when binutils-2.36.1 tries to rebuild itself under MIPS musl libc

I'm making this bug really for documentation and as a reminder to myself to close out once binutils-2.37 is unmasked for archs and I get it fully tested on all of my MIPS targets.

Core issue is on a MIPS big-endian target under musl libc, it is possible to build sys-devel/binutils-2.36.1* without issue, PROVIDED the current binutils version is <2.36.  When 2.36.1 tries to rebuild itself, it will fail with a large number of "relocation R_MIPS_26" errors.  A quick test with building sys-devel/binutils-2.37 using binutils-2.35.2, then using that binutils-2.37 to rebuild itself succeeds, implying that whatever the issue was, was caught and fixed in 2.37.  I'm not too inclined to try and find a backport back to 2.36.1 since 2.37 is out and we can just move directly to that version.

There's a ton of build failures, so see the attached TXT file for the gory details.

glibc-based MIPS big-endian userlands are unaffected.
Comment 1 tt_1 2021-08-20 15:15:20 UTC
have you seen this on any other arch with musl?
Comment 2 Joshua Kinard gentoo-dev 2021-08-20 15:29:37 UTC
(In reply to tt_1 from comment #1)
> have you seen this on any other arch with musl?

Nope, I only test musl on MIPS architecture, primarily older SGI systems, which predate the newer MIPS32rX/MIPS64rx platforms.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-20 20:59:59 UTC
If you can, please avoid truncating build logs (upload the full thing, but you can give a snippet in the comments/description) and provide emerge --info.
Comment 4 Joshua Kinard gentoo-dev 2021-08-21 02:01:24 UTC
(In reply to Sam James from comment #3)
> If you can, please avoid truncating build logs (upload the full thing, but
> you can give a snippet in the comments/description) and provide emerge
> --info.

There is nothing else in the build log that would have added any value, trust me.  If there was, I would have included it as well, or depending on how bad the failure was, the entire thing.

Unfortunately for emerge --info, I already jettisoned that chroot.  My bad there.  In any event, I really only opened this bug to document the error in case anyone else stumbled across it.  I suspect it's something in binutils-2.36 that got fixed in binutils-2.37 upstream.  It looks like 2.37_p1 got unmasked today, so once I get some testing done over the weekend, I will probably close this bug.
Comment 5 Matt Turner gentoo-dev 2021-08-21 02:17:13 UTC
(In reply to Joshua Kinard from comment #4)
> (In reply to Sam James from comment #3)
> > If you can, please avoid truncating build logs (upload the full thing, but
> > you can give a snippet in the comments/description) and provide emerge
> > --info.
> 
> There is nothing else in the build log that would have added any value,
> trust me.  If there was, I would have included it as well, or depending on
> how bad the failure was, the entire thing.

You're not the maintainer of the package. You don't get to make that determination.
Comment 6 tt_1 2021-08-21 10:14:46 UTC
unable to confirm on armv7a-unknown-linux-musleabihf
Comment 7 tt_1 2021-08-22 11:18:44 UTC
(In reply to tt_1 from comment #6)
> unable to confirm on armv7a-unknown-linux-musleabihf

unable to confirm on aarch64-gentoo-linux-musl