Giter Club home page Giter Club logo

Comments (4)

bholley avatar bholley commented on May 26, 2024

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.

fitzgen avatar fitzgen commented on May 26, 2024

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.

fitzgen avatar fitzgen commented on May 26, 2024

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.

fitzgen avatar fitzgen commented on May 26, 2024

Aha! Doing a cargo clean and then trying again seemed to do the trick!

from rust-bindgen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.