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

M1 arm64 support #223

Closed
HerrMuellerluedenscheid opened this issue Nov 29, 2021 · 2 comments
Closed

M1 arm64 support #223

HerrMuellerluedenscheid opened this issue Nov 29, 2021 · 2 comments

Comments

@HerrMuellerluedenscheid
Copy link

HerrMuellerluedenscheid commented Nov 29, 2021

Hey, I compiling the simple-extension example on a MacBookAir with arm M1 chip and failed because of the architecture. The error stack finishes with:

ld: symbol(s) not found for architecture arm64
   clang: error: linker command failed with exit code 1 (use -v to see invocation)

Does anybody have an idea how to compile on apples silicon?

Best regards

@davidhewitt
Copy link
Member

The discussion in PyO3/pyo3#1800 may give you clues?

@HerrMuellerluedenscheid
Copy link
Author

The discussion in PyO3/pyo3#1800 may give you clues?

Yes thanks!

TLDR: Create a file .cargo/config.toml in the project (or $HOME/.cargo/config.toml) folder with the following settings:

[target.aarch64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]

Then build as usual:

cargo build

Tested with rustc version is rustc 1.59.0-nightly (efec54529 2021-12-04)

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