Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927471 - dev-lang/rust: Building Anything Rust-based Fails to Compile Due to Missing -lgcc_s on musl/llvm profile
Summary: dev-lang/rust: Building Anything Rust-based Fails to Compile Due to Missing -...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Randy Barlow
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-22 06:44 UTC by Jake Winters
Modified: 2024-03-25 03:31 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Winters 2024-03-22 06:44:26 UTC
Whenever I attempt to build anything Rust-based on my musl/llvm profile system, all packages fail with the error `unable to find library -lgcc_s`.

I have uploaded an example of this with the `app-emulation/virtiofsd-1.10.0` package at https://0x0.st/XrlP.log

Reproducible: Always

Steps to Reproduce:
1. Attempt to build anything Rust-based on musl/llvm profile
2. Receive mentioned error
Actual Results:  
Received error `unable to find library -lgcc_s`.

Expected Results:  
Packages successfully build and install.
Comment 1 Jake Winters 2024-03-22 06:49:07 UTC
`emerge --info`: https://0x0.st/XrlT.txt
Comment 2 12101111 2024-03-22 07:19:38 UTC
You should add ~amd64 to ACCEPT_KEYWORDS or add `dev-lang/rust -system-llvm` to `/etc/portage/profile/package.use.mask` because `USE=system-llvm` of dev-lang/rust is masked in profiles/base/package.use.stable.mask

dev-lang/rust should enable USE="system-llvm llvm-libunwind" on musl/llvm profile.
Comment 3 Jake Winters 2024-03-22 08:25:08 UTC
(In reply to 12101111 from comment #2)
> You should add ~amd64 to ACCEPT_KEYWORDS or add `dev-lang/rust -system-llvm`
> to `/etc/portage/profile/package.use.mask` because `USE=system-llvm` of
> dev-lang/rust is masked in profiles/base/package.use.stable.mask
> 
> dev-lang/rust should enable USE="system-llvm llvm-libunwind" on musl/llvm
> profile.

I have system-wide `~amd64` already. USE=llvm-libunwind is masked for me via `(-llvm-libunwind)` regardless of my custom USE flags.
Comment 4 Mike Gilbert gentoo-dev 2024-03-24 15:01:16 UTC
No idea what to do with this bug, so giving it to llvm.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-24 15:35:38 UTC
I have no clue whether Rust hardcodes -lgcc_s (should it absurdly RDEPEND on sys-devel/gcc then?) or if there's some way to make it use compiler-rt.
Comment 6 Jake Winters 2024-03-25 03:31:48 UTC
I should clarify that Rust itself does build and install, but any packages written in Rust or using cargo libraries do not. I cannot even install cargo again at this point as it fails with the same error.