Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917137 - www-client/firefox-119.0.1 building on musl: x86_64-gentoo-linux-musl-ld.lld: error: unknown argument '--real-linker'
Summary: www-client/firefox-119.0.1 building on musl: x86_64-gentoo-linux-musl-ld.lld:...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-10 19:46 UTC by topological-automata
Modified: 2023-11-24 05:06 UTC (History)
0 users

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


Attachments
emerge --info (emerge-info,21.96 KB, text/plain)
2023-11-10 19:49 UTC, topological-automata
Details
build.log copied from the gist (gistfile0.txt.xz,393.68 KB, application/x-xz)
2023-11-11 05:22 UTC, Greg Kubaryk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description topological-automata 2023-11-10 19:46:39 UTC
tried to build firefox on my llvm+musl system, but it does not compile, spitting out this error:

x86_64-gentoo-linux-musl-ld.lld: error: unknown argument '--real-linker'
I have no clue what else to write, if you need more context I will provide it presto!
attached are the build.log and emerge --info
Comment 1 topological-automata 2023-11-10 19:49:49 UTC
Created attachment 874488 [details]
emerge --info
Comment 2 topological-automata 2023-11-10 19:50:52 UTC
here's the actual build.log:
I had to use a github gist because it was too big and compression did not help
https://gist.github.com/formula-spectre/dcccdf6a89aec88ef2d5c14d1526c689
Comment 3 Paul Zander 2023-11-10 22:04:16 UTC
This came from #gentoo. A bit extra info we collected.

Shortly before the failing call `build/unix/elfhack/x86_64-gentoo-linux-musl-ld.lld` was build.

The failing call contains:
> -Wl,--real-linker,/usr/bin/x86_64-gentoo-linux-musl-ld.lld  
> -fuse-ld=lld
Set in the configure phase is:
> --with-toolchain-prefix=x86_64-gentoo-linux-musl-

From this we had the user run
> # /var/tmp/notmpfs/portage/www-client/firefox-119.0.1/work/firefox_build/build/unix/elfhack/x86_64-gentoo-linux-musl-ld.lld --real-linker,/usr/bin/x86_64-gentoo-linux-musl-ld.lld
> could not determine output file 
> 
> # /usr/bin/x86_64-gentoo-linux-musl-ld.lld --real-linker,/usr/bin/x86_64-gentoo-linux-musl-ld.lld 
> /usr/bin says x86_64-gentoo-linux-musl-ld.lld: error: unknown argument '--real-linker,/usr/bin/x86_64-gentoo-linux-musl-ld.lld'

Which suggests build/unix/elfhack/x86_64-gentoo-linux-musl-ld.lld is never called and instead the system ld.lld is used, maybe due to the toolchain-prefix.

We are waiting on a call with LDFLAGS="-Wl,-O1 -Wl,--as-needed -v" to confirm.
Comment 4 Greg Kubaryk 2023-11-11 05:22:22 UTC
Created attachment 874492 [details]
build.log copied from the gist
Comment 5 topological-automata 2023-11-24 05:06:45 UTC
hey sorry for the delayed response, but even though i've CCed me, and in my settings I have all kind of emails enabled, i do not get emails when someone comments. I invoke your mercy!
https://gist.github.com/formula-spectre/2312507bbb6895408a8c4fd85faafae9
this is the build.log with `LDFLAGS="-Wl,-O1 -Wl,--as-needed -v"`
what I did was:
```
export LDFLAGS="-Wl,-O1 -Wl,--as-needed -v"
emerge firefox
```
hope I did the right thing! and again, sorry! i'll try to get the email thing fixed asap. OT but is there someone I can contact for this?