Skip to content

bootstrap: auto-patch libgccjit.so for NixOS#155104

Open
nbdd0121 wants to merge 1 commit intorust-lang:mainfrom
nbdd0121:bootstrap-gcc
Open

bootstrap: auto-patch libgccjit.so for NixOS#155104
nbdd0121 wants to merge 1 commit intorust-lang:mainfrom
nbdd0121:bootstrap-gcc

Conversation

@nbdd0121
Copy link
Copy Markdown
Member

Currently all downloaded rustc and LLVM components are auto patched on NixOS, but this is not done for libgccjit.so, so when GCC backend is enabled on NixOS, the build ICEs with errors like this:

thread 'rustc' (2286205) panicked at compiler/rustc_codegen_gcc/src/lib.rs:191:9:
Cannot load libgccjit.so: libzstd.so.1: cannot open shared object file: No such file or directory

Fix this by auto-patch libgccjit.so, too. zstd is added to the dependency environment.

Currently all downloaded rustc and LLVM components are auto patched on
NixOS, but this is not done for libgccjit.so, so when GCC backend is
enabled on NixOS, the build ICEs with errors like this:

    thread 'rustc' (2286205) panicked at compiler/rustc_codegen_gcc/src/lib.rs:191:9:
    Cannot load libgccjit.so: libzstd.so.1: cannot open shared object file: No such file or directory

Fix this by auto-patch libgccjit.so, too. `zstd` is added to the dependency
environment.

Signed-off-by: Gary Guo <gary@garyguo.net>
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 10, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 10, 2026

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants