{gccarch-skylake} is required to build

I was trying to recompile the whole system using Skylake Optimization. However, i am getting an error.

error: a 'x86_64-linux' with features {gccarch-skylake} is required to build '/nix/store/x
d4fcjaz817lblc82z9jdyvbsrhmix3g-bootstrap-stage0-glibc-bootstrapFiles.drv', but I am a 'x8
6_64-linux' with features {benchmark, big-parallel, kvm, nixos-test}

I already add it in my config.

  nixpkgs.hostPlatform = {
    gcc.arch = "skylake";
    gcc.tune = "skylake";
    system = "x86_64-linux";
  };
  nix.settings.system-features = [
    "nixos-test"
    "benchmark"
    "big-parallel"
    "kvm"
    "gccarch-skylake"
  ];

Is there anything that i missed?

The nix.settings.system-features setting has to be applied before you’ll be able to build using those features. So do the hostPlatform in a subsequent rebuild.

1 Like

ahh yeah. I forgot about it. Thank you.