shekohex / flutterust

Flutter + Rust = :heart:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dyld[3986]: Library not loaded: @rpath/libclang.dylib

kushwahashiv opened this issue · comments

image

I am still getting the issue even I followed the readme instructions

Have you installed llvm? if you are on macOS brew install llvm

yes I did

I got past this by setting DYLD_FALLBACK_LIBRARY_PATH to the location containing libclang.dylib.

For example export DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CommandLineTools/usr/lib

I had the same issue.
After following @cameroncooper's advice to set DYLD_FALLBACK_LIBRARY_PATH I am now getting the following error:

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:
archive member /Users/fluffy/git/flutterust/target/x86_64-apple-ios/debug/libscrap_ffi.a(aesni-x86_64-macosx.o) 
cputype (16777228) and cpusubtype (0) does not match previous archive members cputype (16777223) and cpusubtype (3) (all members must match)

[ERROR cargo_lipo] Executing "lipo" "-create" "-output" "/Users/user/git/flutterust/target/universal/debug/libscrap_ffi.a" "/Users/user/git/flutterust/target/aarch64-apple-ios/debug/libscrap_ffi.a" "/Users/user/git/flutterust/target/x86_64-apple-ios/debug/libscrap_ffi.a" finished with error status: exit status: 1

I'm assuming this could have something to do with running on an M1...

I had the same issue. After following @cameroncooper's advice to set DYLD_FALLBACK_LIBRARY_PATH I am now getting the following error:

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:
archive member /Users/fluffy/git/flutterust/target/x86_64-apple-ios/debug/libscrap_ffi.a(aesni-x86_64-macosx.o) 
cputype (16777228) and cpusubtype (0) does not match previous archive members cputype (16777223) and cpusubtype (3) (all members must match)

[ERROR cargo_lipo] Executing "lipo" "-create" "-output" "/Users/user/git/flutterust/target/universal/debug/libscrap_ffi.a" "/Users/user/git/flutterust/target/aarch64-apple-ios/debug/libscrap_ffi.a" "/Users/user/git/flutterust/target/x86_64-apple-ios/debug/libscrap_ffi.a" finished with error status: exit status: 1

I'm assuming this could have something to do with running on an M1...

Yeah, maybe, I have not test it on M1 machine before, but you will need to build the lib for aarch64 or arm basically, instead of x86_64

🤔 Could you point me to where and what I would have to change?