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

Libclang on m1 mac #763

Closed
bayou-brogrammer opened this issue Jul 21, 2021 · 3 comments
Closed

Libclang on m1 mac #763

bayou-brogrammer opened this issue Jul 21, 2021 · 3 comments

Comments

@bayou-brogrammer
Copy link

I am using a m1 mac and I am getting a weird issue with libclang. If I run clang -v I get:

Homebrew clang version 12.0.1
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

but running cargo build It fails on gdnative-sys v0.9.3

error: failed to run custom build command for `gdnative-sys v0.9.3`

Caused by:
  process didn't exit successfully: `/Users/jlecoq/projects/rust/godot/rpg-tutorial-rust/scripts/target/debug/build/gdnative-sys-e00466714c237275/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/local/Cellar/llvm/12.0.1/lib/libclang.dylib could not be opened: dlopen(/usr/local/Cellar/llvm/12.0.1/lib/libclang.dylib, 5): no suitable image found.  Did find:\n\t/usr/local/Cellar/llvm/12.0.1/lib/libclang.dylib: mach-o, but wrong architecture\n\t/usr/local/Cellar/llvm/12.0.1/lib/libclang.dylib: stat() failed with errno=20"', /Users/jlecoq/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/bindgen-0.56.0/src/lib.rs:1922:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

It says it found libclang, but in a different arch

@Bromeon
Copy link
Member

Bromeon commented Jul 21, 2021

Possibly related: #742

@Bromeon Bromeon added this to the v0.10.1 milestone Nov 1, 2021
@Hexorg
Copy link
Contributor

Hexorg commented Jul 17, 2022

Not sure if libraries got updates since this was reported, but my standard rust environment (rustup) was enough to build and run Godot-rust just fine on M1:

cargo 1.61.0 (a028ae42f 2022-04-29)
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@Bromeon
Copy link
Member

Bromeon commented Jul 17, 2022

Thanks a lot for checking @Hexorg!

I'll close this issue then -- if more problems appear, we can reopen it.

@Bromeon Bromeon closed this as completed Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants