-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Bootstrap fails due to system LLVM libffi link error #34486
Comments
In-tree, we configure LLVM without |
Yup, the LLVM I was bootsrapping against was clearly built with |
Running into the same isse. Shouldn't llvm-config output this requirement? Btw for anyone reading this: a quick fix is to add:
to |
I'm also experiencing this on x86_64 Ubuntu 16.04 using the |
The title should be edited then, and btw, the quickest non-permanent solution looks like this: |
It seems this is a duplicate of #29694 |
Recently, I have been annoyed by this a lot. I've been boostraping rustc against system llvm a lot in different Docker containers and I have to remember to apply @jethrogb patch/fix to every rust branch/worktree I work on and then I have to be careful to not commit this fix to the branch I'm working on. 😞 Could we simply commit @jethrogb's fix into master? I tested bootstrapping rust against our llvm fork with that fix merged into master (5a5736d) and at least, on Linux, it bootstraped without problems. P.S. @petevine's RUSTFLAGS solution didn't work for me. |
@japaric That's all there's to it, and it definitely works for the |
This is of course not intentional, and fixes are always welcome! The trick here is detecting whether we're building against an LLVM that needs libffi. For example the in-tree LLVM doesn't and we shouldn't link to it as a result. |
FWIW, Fedora's LLVM is built with FFI, but this is usually fine because |
IOW I blame |
@cuviper Regarding 'choose shared over static llvm': Relevant llvm commit explains it: llvm-mirror/llvm@93083d4 Doesn't fix this bug here, external llvm + ffi enabled + intentionally linking llvm static libs still triggers it, just thought it would be nice to know. (BTW, the ffi-issue seems to be sort of a known shortcoming of |
@userwithuid Thanks, I wasn't aware of that! I'll try that out, and maybe we should expose those explicit link options somehow too. |
Please tell me the current situation; rustbuild is enabled by default, the old workarounds may not work. |
Yeah, last time I tried it didn't even build due to some completely unfamiliar link errors. (edit: I meant exactly this) If it's still a problem in the new build system, please open a more specific issue. |
I'm quite sure that this is still a problem; please don't blindly close it. |
Yes this should remain open. @MagaTailor I don't understand what you mean, this issue is quite specific. |
I went ahead and filed a new bug 39880. |
@csmoe Is this an issue again in post 1.31.1 releases? I have version 1.31.1 installed and did not see this issue when compiling rust against system llvm 7.0.1. |
@Hussamt IIRC it was only an issue with linking external LLVM statically, and even then only if that build is configured with
... missing Our official Fedora rust builds are linked dynamically ( |
Triage: this seems to still be an issue today: https://github.com/llvm-mirror/llvm/blob/2c4ca6832fa6b306ee6a7010bfb80a3f2596f824/tools/llvm-config/llvm-config.cpp#L705 |
@jyn514 FYI that linked comment is not the problem. |
Trying to bootstrap rust on
aarch64
Linux using--llvm-root
fails:For some reason the correct llvm configuration is not being detected and
-lffi
has to be passed manually for the bootstrap to succeed.The text was updated successfully, but these errors were encountered: