-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
compilation of rustc 1.16.0 on x86_64 seems not to pick up the LLVM NVPTX library but still uses it - linking failure #40698
Comments
Your LLVM might have been built without the NVPTX backend (not all that odd, considering the relative obscurity of that backend), but we do have conditional compilation for when LLVM targets are missing. First, to ensure Rust gets the right inputs for that, can you please check:
If that is all consistent, the build script might be malfunctioning — likely candidates are the detection of available components and the fiddling with the linker arguments. |
|
So the build script correctly picks up that the NVPTX component is there, but doesn't link against the libraries despite them being in the |
How do I debug the build script? It seems that stdout is already redirected... Also, how do I invoke the build script? |
The build script is compiled and invoked by Cargo as part of the larger build process orchestrated by rustbuild. Invoking it manually will be quite challenging. First, rustbuild sets quite a few environment variables, override Instead, you might try passing |
sed -i -r "/-DLLVM_TARGETS_TO_BUILD=/s/([^=])'/\1;NVPTX'/" configure that help me build rust-1.16.0 with system llvm-3.9.1 |
Note that rustbuild is really really broken for me (cargo-"error: An unknown error occurred") so I disabled rustbuild (as can be seen above).
I have changed that. And now?
No. Passing "--on-fail=sh" to configure gives me "Option '--on-fail=sh' is not recognized". @Ledest: Thank you! But if you want I can try to figure out what went wrong instead of just patching it out. |
OHH, you're not using rustbuild. Then all my advice so far was completely off, the build script didn't even run. Sorry, I should have seen that in the configure flags. The workaround @Ledest posted looks good then. As the makefiles will be gone in the next release (and have already been removed from the |
@daym Not sure if this issue is still relevant, as today Guix bootstraps rust starting with 1.19 (1.16 isn't built anywhere). |
We don't need that version in Guix anymore. But the bug report might still be relevant for other (non-Guix) people running into the same problem with that release. But that's not for me to decide. (I respectfully suggest to close this issue after rustc 1.16.0 is not supported anymore) |
Triage: Closing since support for rustc 1.16.0 ended long ago. |
When I try to build rustc 1.16.0 on x86_64, I get
When doing the same on rustc 1.15.0 it builds and works fine.
The "configure" flags are:
llvm version is 3.8.1 (not using the bundled llvm).
The text was updated successfully, but these errors were encountered: