-
-
Notifications
You must be signed in to change notification settings - Fork 18k
stdenv: Nix-driven bootstrap of gcc #209870
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
Merged
Merged
Conversation
This file contains hidden or 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
13 tasks
Contributor
|
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.
Contributor
Yeah, will do. |
Contributor
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
13 tasks
This comment was marked as outdated.
This comment was marked as outdated.
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 comment was marked as outdated.
This comment was marked as outdated.
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 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
vcunat
added a commit
that referenced
this pull request
May 1, 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
Author
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: |
ConnorBaker
pushed a commit
to nixos-cuda/cuda-legacy
that referenced
this pull request
Apr 14, 2025
This commit adds an option `disableGdbPlugin` which controls whether or not the plugin *for* GDB will be built. This plugin contains a copy of `gcc`. The configure flag that this option controls is called `--disable-libcc1`. This flag name is slightly confusing: it is used only by GDB (and apparently unmaintained), yet the flag name does not mention GDB. This is why the option name is different from the configure flag name. The primary motivation for this commit is to allow the following PR (which is not yet merged) to pass `--disable-libcc1` when building the final native (build=host=target) compiler as part of the stdenv bootstrap: NixOS/nixpkgs#209870 We need to `--disable-libcc1` in this scenario because gcc's build machinery links `libcc1` against the `libstdc++` that is part of the *compiler used to compile gcc*, rather than against the `libstdc++` that is built *by* gcc. In an FHS distribution this distinction is not terribly important because dynamically linked libraries are late-bound (ld.so resolution). However in nixpkgs this causes a reference back to the bootstrapFiles to leak all the way through to the final stdenv. More details can be found in the comment in `pkgs/stdenv/linux/default.nix` of the PR linked above. Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
ConnorBaker
pushed a commit
to nixos-cuda/cuda-legacy
that referenced
this pull request
Apr 14, 2025
At least on armv7l-linux bootstrapTools fixed version of bits/statx.h
breaks the header:
NixOS/nixpkgs#209870 (comment)
Drop the header along with other already cleaned ones.
ConnorBaker
pushed a commit
to nixos-cuda/cuda-legacy
that referenced
this pull request
Apr 14, 2025
As suggested by @trofi here: NixOS/nixpkgs#209870 (comment) This should fix failures among packages which use gfortran: NixOS/nixpkgs#209870 (comment) https://hydra.nixos.org/build/215195834
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
This PR removes packages or removes other cruft
8.has: package (new)
This PR adds a new package
10.rebuild-darwin: 501+
This PR causes many rebuilds on Darwin and should normally target the staging branches.
10.rebuild-darwin: 5001+
This PR causes many rebuilds on Darwin and must target the staging branches.
10.rebuild-linux: 501+
This PR causes many rebuilds on Linux and should normally target the staging branches.
10.rebuild-linux: 5001+
This PR causes many rebuilds on Linux and must target the staging branches.
10.rebuild-linux-stdenv
This PR causes stdenv to rebuild on Linux and must target a staging branch.
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"#221525allowedRequisitesissue.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
gcc11andgcc12onaarch64(without needing newbootstrapFiles)drvInputof the final stdenv. This allows Nix to build stageCompare in parallel with the rest of nixpkgs instead of in series.libgcc_sout of the bootstrap-files or other derivationsstdenvhacks eliminatedgccandclangshare the same codepath for more ofcc-wrapper.Future Benefits
bootstrap-filesso 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-bootstrapcase #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-dirswhen 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.soin 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.