treewide: Get rid of cc.gcc#91293
Conversation
cc.gcccc.gcc
ad418c0 to
4228bc9
Compare
|
Oh nice, the eval problems just went away! |
aabadf1 to
0b0dcd3
Compare
Instead, we have a new `gccForLibs`, which has the appropriate definition for e.g. avoiding `x86_32` linking problems.
0b0dcd3 to
92f96f4
Compare
cc.gcccc.gcc
|
OK ofborg passes, and manually tested some obscure things like wasi zlib. |
Ughhhh this was terrible but it seems to now be fixed by [0]. Though it doesn't seem the issue is entirely resolved NixOS#36947. [0]: NixOS#91293
|
@Ericson2314 Hey, I think this broke the "aarch64-android-prebuilt" pkgs. Just try with: |
|
@bkchr Can you reproduce this without |
|
When I use without But you can also use |
and should be equivalent. @bkchr Could you include the logs / derivation it fails at? I bet it's having trouble with the Android toolchain? |
|
|
Oh this isn't an eval error, which I what I was seeing. |
|
Ah, it's because it's trying to use nix-built gcc via |
(cherry picked from commit 7a30df9)
(cherry picked from commit 7a30df9)
…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
…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
…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
…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
…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
…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
…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
…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
…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
Motivation for this change
Instead, we have a new
gccForLibs, which has the appropriate definition for e.g. avoidingx86_32linking problems.Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)