Closed JuliDi closed 1 year ago
This probably related to rust-bindgen 0.52 features changes. PR #20 should already fixed it, but I don't have macOS to verify.
Looks like this has been fixed
tom@mini rust-soapysdr % brew install llvm
Warning: llvm 16.0.6 is already installed and up-to-date.
To reinstall 16.0.6, run:
brew reinstall llvm
tom@mini rust-soapysdr % ls /Library/Developer/CommandLineTools/usr/lib/libclang.dylib
/Library/Developer/CommandLineTools/usr/lib/libclang.dylib
tom@mini rust-soapysdr % cargo clean
tom@mini rust-soapysdr % cargo build
Compiling memchr v2.5.0
...
Compiling cexpr v0.6.0
Compiling soapysdr-sys v0.7.4 (/Users/tom/rust-soapysdr/soapysdr-sys)
Compiling soapysdr v0.3.2 (/Users/tom/rust-soapysdr)
Finished dev [unoptimized + debuginfo] target(s) in 6.21s
tom@mini rust-soapysdr % export DYLD_LIBRARY_PATH=/Library/Developer/CommandLineTools/usr/lib/ cargo build
tom@mini rust-soapysdr % echo $?
0
tom@mini rust-soapysdr % cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
tom@mini rust-soapysdr % uname -a
Darwin mini 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:01:02 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8112 arm64
Xcode Version 14.3.1 (14E300c)
Hi,
apparently there are linker errors when trying to compile this on macOS. However, there seems to be a solution that I would like to share here – in case anyone else is trying the same thing:
$ brew install llvm
libclang
is available at/Library/Developer/CommandLineTools/usr/lib/libclang.dylib
. Runningcargo build
now unfortunately gives the following error:Caused by: process didn't exit successfully:/rust-soapysdr/target/debug/build/soapysdr-sys-a03975fe81e5e189/build-script-build
Reason: image not found
/Users/<user>/rust-soapysdr/target/debug/build/soapysdr-sys-a03975fe81e5e189/build-script-build
(signal: 6, SIGABRT: process abort signal) --- stderr dyld: Library not loaded: @rpath/libclang.dylib Referenced from: /Users/