Hello! I’m fairly new to nix and I’m having a fantastic experience except for struggling to replicate one aspect of my arch system. I’m trying build linux-xanmod with march and mtune set and I’m running to the following error relating to bootstrapping glibc on the build.
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
nixpkgs.localSystem = {
gcc.arch = "znver2";
gcc.tune = "znver2";
system = "x86_64-linux";
};
error: a 'x86_64-linux' with features {gccarch-znver2} is required to build '/nix/store/rbnjbsshwxiv7ax29wphsxbsrgsc7mkd-bootstrap-stage0-glibc-bootstrap.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, kvm, nixos-test}
I’ve attempted adding:
features = [ "gccarch-znver2" ];
to nixpkgs.localSystem
, but there is no apparent change in build output.
GCC w/ march and mtune set works on the running systems as shown here:
gcc -march=znver2 -mtune=znver2 /dev/null
/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin/ld: cannot open output file a.out: Permission denied
collect2: error: ld returned 1 exit status
Note that without nixpkgs.localSystem set the build works fine, but I’m then not getting the optimizations I’m looking for.
Addition Resources:
Issue #49765