Skip to content

wasm compilation on M1 MBP #106178

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

Closed
cavemanloverboy opened this issue Dec 27, 2022 · 1 comment
Closed

wasm compilation on M1 MBP #106178

cavemanloverboy opened this issue Dec 27, 2022 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@cavemanloverboy
Copy link

cavemanloverboy commented Dec 27, 2022

When creating a new wasm project on an M1 Macbook Pro via.

cargo new wasm-test
cd wasm-test
cargo build --target wasm32-unknown-unknown

I get

  = note: rust-lld: error: unknown argument: -Wl,-undefined,dynamic_lookup

with or without

[lib]
crate-type = ["cdylib"]

(and an empty src/lib.rs).

I am on rustc 1.66. I have tried using the stable-x86_64-apple-darwin and stable-aarch64-apple-darwin toolchains, reinstalling rust, and updating my Xcode dev tools. I've tried getting help elsewhere to no avail so I figured I'd come here and ask or bring this up. The only relevant issue I see here is #62874 but it seems to be unresolved and the suggestion presented there doesn't fix my issue.

@cavemanloverboy cavemanloverboy added the C-bug Category: This is a bug. label Dec 27, 2022
@cavemanloverboy
Copy link
Author

cavemanloverboy commented Dec 27, 2022

I wiped and reinstalled rust on my machine and it works now, so I'm closing this.

If anyone ever runs into this:

rustup self uninstall
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant