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

can't compile minimal example for wasm32-unknown-unknown #197

Closed
flosse opened this issue Apr 9, 2018 · 4 comments
Closed

can't compile minimal example for wasm32-unknown-unknown #197

flosse opened this issue Apr 9, 2018 · 4 comments

Comments

@flosse
Copy link

flosse commented Apr 9, 2018

cargo web build --target wasm32-unknown-unknown --verbose

produces error: linking with lld failed: exit code: 1 and = note: Unknown flavor: wasm.

  • rustc 1.27.0-nightly (056f589fb 2018-04-07)
  • cargo 1.26.0-nightly (b70ab13b3 2018-04-04)
  • cargo-web 0.6.10
  • stdweb ab96eb1
@koute
Copy link
Owner

koute commented Apr 9, 2018

Works for me; I'm using the same versions of everything as you do.

What's your OS?

And does this reproduce when you build with vanilla cargo? (The resuling artifacts will be useless, but it should link properly.)

Can you try to delete the examples/target directory and try again?

@flosse
Copy link
Author

flosse commented Apr 9, 2018

What's your OS?

NixOS

And does this reproduce when you build with vanilla cargo? (The resuling artifacts will be useless, but it should link properly.)

Here's the same issue :(

Can you try to delete the examples/target directory and try again?

It's the same. Probably it's an issue with NixOS but which one?

@koute
Copy link
Owner

koute commented Apr 10, 2018

My guess would be that either:

a) the Rust's copy of LLD on NixOS was inadvertently built without WASM support,
b) or Rust on NixOS uses system LLD which was build without WASM support

You might want to try to install Rust through rustup (although I don't know if that's possible on NixOS?) and see if it reproduces too.

If it's really a NixOS-specific report then reporting a bug on NixOS bug tracker would be appropriate here.

@flosse
Copy link
Author

flosse commented Apr 11, 2018

You might want to try to install Rust through rustup (although I don't know if that's possible on NixOS?) and see if it reproduces too.

rustup didn't work for while in NixOS but I just tried it again an it seems to work :)
Thanks for your help!

@flosse flosse closed this as completed Apr 11, 2018
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