-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
stdenv: Nix-driven bootstrap of gcc #209870
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ghost
mentioned this pull request
Jan 9, 2023
13 tasks
Sounds suspiciously familiar: https://trofi.github.io/posts/275-nixpkgs-bootstrap-deep-dive.html |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Yeah, will do. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
ghost
mentioned this pull request
Jan 11, 2023
13 tasks
This comment was marked as outdated.
This comment was marked as outdated.
ghost
mentioned this pull request
Jan 11, 2023
3 tasks
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
ofborg
bot
added
10.rebuild-darwin-stdenv
This PR causes stdenv to rebuild
10.rebuild-linux-stdenv
This PR causes stdenv to rebuild
8.has: clean-up
10.rebuild-darwin: 501+
10.rebuild-darwin: 5001+
10.rebuild-linux: 501+
10.rebuild-linux: 5001+
labels
Jan 12, 2023
This comment was marked as outdated.
This comment was marked as outdated.
ghost
mentioned this pull request
Jan 14, 2023
3 tasks
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This was referenced Apr 26, 2023
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as duplicate.
This comment was marked as duplicate.
13 tasks
ghost
mentioned this pull request
Apr 27, 2023
vcunat
added a commit
that referenced
this pull request
May 1, 2023
ghost
mentioned this pull request
May 6, 2023
16 tasks
PetarKirov
added a commit
to PetarKirov/dlang.nix
that referenced
this pull request
May 7, 2023
…so.1` After upgrading to a recent version of Nixpkgs (2023-04-18), the build broke with the following error: ... auto-patchelf: 6 dependencies could not be satisfied error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/lib/libphobos2.so.0.98.0 error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/rdmd error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dub error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dustmite error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/ddemangle error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dmd auto-patchelf failed to find all the required dependencies. ... After investigation, it turned out that the cuase was a recent [change in Nixpkgs][0] after which `libgcc_s.so` is no longer part of the `glibc` package: Before (nixpkgs @ 2022-03-30): > nix build --json 'github:NixOS/nixpkgs/710fed5a2483f945b14f4a58af2cd3676b42d8c8#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so.1 /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so After (nixpkgs @ 2023-04-18): > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' (no output) Instead, we should use `gccForLibs.libgcc` as it includes exactly what we need: > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#gccForLibs^libgcc' \ | jq -r '.[0].outputs.libgcc' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so.1 /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so This is nixpkgs again @ 2023-04-18, this time using `gccForLibs.libgcc` instead of `glibc.out`. [`gccForLibs`][1] is essentially `gcc.lib`: * an alias to `stdenv.cc.cc` if the host and target are the same and are GNU or * an alias to `gcc.cc` when `stdenv` is LLVM based as then `stdenv.cc.cc` would refer to clang and the `lib` output point to libclang libs, which are very different from what we need. [0]: NixOS/nixpkgs#209870 [1]: NixOS/nixpkgs#91293
This was referenced May 20, 2023
PatrickShaw
added a commit
to PatrickShaw/eww
that referenced
this pull request
Jun 23, 2023
ghost
mentioned this pull request
Jun 30, 2023
This comment was marked as resolved.
This comment was marked as resolved.
12 tasks
PetarKirov
added a commit
to PetarKirov/dlang.nix
that referenced
this pull request
Sep 4, 2023
…so.1` After upgrading to a recent version of Nixpkgs (2023-04-18), the build broke with the following error: ... auto-patchelf: 6 dependencies could not be satisfied error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/lib/libphobos2.so.0.98.0 error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/rdmd error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dub error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dustmite error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/ddemangle error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dmd auto-patchelf failed to find all the required dependencies. ... After investigation, it turned out that the cuase was a recent [change in Nixpkgs][0] after which `libgcc_s.so` is no longer part of the `glibc` package: Before (nixpkgs @ 2022-03-30): > nix build --json 'github:NixOS/nixpkgs/710fed5a2483f945b14f4a58af2cd3676b42d8c8#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so.1 /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so After (nixpkgs @ 2023-04-18): > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' (no output) Instead, we should use `gccForLibs.libgcc` as it includes exactly what we need: > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#gccForLibs^libgcc' \ | jq -r '.[0].outputs.libgcc' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so.1 /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so This is nixpkgs again @ 2023-04-18, this time using `gccForLibs.libgcc` instead of `glibc.out`. [`gccForLibs`][1] is essentially `gcc.lib`: * an alias to `stdenv.cc.cc` if the host and target are the same and are GNU or * an alias to `gcc.cc` when `stdenv` is LLVM based as then `stdenv.cc.cc` would refer to clang and the `lib` output point to libclang libs, which are very different from what we need. [0]: NixOS/nixpkgs#209870 [1]: NixOS/nixpkgs#91293
PetarKirov
added a commit
to PetarKirov/dlang.nix
that referenced
this pull request
Sep 20, 2023
…so.1` After upgrading to a recent version of Nixpkgs (2023-04-18), the build broke with the following error: ... auto-patchelf: 6 dependencies could not be satisfied error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/lib/libphobos2.so.0.98.0 error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/rdmd error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dub error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dustmite error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/ddemangle error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dmd auto-patchelf failed to find all the required dependencies. ... After investigation, it turned out that the cuase was a recent [change in Nixpkgs][0] after which `libgcc_s.so` is no longer part of the `glibc` package: Before (nixpkgs @ 2022-03-30): > nix build --json 'github:NixOS/nixpkgs/710fed5a2483f945b14f4a58af2cd3676b42d8c8#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so.1 /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so After (nixpkgs @ 2023-04-18): > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' (no output) Instead, we should use `gccForLibs.libgcc` as it includes exactly what we need: > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#gccForLibs^libgcc' \ | jq -r '.[0].outputs.libgcc' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so.1 /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so This is nixpkgs again @ 2023-04-18, this time using `gccForLibs.libgcc` instead of `glibc.out`. [`gccForLibs`][1] is essentially `gcc.lib`: * an alias to `stdenv.cc.cc` if the host and target are the same and are GNU or * an alias to `gcc.cc` when `stdenv` is LLVM based as then `stdenv.cc.cc` would refer to clang and the `lib` output point to libclang libs, which are very different from what we need. [0]: NixOS/nixpkgs#209870 [1]: NixOS/nixpkgs#91293
PetarKirov
added a commit
to PetarKirov/dlang.nix
that referenced
this pull request
Sep 20, 2023
…so.1` After upgrading to a recent version of Nixpkgs (2023-04-18), the build broke with the following error: ... auto-patchelf: 6 dependencies could not be satisfied error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/lib/libphobos2.so.0.98.0 error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/rdmd error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dub error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dustmite error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/ddemangle error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dmd auto-patchelf failed to find all the required dependencies. ... After investigation, it turned out that the cuase was a recent [change in Nixpkgs][0] after which `libgcc_s.so` is no longer part of the `glibc` package: Before (nixpkgs @ 2022-03-30): > nix build --json 'github:NixOS/nixpkgs/710fed5a2483f945b14f4a58af2cd3676b42d8c8#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so.1 /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so After (nixpkgs @ 2023-04-18): > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' (no output) Instead, we should use `gccForLibs.libgcc` as it includes exactly what we need: > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#gccForLibs^libgcc' \ | jq -r '.[0].outputs.libgcc' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so.1 /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so This is nixpkgs again @ 2023-04-18, this time using `gccForLibs.libgcc` instead of `glibc.out`. [`gccForLibs`][1] is essentially `gcc.lib`: * an alias to `stdenv.cc.cc` if the host and target are the same and are GNU or * an alias to `gcc.cc` when `stdenv` is LLVM based as then `stdenv.cc.cc` would refer to clang and the `lib` output point to libclang libs, which are very different from what we need. [0]: NixOS/nixpkgs#209870 [1]: NixOS/nixpkgs#91293
PetarKirov
added a commit
to PetarKirov/dlang.nix
that referenced
this pull request
Sep 20, 2023
…so.1` After upgrading to a recent version of Nixpkgs (2023-04-18), the build broke with the following error: ... auto-patchelf: 6 dependencies could not be satisfied error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/lib/libphobos2.so.0.98.0 error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/rdmd error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dub error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dustmite error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/ddemangle error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dmd auto-patchelf failed to find all the required dependencies. ... After investigation, it turned out that the cuase was a recent [change in Nixpkgs][0] after which `libgcc_s.so` is no longer part of the `glibc` package: Before (nixpkgs @ 2022-03-30): > nix build --json 'github:NixOS/nixpkgs/710fed5a2483f945b14f4a58af2cd3676b42d8c8#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so.1 /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so After (nixpkgs @ 2023-04-18): > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' (no output) Instead, we should use `gccForLibs.libgcc` as it includes exactly what we need: > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#gccForLibs^libgcc' \ | jq -r '.[0].outputs.libgcc' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so.1 /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so This is nixpkgs again @ 2023-04-18, this time using `gccForLibs.libgcc` instead of `glibc.out`. [`gccForLibs`][1] is essentially `gcc.lib`: * an alias to `stdenv.cc.cc` if the host and target are the same and are GNU or * an alias to `gcc.cc` when `stdenv` is LLVM based as then `stdenv.cc.cc` would refer to clang and the `lib` output point to libclang libs, which are very different from what we need. [0]: NixOS/nixpkgs#209870 [1]: NixOS/nixpkgs#91293
PetarKirov
added a commit
to PetarKirov/dlang.nix
that referenced
this pull request
Sep 21, 2023
…so.1` After upgrading to a recent version of Nixpkgs (2023-04-18), the build broke with the following error: ... auto-patchelf: 6 dependencies could not be satisfied error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/lib/libphobos2.so.0.98.0 error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/rdmd error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dub error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dustmite error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/ddemangle error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/kl8bjrlmlzcjz47c0n6kjsj1yxi6zpqm-dmd-binary-2.098.0/bin/dmd auto-patchelf failed to find all the required dependencies. ... After investigation, it turned out that the cuase was a recent [change in Nixpkgs][0] after which `libgcc_s.so` is no longer part of the `glibc` package: Before (nixpkgs @ 2022-03-30): > nix build --json 'github:NixOS/nixpkgs/710fed5a2483f945b14f4a58af2cd3676b42d8c8#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so.1 /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libgcc_s.so After (nixpkgs @ 2023-04-18): > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#glibc^out' \ | jq -r '.[0].outputs.out' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' (no output) Instead, we should use `gccForLibs.libgcc` as it includes exactly what we need: > nix build --json 'github:NixOS/nixpkgs/555daa9d339b3df75e58ee558a4fec98ea92521e#gccForLibs^libgcc' \ | jq -r '.[0].outputs.libgcc' \ | xargs -I{} find {} \( -type l -or -type f \) -name '*libgcc_s*' /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so.1 /nix/store/5w5qpm9z3iyib615pdih6nvk9spv3jbv-gcc-12.2.0-libgcc/lib/libgcc_s.so This is nixpkgs again @ 2023-04-18, this time using `gccForLibs.libgcc` instead of `glibc.out`. [`gccForLibs`][1] is essentially `gcc.lib`: * an alias to `stdenv.cc.cc` if the host and target are the same and are GNU or * an alias to `gcc.cc` when `stdenv` is LLVM based as then `stdenv.cc.cc` would refer to clang and the `lib` output point to libclang libs, which are very different from what we need. [0]: NixOS/nixpkgs#209870 [1]: NixOS/nixpkgs#91293
13 tasks
13 tasks
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: emacs
Text editor
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
6.topic: stdenv
Standard environment
8.has: clean-up
8.has: package (new)
This PR adds a new package
10.rebuild-darwin: 501+
10.rebuild-darwin: 5001+
10.rebuild-linux: 501+
10.rebuild-linux: 5001+
10.rebuild-linux-stdenv
This PR causes stdenv to rebuild
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✔️ Good to go.
ln -s $libgcc/lib/libgcc_s.so $lib/lib/
with-L${gccForLibs.libgcc}/lib"
#221525allowedRequisites
issue.Summary
By default, when you type
make
, GCC will compile itself three times. This PR inhibits that behavior by configuring GCC with--disable-bootstrap
, and reimplements the triple-rebuild using Nix rather thanmake
/sh
.Immediate Benefits
gcc11
andgcc12
onaarch64
(without needing newbootstrapFiles
)drvInput
of the final stdenv. This allows Nix to build stageCompare in parallel with the rest of nixpkgs instead of in series.libgcc_s
out of the bootstrap-files or other derivationsstdenv
hacks eliminatedgcc
andclang
share the same codepath for more ofcc-wrapper
.Future Benefits
bootstrap-files
so long ashostPlatform.canExecute bootstrapFiles
.gcc
(lib{backtrace, atomic, cc1, decnumber, ffi, gomp, iberty, offloadatomic, quadmath, sanitizer, ssp, stdc++-v3, vtv}) to be built in separate (one-liner) derivations whichinherit src;
fromgcc
, much like WIP: GCC with separated runtime libraries #132343Incorporates
--disable-bootstrap
case #217995Closes
Credits
This project was made possible by three important insights, none of which were mine:
@Ericson2314 was the first to advocate for this change, and probably the first to appreciate its advantages. Nix-driven (external) bootstrap is "cross by default".
@trofi has figured out a lot about how to get gcc to not mix up the copy of
libstdc++
that it depends on with the copy that it builds, by moving thebootstrapFiles
'libstdc++
into a versioned directory. This allows a Nix-driven bootstrap of gcc without the final gcc would still having references to thebootstrapFiles
.Using the undocumented variable
user-defined-trusted-dirs
when building glibc. When glibcdlopen()
slibgcc_s.so
, it uses a completely different and totally special set of rules for findinglibgcc_s.so
. This trick is the only way we can putlibgcc_s.so
in its own separate outpath without creating circular dependencies or dependencies on the bootstrapFiles. I would never have guessed to use this (or that it existed!) if it were not for a comment in guix which @Mic92 mentioned.My own role in this PR was basically: being available to go on acoding binge at an opportune moment, so we wouldn't waste acrisis.