Skip to content

Problems building on Arch Linux - undefined reference to `clang_CXXMethod_isDeleted' etc. #8

Open
@expenses

Description

@expenses

Hi! I started looking into babble to build the rust bindings for USD but I ran into an error during the linking step of cargo test. Here's the output with the long compilation commands edited down:

warning: `bbl-write` (lib) generated 1 warning
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustc1JiFUq/symbols.o" <snip>
  = note: /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxx_method_is_deleted':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:311: undefined reference to `clang_CXXMethod_isDeleted'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_default_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:387: undefined reference to `clang_CXXRecord_needsImplicitDefaultConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:391: undefined reference to `clang_CXXRecord_needsImplicitCopyConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:395: undefined reference to `clang_CXXRecord_needsImplicitMoveConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:399: undefined reference to `clang_CXXRecord_needsImplicitCopyAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:403: undefined reference to `clang_CXXRecord_needsImplicitMoveAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_destructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:407: undefined reference to `clang_CXXRecord_needsImplicitDestructor'
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

warning: `bbl-extract` (lib test) generated 4 warnings (3 duplicates)
error: could not compile `bbl-extract` due to previous error; 4 warnings emitted
warning: build failed, waiting for other jobs to finish...
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustcRS7Qts/symbols.o" <snip>
  = note: /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxx_method_is_deleted':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:311: undefined reference to `clang_CXXMethod_isDeleted'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_default_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:387: undefined reference to `clang_CXXRecord_needsImplicitDefaultConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:391: undefined reference to `clang_CXXRecord_needsImplicitCopyConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:395: undefined reference to `clang_CXXRecord_needsImplicitMoveConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:399: undefined reference to `clang_CXXRecord_needsImplicitCopyAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:403: undefined reference to `clang_CXXRecord_needsImplicitMoveAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_destructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:407: undefined reference to `clang_CXXRecord_needsImplicitDestructor'
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

warning: `bbl-write` (lib test) generated 1 warning (1 duplicate)
error: could not compile `bbl-write` due to previous error; 1 warning emitted
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustcO8opIu/symbols.o" <snip>
  = note: /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxx_method_is_deleted':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:311: undefined reference to `clang_CXXMethod_isDeleted'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_default_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:387: undefined reference to `clang_CXXRecord_needsImplicitDefaultConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:391: undefined reference to `clang_CXXRecord_needsImplicitCopyConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:395: undefined reference to `clang_CXXRecord_needsImplicitMoveConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:399: undefined reference to `clang_CXXRecord_needsImplicitCopyAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:403: undefined reference to `clang_CXXRecord_needsImplicitMoveAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_destructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:407: undefined reference to `clang_CXXRecord_needsImplicitDestructor'
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `bbl-translate` due to previous error
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustcK6ZJ1n/symbols.o" <snip>
  = note: /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxx_method_is_deleted':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:311: undefined reference to `clang_CXXMethod_isDeleted'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_default_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:387: undefined reference to `clang_CXXRecord_needsImplicitDefaultConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:391: undefined reference to `clang_CXXRecord_needsImplicitCopyConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:395: undefined reference to `clang_CXXRecord_needsImplicitMoveConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:399: undefined reference to `clang_CXXRecord_needsImplicitCopyAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:403: undefined reference to `clang_CXXRecord_needsImplicitMoveAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_destructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:407: undefined reference to `clang_CXXRecord_needsImplicitDestructor'
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `bbl-translate` due to previous error
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/rustc9GulwY/symbols.o" <snip>
  = note: /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxx_method_is_deleted':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:311: undefined reference to `clang_CXXMethod_isDeleted'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_default_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:387: undefined reference to `clang_CXXRecord_needsImplicitDefaultConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:391: undefined reference to `clang_CXXRecord_needsImplicitCopyConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_constructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:395: undefined reference to `clang_CXXRecord_needsImplicitMoveConstructor'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_copy_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:399: undefined reference to `clang_CXXRecord_needsImplicitCopyAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_move_assignment':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:403: undefined reference to `clang_CXXRecord_needsImplicitMoveAssignment'
          /usr/bin/ld: /home/ashley/projects/usd-rs/babble/target/debug/deps/libbbl_clang-1fd2bf479860749d.rlib(bbl_clang-1fd2bf479860749d.2nmxxppwyxjg7au8.rcgu.o): in function `bbl_clang::cursor::Cursor::cxxrecord_needs_implicit_destructor':
          /home/ashley/projects/usd-rs/babble/bbl-clang/src/cursor.rs:407: undefined reference to `clang_CXXRecord_needsImplicitDestructor'
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `bbl-write` due to previous error

This happens regardless of what I set the CLANG_EXECUTABLE, LLVM_CONFIG_PATH and LLVM_ROOT environment variables to. I do have Clang and LLVM 15 installed, but downloading and setting the environment variables to the Clang/LLVM 14 binaries didn't help. Perhaps I need to set something to point to the Clang 14 headers instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions