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

Getting rust-lld error with latest nightly #2487

Closed
d3lm opened this issue Mar 11, 2021 · 3 comments · Fixed by #2488
Closed

Getting rust-lld error with latest nightly #2487

d3lm opened this issue Mar 11, 2021 · 3 comments · Fixed by #2488
Labels

Comments

@d3lm
Copy link
Contributor

d3lm commented Mar 11, 2021

I tried to upgrade from 1.50.0 nightly to the latest 1.52.0 but I can't compile my crate anymore and I getting the following error:

error: linking with `rust-lld` failed: exit code: 1
  |
  = note: "rust-lld" "-flavor" "wasm" "--rsp-quoting=posix" "--shared-memory" "--max-memory=1073741824" "--import-
  = note: rust-lld: error: mutable global exported but 'mutable-globals' feature not present in inputs: `__tls_base`. Use --no-check-features to suppress.
          rust-lld: error: mutable global exported but 'mutable-globals' feature not present in inputs: `__tls_size`. Use --no-check-features to suppress.
          rust-lld: error: mutable global exported but 'mutable-globals' feature not present in inputs: `__tls_align`. Use --no-check-features to suppress.

Any idea what's causing this and how it can be fixed?

I thought it might be related to the wasm-bindgen version, and upgraded to 0.2.71 but that's not fixing it.

@d3lm d3lm added the bug label Mar 11, 2021
alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue Mar 11, 2021
The `__wasm_init_memory` function is no longer exported and we also need
to build with `+mutable-globals`.

Closes rustwasm#2487
@alexcrichton
Copy link
Contributor

LLVM 12 landed and interfaces have changed. The build flags need to be updated but a few other things need fixing as well. I'd recommending using older nightlies until things have settled.

#2488

@d3lm
Copy link
Contributor Author

d3lm commented Mar 12, 2021

Thank you! That makes a lot of sense.

alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue May 10, 2021
The `__wasm_init_memory` function is no longer exported and we also need
to build with `+mutable-globals`.

Closes rustwasm#2487
alexcrichton added a commit that referenced this issue May 10, 2021
The `__wasm_init_memory` function is no longer exported and we also need
to build with `+mutable-globals`.

Closes #2487
@d3lm
Copy link
Contributor Author

d3lm commented May 13, 2021

Yay! I see this has been merged. Awesome. Thanks @alexandrestein for your work.

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

Successfully merging a pull request may close this issue.

2 participants