-
Notifications
You must be signed in to change notification settings - Fork 45
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
Building error in Mac OS Majave #41
Comments
I have a issue to compiling croaring-sys v0.3.7 in MacBook pro (OS Mojave) when I tried to install grin (https://github.com/mimblewimble/grin/blob/master/doc/build.md) Error massage as below Compiling grin v0.5.0 (/Users/USERNAME/grin) error: failed to run custom build command for Versions of Clang, llvm, rusct is as below: clang --version llvm-gcc --version rustc --version Does anybody has a good idea to solve this? |
Hi @maromato, can you please paste the output of the following command:
Thanks! |
The failure seems related to clang/llvm version. Building with Apple's latest clang fails.
Building with clang version 7.0.1, installed via brew, reports success.
|
correction: Don't think Apple's latest clang was the issue. Turns out I had both clang 7.0.0 and 7.0.1 installed via brew. I'm guessing 7.0.0 was being used to compile against headers in I remedied the issue by running @maromato does that solve the issue for you? |
Related: mimblewimble/grin#2264 (comment) |
@bddap Thanks! I tried do |
Here's the output! Thanks, $cargo clean -p croaring-sys && cargo build -p croaring-sys -vv --- stderr |
masOS has a system default llvm(apple version), so do not use brew to install an extra one, just "brew uninstall llvm" to get rid off llvm from homebrew, you can use "brew list -l" for a double check, not re-install. If you still have the same issue, try "sudo xcode-select --switch /Applications/Xcode.app" to switch clang from command line tools to xcode.app, you will have the newest clang version. |
You have to switch the "InstalledDir" of clang from command line tools to Xcode.app, they have two different clang versions, clang under xcode will work fine. Use the following command to switch: |
@JohnsonYi @bddap Thanks! Just do |
The problem occurs during Rust binding generation. When clang bindings used come from Homebrew yet headers used for binding generation come from system (XCode). ``` [2020-03-29T16:06:49Z INFO bindgen] Clang Version: clang version 9.0.1 , parsed: Some((9, 0)) [2020-03-29T16:06:49Z DEBUG bindgen] Generating bindings, libclang at /usr/local/opt/llvm@9/lib/libclang.dylib [2020-03-29T16:06:49Z DEBUG bindgen] Trying to find clang with flags: [] [2020-03-29T16:06:49Z DEBUG bindgen] Found clang: Clang { path: "/usr/bin/clang", version: Some(CXVersion { Major: 11, Minor: 0, Subminor: 0 }), c_search_paths: Some(["/usr/local/include", "/Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include", "/Library/Developer/CommandLineTools/usr/include", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"]), cpp_search_paths: Some(["/usr/local/include", "/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1", "/Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include", "/Library/Developer/CommandLineTools/usr/include", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"]) } ``` Some related issues: #41 rust-lang/rust-bindgen#1506
No description provided.
The text was updated successfully, but these errors were encountered: