View previous topic :: View next topic |
Author |
Message |
leyvi Guru

Joined: 08 Sep 2023 Posts: 409
|
Posted: Sun Jun 08, 2025 7:25 pm Post subject: Why is the ebuild for dev-lang/rust doing this? |
|
|
ebuild: | 538 │ if use wasm; then
539 │ wasm_target="wasm32-unknown-unknown"
540 │ export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")"
541 │ cat <<- _EOF_ >> "${S}"/config.toml
542 │ [target.wasm32-unknown-unknown]
543 │ linker = "$(usex system-llvm lld rust-lld)"
544 │ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
545 │ profiler = false
546 │ _EOF_
547 │ fi | This is part of the ebuild for dev-lang/rust. On my machine, it causes the build to fail, since the only command on my system that Rust will accept as a linker for wasm is wasm-ld. I imagine that I've misconfigured something, but what? |
|
Back to top |
|
 |
sam_ Developer


Joined: 14 Aug 2020 Posts: 2376
|
Posted: Mon Jun 09, 2025 7:01 am Post subject: |
|
|
It would help enormously to have the full build.log, emerge --info, and details of what your system/environment are. You're not new -- you know this!
As for why it does it, I don't know if it's even a problem yet -- the point there is to say "we definitely need lld in some form, not e.g. bfd/mold if using that to build Rust", but with how lld works, I would've thought that "lld" or "rust-lld" would be fine because it would pass down the needed target. It's not impossible that it's obsolete or things have changed, but without information, I don't see how we can move forward here. |
|
Back to top |
|
 |
CaptainBlood Advocate


Joined: 24 Jan 2010 Posts: 4071
|
Posted: Mon Jun 09, 2025 8:49 am Post subject: |
|
|
Side note:
dev-lang/rust[wasm] fails to build as Code: | # The following warnings were emitted during compilation:
# warning: [email protected]: clang: error: unsupported argument '-mbranches-within-32B-boundaries' to option '-Wa,' | despite gcc build configuration here.
Seems a hardcoded clang call, with CFLAGS from /etc/portage/make.conf
Workaround is to inhibit using /etc/portage/package.env
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23537
|
Posted: Mon Jun 09, 2025 12:07 pm Post subject: |
|
|
CaptainBlood wrote: | Side note:
dev-lang/rust[wasm] fails to build as | Although build failures are worth examining, I think your report is not related to OP's issue with the linker command name. Your report deserves its own thread. |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 409
|
Posted: Mon Jun 09, 2025 3:31 pm Post subject: |
|
|
Here is the full build log, but most of it's irrelevant; here are the interesting parts: Part where config.toml is generated: | 186 │ [target.wasm32-unknown-unknown]
187 │ linker = "lld"
188 │ # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
189 │ profiler = false |
Resulting error: | 237348 │ error: linker flavor `gnu-lld-cc` is incompatible with the current target
237349 │ |
237350 │ = note: compatible flavors are: wasm-lld, wasm-lld-cc, gcc, wasm-ld |
|
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23537
|
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 409
|
Posted: Fri Jun 13, 2025 12:32 pm Post subject: |
|
|
I'd be happy to try anything; I'd really like to update dev-lang/rust... |
|
Back to top |
|
 |
logrusx Advocate


Joined: 22 Feb 2018 Posts: 3056
|
Posted: Fri Jun 13, 2025 1:01 pm Post subject: |
|
|
Quote: | - - wasm : Build support for the wasm32-unknown-unknown target |
That means nothing to me. Does it mean something to you? If so what? If no, just disable the wasm use flag.
Best Regards,
Georgi |
|
Back to top |
|
 |
sam_ Developer


Joined: 14 Aug 2020 Posts: 2376
|
Posted: Fri Jun 13, 2025 1:41 pm Post subject: |
|
|
leyvi wrote: | I'd be happy to try anything; I'd really like to update dev-lang/rust... |
How about answering the questions I asked? |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 409
|
Posted: Fri Jun 13, 2025 3:14 pm Post subject: |
|
|
sam_ wrote: | leyvi wrote: | I'd be happy to try anything; I'd really like to update dev-lang/rust... |
How about answering the questions I asked? | Right, sorry I forgot to post emerge --info and the environment file, I'll send it tomorrow.
(Also: please excuse my absent-mindedness, I've been running in and out of a bunker for that last day or so.) |
|
Back to top |
|
 |
|