Describe the bug
Trying to use a gccStdenv on Darwin locally is broken for me. A good test for this is acme-client.
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/yhgcqdkp09pxcihllw2b1j3h8645y7hf-acme-client-1.3.2.tar.gz
source root is acme-client-1.3.2
setting SOURCE_DATE_EPOCH to timestamp 1686437304 of file acme-client-1.3.2/usr.sbin/acme-client/parse.c
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configure flags: --disable-dependency-tracking --prefix=/nix/store/p5y4jvndi9p9qjlmvr6lnwjx0wm6vwah-acme-client-1.3.2
checking build system type... i386-apple-darwin17.7.0
checking host system type... i386-apple-darwin17.7.0
checking for a BSD-compatible install... /nix/store/8fr8kndrn5ga5agybsnncl966spqs5fv-coreutils-9.3/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /nix/store/8fr8kndrn5ga5agybsnncl966spqs5fv-coreutils-9.3/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/tmp/nix-build-acme-client-1.3.2.drv-2/acme-client-1.3.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
configure:3244: checking for C compiler version
configure:3253: gcc --version >&5
ld: unknown option: -fPIC
But fetching built derivations from cache.nixos.org works fine?
Steps To Reproduce
Steps to reproduce the behavior:
- Nixpkgs 9ca7856
nix-build -A acme-client downloads fine from cache.nixos.org
nix-build -A acme-client --check fails with the above error
Expected behavior
gccStdenv works locally.
Screenshots
n/a
Additional context
- Disabling PIC hardening instead makes it complain about
-O2.
- Starts to fail between 69eb041 and 2bc2bf3 on nixos-unstable, trying to bisect.
Notify maintainers
I'm not sure what broke this & where, and the stdenvs & cc-wrapper derivations & files don't have any listed maintainers. Maybe @reckenrode because you recently touched Darwin stdenv?
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-darwin"`
- host os: `Darwin 17.7.0, macOS 10.13.6`
- multi-user?: `no`
- sandbox: `no`
- version: `nix-env (Nix) 2.13.3`
- channels(puna): `"nixpkgs"`
- nixpkgs: `/users/puna/.nix-defexpr/channels/nixpkgs`
Describe the bug
Trying to use a
gccStdenvon Darwin locally is broken for me. A good test for this isacme-client.But fetching built derivations from cache.nixos.org works fine?
Steps To Reproduce
Steps to reproduce the behavior:
nix-build -A acme-clientdownloads fine from cache.nixos.orgnix-build -A acme-client --checkfails with the above errorExpected behavior
gccStdenvworks locally.Screenshots
n/a
Additional context
-O2.Notify maintainers
I'm not sure what broke this & where, and the stdenvs & cc-wrapper derivations & files don't have any listed maintainers. Maybe @reckenrode because you recently touched Darwin stdenv?
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"and paste the result.