-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Describe the bug
As context: I am trying to build my machines with x86-64-v3 compiler flags. There is a open PR which introduces that feature. (but its not really related to the error).
Nevertheless in addition i try to compile all my packages with -mpclmul flag.
I was "activating" that feature via the stdenv adapter withCFlags that is present in
nixpkgs/pkgs/stdenv/adapters.nix
Line 244 in 3fb8eed
| withCFlags = compilerFlags: stdenv: |
nixpkgs.overlays = [
(self: super: {
stdenv = super.withCFlags ["-mpclmul"] super.stdenv;
})
];or
nixpkgs.config.replaceStdenv = {pkgs}: pkgs.withCFlags ["-mpclmul"] pkgs.stdenv;The build fails with
error: attribute 'libc_bin' missing
at /nix/store/fldvk3c519c6qq304ha4cwikmj8ravv0-source/pkgs/build-support/cc-wrapper/default.nix:129:20:
128| # Ensure bintools matches
129| assert libc_bin == bintools.libc_bin;
| ^
In addition i have also checked impureUseNativeOptimizations, which fails with the same error.
Steps To Reproduce
Steps to reproduce the behavior:
- Get any nixos configuration
- add
nixpkgs.config.replaceStdenv = {pkgs}: pkgs.withCFlags ["-mpclmul"] pkgs.stdenv;
Expected behavior
nix is doing a full rebuild of the system with the desired CFLAGS
Additional context
Possibly it got broken by #217206 . I did find that by some uneducated bisect attempts.
In addition if i change back the line to the previous line (without env. at the beginning) it evaluates successfully.
Sadly i honestly don't get how that got exactly broken so i can not provide a PR by myself.
Notify maintainers
@Artturin (sorry to ping you, but you are the only person i can relate to here and you did the treewide change in the mentioned PR)
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
❯ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.1.22-xanmod1, NixOS, 23.05 (Stoat), 23.05.20230405.b9737bc`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.13.3`
- channels(root): `""`
- channels(shawn): `""`
- nixpkgs: `/nix/store/izd1kzpf37zysl17nga1gcw9c7x1mzxq-source`