Wasm-pack: linker `rust-lld` not found

Created on 3 Apr 2019  ·  7Comments  ·  Source: rustwasm/wasm-pack

🐛 Bug description

On the latest version of rust nightly, attempting to run wasm-pack build fails with the following error:

error: linker `rust-lld` not found
  |
  = note: The system cannot find the file specified. (os error 2)

error: aborting due to previous error

cargo build on the other hand does produce output.

🌍 Your environment

wasm-pack version: 0.8.0
rustc version: rustc 1.35.0-nightly (428943cc2 2019-04-02)

needs reproduction user report

Most helpful comment

I suspect this is likely an upstream rust-lang/rust issue at https://github.com/rust-lang/rust/issues/59661 which is being fixed at https://github.com/rust-lang/rust/pull/59672

All 7 comments

i'm working on reproducing this right now! thanks for the bug report @ZacLiveEarth - were you able to try other rust nightlies? it may be that this is a bug in nightly and not in wasm-pack. additionally, you can feel free to use stable for wasm-pack :) (just in case you didn't know)

ag-dubss-MacBook-Pro:hello-wasm ag_dubs$ wasm-pack build
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: 🌀  Compiling to Wasm...
   Compiling proc-macro2 v0.4.27
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.29
   Compiling wasm-bindgen-shared v0.2.39
   Compiling cfg-if v0.1.7
   Compiling bumpalo v2.1.0
   Compiling lazy_static v1.3.0
   Compiling wasm-bindgen v0.2.39
   Compiling log v0.4.6
   Compiling quote v0.6.11
   Compiling wasm-bindgen-backend v0.2.39
   Compiling wasm-bindgen-macro-support v0.2.39
   Compiling wasm-bindgen-macro v0.2.39
   Compiling console_error_panic_hook v0.1.6
   Compiling hello-wasm v0.1.0 (/Users/ag_dubs/OpenSource/rustwasm/hello-wasm)
    Finished release [optimized] target(s) in 31.71s
[INFO]: ⬇️  Installing wasm-bindgen...
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
[INFO]: ✨   Done in 32.02s
[INFO]: 📦   Your wasm pkg is ready to publish at ./pkg.
ag-dubss-MacBook-Pro:hello-wasm ag_dubs$ rustc --version
rustc 1.35.0-nightly (428943cc2 2019-04-02)

i was not able to reproduce. can you tell us more about your system @ZacLiveEarth ?

I am on a Windows machine, I see you are on a Mac. Also, I see from the compilation logs there that you are dependent on wasm-bindgen 0.2.39, I am using 0.2.40. Anything else you would like to know?

Also, I need nightly because I rely on alloc. I wish there were a way to opt into experimental features without being on nightly, but alas.

that's great info @ZacLiveEarth - thanks! i'll let you know and do my best to reproduce!

I suspect this is likely an upstream rust-lang/rust issue at https://github.com/rust-lang/rust/issues/59661 which is being fixed at https://github.com/rust-lang/rust/pull/59672

thanks @alexcrichton !

This is working now on the latest nightly of rust. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xtuc picture xtuc  ·  5Comments

mgattozzi picture mgattozzi  ·  4Comments

ishitatsuyuki picture ishitatsuyuki  ·  5Comments

grovesNL picture grovesNL  ·  4Comments

Outpox picture Outpox  ·  4Comments