-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linker rust-lld
not found
#80721
Comments
I would expect you to need to add lld = true to |
Thanks! I'll give this a go! |
That build failed after some time with:
I'll try again removing the |
Yep, |
I'm building on Arch Linux (x86_64) and I've built rust 1.49.0 with the following config.toml:
I've actually tried building it twice. Once with the above and once without the
llvm-config
lines, both give me the same problem.I'm using the latest wasm-pack, 0.9.1.
When I cd into https://github.com/rustwasm/wasm-bindgen/tree/master/examples/without-a-bundler
and run
wasm-pack build --target web
:Some person here thinks this is a problem with the rust compiler: rustwasm/wasm-pack#754 (comment)
It seems like that's true, because this thread explains what the gentoo packagers did to their rust package work around this problem:
https://bugs.gentoo.org/715348
(tldr:
sed -i '/linker:/ s/rust-lld/wasm-ld/' src/librustc_target/spec/wasm32_base.rs
)The only place I can find a file called rust-lld is
rustc-1.49.0-src/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld
after I build, but that just seems like a build artifact that never gets installed anywhere. Am I missing something special that I have to do to get rust-lld deployed/installed properly? Have I done something wrong in my config.toml file or otherwise?Note that
RUSTFLAGS="-C linker=lld" wasm-pack build --target web
works for me but
RUSTFLAGS="-C linker=wasm-ld" wasm-pack build --target web
fails with some error about something needing to be build with
-fPIC
and a warning that "creating shared libraries, with -shared, is not yet stable"Needing to override RUSTFLAGS to fix a (broken?) default linker doesn't feel like an actual solution.
The text was updated successfully, but these errors were encountered: