Skip to content
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

Something about bootstrap stage0-sysroot broke with libLLVM #122913

Closed
Noratrieb opened this issue Mar 22, 2024 · 8 comments · Fixed by #123186
Closed

Something about bootstrap stage0-sysroot broke with libLLVM #122913

Noratrieb opened this issue Mar 22, 2024 · 8 comments · Fixed by #123186
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@Noratrieb
Copy link
Member

backtrace CI tries to build --stage 0 library and then expects to find a rustc in build/host/stage0-sysroot/bin/rustc that can compile stuff. This appears to have worked, but does not work anymore. build/host/stage0-sysroot/lib only contains the libLLVM-18-rust-1.78.0-beta.so linker script, it does not contain the actual library.

I'm not sure how bootstrapping works with that, but uh, it does somehow!

@Noratrieb Noratrieb added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels Mar 22, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 22, 2024
@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 22, 2024
@Noratrieb
Copy link
Member Author

Noratrieb commented Mar 22, 2024

Ah, build/host/stage0/lib/ contains the actual libLLVM.

@Noratrieb
Copy link
Member Author

I don't know whether this is intended or accidental, but something is up. I'm going to change backtrace to use build/host/stage0 instead, which should hopefully still work.

@Noratrieb
Copy link
Member Author

I worked around it in rust-lang/backtrace-rs#602. It's probably the proper fix anyways. Still weird to have this, so I'll leave the issue open for you to figure out whether this is good and whether it matters.

@Noratrieb
Copy link
Member Author

Nevermind, using that doesn't appear to work correctly, I suspect that this does need stage0-sysroot. I don't really know the difference tbh so I'm happy to know what would be correct.

@onur-ozkan
Copy link
Member

This is a recent regression from the bootstrap compiler bump PR #122754.

@ChrisDenton
Copy link
Member

Has anyone figured out what needs to be copied where and how? The conversation seems a bit spread out over different issues/PRs so I'm wondering what the current status is?

@onur-ozkan
Copy link
Member

Not yet, I will check it around tomorrow.

@ChrisDenton
Copy link
Member

Thanks! No rush, I was just uncertain where things stood.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 29, 2024
copy any file from stage0/lib to stage0-sysroot/lib

With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like `libLLVM.so.18.1-rust-1.78.0-beta`, which `is_dylib` function cannot determine as it only looks whether files are ending with ".so" or not.
This change resolves this problem by no longer doing that ".so" check, as we need all files from the stage0/lib as they are all dependency of rustc anyway.

Fixes rust-lang#122913
@bors bors closed this as completed in b48411b Mar 29, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 29, 2024
Rollup merge of rust-lang#123186 - onur-ozkan:llvm-library-bug, r=Kobzol

copy any file from stage0/lib to stage0-sysroot/lib

With the LLVM 18 upgrade, the name of the LLVM library has been changed to something like `libLLVM.so.18.1-rust-1.78.0-beta`, which `is_dylib` function cannot determine as it only looks whether files are ending with ".so" or not.
This change resolves this problem by no longer doing that ".so" check, as we need all files from the stage0/lib as they are all dependency of rustc anyway.

Fixes rust-lang#122913
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants