-
Notifications
You must be signed in to change notification settings - Fork 13.3k
error_index_generator cannot find -lLLVM-3.9 #40717
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
Comments
FWIW, everything compiles fine if I kludge in |
Hm yes I think this is an unfortunate side effect of the organization of rustbuild. Cargo propagates these flags amongst crates but these are two separate Cargo projects, so the error index generator is not receiving the appropriate I... unfortunately don't know the greatest way to solve this, other than just vendoring rustc_llvm's build script or something like that (which would be awful). |
How does it pass the |
The |
Is that through |
Nah I think it's all through the build script. I forget, but I don't think |
I just discovered this affects all proc-macro use too, even outside the compiler build itself, as those plugins link indirectly to |
So, I understand it's the build script which generates those lines:
But it seems the |
I take that back. I saw the error while testing |
* Sync from Gentoo * Add ninja support for USE=-system-llvm * Fix USE=-system-llvm / shared linking (#1) * Fix/add jemalloc dependency * Work-around linking to LLVM from crates outside of rustc_llvm (rust-lang/rust#40717)
I ran into the same issue building rustdoc_tool_binary of Rust 1.23.0 (LLVM 4.0.1 in /usr/lib/llvm/4): rust-1.23.0.build.log The work-around from #40717 (comment) got me past this issue: devurandom/gentoo-overlay@11651be#diff-d8799a17f743865c5a79e6380cddca82R148 |
FWIW, I currently deal with this by setting |
@cuviper are you still running into this today? |
I hadn't noticed because I've always done those builds with |
I'm trying to build with an external LLVM that lives in a non-standard path, but I'm getting this error:
I'm using
--llvm-root=/usr/lib64/llvm3.9
, and itsllvm-config
reports the correct search path:I don't know why
error_index_generator
is linking LLVM, but it seems to have picked up the library requirement without the library search path. I guess one of its crate dependencies is indirectly leading torustc_llvm
. However, I can see thatlibrustc_llvm-*.so
is correctly linked tolibLLVM-3.9.so
, so it must have used the right library path at that point.I do see that the build script
rustc_llvm-*/output
has both of these expected lines:cargo:rustc-link-lib=dylib=LLVM-3.9
cargo:rustc-link-search=native=/usr/lib64/llvm3.9/lib
Normally I use a more typical
--llvm-root=/usr
and it works fine, but of course the search path isn't an issue if the library is in the standard path already.Here's the verbose build output for
error_index_generator
:The text was updated successfully, but these errors were encountered: