Comments (4)
If you're missing cursor visibility, that means you're not linking against LLVM 38. Did you set up your clang path?
from rust-bindgen.
I tried building like this:
$ LIBCLANG_PATH=/usr/local/Cellar/llvm38/3.8.0/lib/ cargo build --features llvm_stable
Same cursor link error.
I also tried reverting the latest PR merge to get the llvm lib dir searching again, and that did not work either.
from rust-bindgen.
Also just tried this variation:
$ export LIBCLANG_PATH=`brew --prefix llvm38`/lib/llvm-3.8/lib;
$ echo $LIBCLANG_PATH
/usr/local/opt/llvm38/lib/llvm-3.8/lib
$ if [ -e $LIBCLANG_PATH ]; then echo yes; else echo no; fi
yes
$ cargo build --features llvm_stable
Compiling bindgen v0.16.0 (file:///Users/fitzgen/src/rust-bindgen)
error: linking with `cc` failed: exit code: 1
note: "cc" "-m64" "-L" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fitzgen/src/rust-bindgen/target/debug/bindgen.0.o" "-o" "/Users/fitzgen/src/rust-bindgen/target/debug/bindgen" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/fitzgen/src/rust-bindgen/target/debug" "-L" "/Users/fitzgen/src/rust-bindgen/target/debug/deps" "-L" "/Library/Developer/CommandLineTools/usr/lib" "-L" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib" "/Users/fitzgen/src/rust-bindgen/target/debug/libbindgen.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libaster-aa20364fcf697ecb.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libclang_sys-339b6a7941ab49bd.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libglob-0ffe4874535835d5.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libbitflags-10d625c8a1ca3e9d.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libquasi-9b17a07dc016f11f.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libsyntex_syntax-d9b67e80d0879932.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libbitflags-e87d150db0333415.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libsyntex_errors-c067eab8d7579d53.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libterm-585dc449d37783e7.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/liblog-342ffb7444a9471d.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libsyntex_pos-303d294289b89367.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/librustc_serialize-3bc953984ed46e7f.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/liblibc-87e81dcd3af1ebe2.rlib" "/Users/fitzgen/src/rust-bindgen/target/debug/deps/libunicode_xid-eb07034761892aae.rlib" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib/libstd-d16b8f0e.rlib" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib/libcollections-d16b8f0e.rlib" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib/librustc_unicode-d16b8f0e.rlib" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib/librand-d16b8f0e.rlib" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib/liballoc-d16b8f0e.rlib" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-d16b8f0e.rlib" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib/liblibc-d16b8f0e.rlib" "/Users/fitzgen/.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib/libcore-d16b8f0e.rlib" "-l" "clang" "-l" "System" "-l" "pthread" "-l" "c" "-l" "m" "-Wl,-rpath,@loader_path/../../../../.multirust/toolchains/stable/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-rpath,/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "-l" "compiler-rt"
note: Undefined symbols for architecture x86_64:
"_clang_CXXField_isMutable", referenced from:
bindgen::clang::Cursor::is_mutable_field::hd4d8240c77b7b6c9 in libbindgen.rlib(bindgen.0.o)
"_clang_getCursorVisibility", referenced from:
bindgen::clang::Cursor::visibility::h46761707eff6a2de in libbindgen.rlib(bindgen.0.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
error: Could not compile `bindgen`.
To learn more, run the command again with --verbose.
from rust-bindgen.
Aha! Doing a cargo clean
and then trying again seemed to do the trick!
from rust-bindgen.
Related Issues (20)
- bindgen cannot generate `Default` trait for enum
- how not to generate the unused pub const ?
- Edition2024: __IncompleteArrayField fn as_slice(), fn as_mut_slice() WARNINGS HOT 2
- Strip leading \brief or \short at the start of Doxygen comment HOT 3
- Bindgen does not keep documentation of #define constants
- Have some easy way to #[allow(non_camel_case_types)] (or even do it by default) HOT 1
- Allow adding extra documentation to bindgen-generated entities
- Consider using field names for anonymous types/unions HOT 1
- Case-insensitive regexes were useful
- Name for anonymous enumeration and typedef collide when their layout is different
- bindgen fails with SIGSEGV: invalid memory reference HOT 5
- Loongarch cross-compilation issue
- Publishing self-contained static executable (with bundled libclang.a) HOT 1
- How to construct the std::string variable in the generated rust HOT 2
- Feature request: use DST to represent structures with flexible array members HOT 7
- BindgenUnion can get incorrect alignment on i686 HOT 1
- feature: wrap every C function on unsafe blocks HOT 8
- docummenting of usage dynamic_library_name
- `size_t` incorrectly used when stdlib.h is included for aarch64-unknown-none HOT 4
- Workaround for atomic types
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-bindgen.