You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building a Rust crate containing a C library using a custom, dynamically-linked clang specified via the CC environment variable fails on macOS with a "symbol not found" error, apparently because the system loads libLLVM.dylib from the Rustup-installed toolchain rather than the custom installation:
cargo:warning=dyld: lazy symbol binding failed: Symbol not found: __ZN4llvm9DIBuilder17createCompileUnitEjPNS_6DIFileENS_9StringRefEbS3_jS3_NS_13DICompileUnit17DebugEmissionKindEybbb
cargo:warning= Referenced from: /Users/myk/rust-c-library-testcase/clang/bin/clang-7
cargo:warning= Expected in: /Users/myk/.rustup/toolchains/stable-x86_64-apple-darwin/lib/libLLVM.dylib
Steps
Clone testcase repo: git clone https://github.com/mykmelez/rust-c-library-testcase.git && cd rust-c-library-testcase
Problem
Building a Rust crate containing a C library using a custom, dynamically-linked clang specified via the
CC
environment variable fails on macOS with a "symbol not found" error, apparently because the system loads libLLVM.dylib from the Rustup-installed toolchain rather than the custom installation:Steps
git clone https://github.com/mykmelez/rust-c-library-testcase.git && cd rust-c-library-testcase
curl -O https://taskcluster-artifacts.net/I36Um3guQMyU-HWz_tnG0Q/0/public/build/clang.tar.xz && tar xf clang.tar.xz
CC=clang/bin/clang cargo build
Notes
Output of
cargo version
: cargo 1.33.0 (f099fe9 2019-02-12)This appears to have regressed between Rust nightly build 2019-01-06 and 2019-01-07 (68fe5182c...b92552d55):
See https://bugzilla.mozilla.org/show_bug.cgi?id=1536486 for an example of the issue in a project that uses a custom, dynamically-linked clang when building for Android targets.
The text was updated successfully, but these errors were encountered: