Skip to content

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

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
nbdd0121:bootstrap-gcc
Apr 11, 2026
Merged

bootstrap: auto-patch libgccjit.so for NixOS#155104
rust-bors[bot] merged 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

@Kobzol
Copy link
Copy Markdown
Member

Kobzol commented Apr 11, 2026

Thanks!

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 11, 2026

📌 Commit 4c61b30 has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 11, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 11, 2026
Rollup of 3 pull requests

Successful merges:

 - #154827 (distinguish "expected a single argument" and "expected an argument" on attribute parsing)
 - #155104 (bootstrap: auto-patch libgccjit.so for NixOS)
 - #155120 (Use a linting node closer the parsing of `#[cfg_attr]`)
@rust-bors rust-bors Bot merged commit 38ea367 into rust-lang:main Apr 11, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 11, 2026
rust-timer added a commit that referenced this pull request Apr 11, 2026
Rollup merge of #155104 - nbdd0121:bootstrap-gcc, r=Kobzol

bootstrap: auto-patch libgccjit.so for NixOS

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants