Skip to content
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

wasm-pack build failed - linker rust-lld not found #701

Closed
humb1t opened this issue Aug 18, 2019 · 1 comment
Closed

wasm-pack build failed - linker rust-lld not found #701

humb1t opened this issue Aug 18, 2019 · 1 comment

Comments

@humb1t
Copy link

humb1t commented Aug 18, 2019

🐛 Bug description

Generated from https://github.com/rustwasm/wasm-pack-template project failed to be build via wasm-pack build.

  1. stable-armv7-unknown-linux-gnueabihf unchanged - rustc 1.37.0 (eae3437df 2019-08-13) failed with:
error: linker `rust-lld` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

Which looks like #618 - but recommended fix should be already in stable.

  1. nightly-armv7-unknown-linux-gnueabihf unchanged - rustc 1.39.0-nightly (2111aed0a 2019-08-17) failed with:
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
   Compiling proc-macro2 v1.0.1
   Compiling unicode-xid v0.2.0
   Compiling log v0.4.8
   Compiling wasm-bindgen-shared v0.2.49
error: Could not compile `unicode-xid`.

Caused by:
  process didn't exit successfully: `rustc --crate-name unicode_xid /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.2.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=s --cfg 'feature="default"' -C metadata=5acb171beba6e17a -C extra-filename=-5acb171beba6e17a --out-dir /home/pi/workspace/personal/rubit-bloch/target/release/deps -L dependency=/home/pi/workspace/personal/rubit-bloch/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `log`.

Caused by:
  process didn't exit successfully: `rustc --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.8/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=s -C metadata=d93c0ccb172576c7 -C extra-filename=-d93c0ccb172576c7 --out-dir /home/pi/workspace/personal/rubit-bloch/target/release/build/log-d93c0ccb172576c7 -L dependency=/home/pi/workspace/personal/rubit-bloch/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `proc-macro2`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.1/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=s --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=c8ccb457164a0136 -C extra-filename=-c8ccb457164a0136 --out-dir /home/pi/workspace/personal/rubit-bloch/target/release/build/proc-macro2-c8ccb457164a0136 -L dependency=/home/pi/workspace/personal/rubit-bloch/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `wasm-bindgen-shared`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-shared-0.2.49/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=s -C metadata=e3d2b6c49abe4416 -C extra-filename=-e3d2b6c49abe4416 --out-dir /home/pi/workspace/personal/rubit-bloch/target/release/build/wasm-bindgen-shared-e3d2b6c49abe4416 -L dependency=/home/pi/workspace/personal/rubit-bloch/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit code: 101

🤔 Expected Behavior

Template projects should build fine on stable rust.

👟 Steps to reproduce

  1. cargo generate --git https://github.com/rustwasm/wasm-pack-template
  2. open terminal in project directory
  3. wasm-pack build

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: wasm-pack 0.8.1
rustc version: rustc 1.37.0 (eae3437df 2019-08-13)

@alexcrichton
Copy link
Contributor

Thanks for the report! At this time prebuilt rust-lld is only shipped on x86_64 platforms in rust-lang/rust. For non-x86_64 platforms you'll need to arrange for wasm-ld to be pre-installed and you'll have to configure the build to use it (likely using CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER=wasm-ld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants