-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
cross-built compiler doesn't have the standard library for the target in its sysroot #77352
Comments
How are you building the compiler, what |
It sounds like you're using |
I know what the problem here is, currently thinking/working on a solution. |
I think this is the same underlying problem as I noted in #76799 (comment) -- for now, I think The reason this isn't fully working today is because rustbuild has no reason to populate the (internal) stage2/ compiler directory with a standard library and compiler for i686-unknown-linux-gnu; you're not able to run that locally (or so it assumes, since it could be the case). The proper fix is quite involved -- we'd need to rework rustbuild to support the notion that while we only need to build std for each target once, we need to promote it into multiple places. Which places to copy to is not entirely obvious; I think the right answer is every host compiler in that stage, but it would potentially create awkward artifacts in e.g. i686/stage1/lib/rustlib where they don't really need to be. I am still thinking -- there might be a targeted fix here that we can apply. For now my recommendation is that if you want to cross-compile, you use x.py dist which is likely always going to be the more stable command (since it gives you closer to "what I asked for" instead of trying to be smart and failing). |
|
That seems easily solvable, though: |
Triage: This issue is quite old by now. Is this still a problem? |
This is actually a followup to #76733, because somehow I overlooked that when checking the fix for that issue worked.
After building the compiler with the following config.toml:
you end up with a compiler without any of the libstd, etc. rlibs, meaning that using the compiler fails with:
The same is true when building with the following config.toml on linux:
Cc @Mark-Simulacrum
The text was updated successfully, but these errors were encountered: