Building with 'skylake' optimization failed

I was trying to rebuild my system using skylake optimization. I already tried to add

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

However it gave me an error about failing to build and test on some stuff

warning: Git tree '/home/cak/cak-nixos-conf' is dirty
building the system configuration...
warning: Git tree '/home/cak/cak-nixos-conf' is dirty
error: builder for '/nix/store/ygxihzavfa629a58ighxh46xjq8sqxwd-openexr-2.5.10.drv' failed with exit code 2;
       last 25 log lines:
       > generating compression 0  tileSizeX 95 tileSizeY 49 writing per-tile with relative coordinates reading per-tile with relative coordinates reading per-tile with relative coordinates
       > generating compression 1  tileSizeX 263 tileSizeY 35 writing per-tile reading per-tile reading per-tile
       > generating compression 1  tileSizeX 211 tileSizeY 35 writing bulk reading bulk reading skipping
       > generating compression 1  tileSizeX 136 tileSizeY 93 writing per-tile with relative coordinates reading per-tile with relative coordinates reading skipping
       > Testing files with 3 channels, using absolute coordinates 2 times.
       > generating compression 0  tileSizeX 52 tileSizeY 4 writing per-tile reading per-tile reading skipping
       > generating compression 0  tileSizeX 19 tileSizeY 66 writing bulk reading bulk reading bulk
       > generating compression 0  tileSizeX 44 tileSizeY 85 writing per-tile with relative coordinates reading per-tile with relative coordinates reading per-tile with relative coordinates
       > generating compression 1  tileSizeX 176 tileSizeY 162 writing per-tile reading per-tile reading per-tile
       > generating compression 1  tileSizeX 195 tileSizeY 65 writing bulk reading bulk reading skipping
       > generating compression 1  tileSizeX 8 tileSizeY 132 writing per-tile with relative coordinates reading per-tile with relative coordinates reading per-tile with relative coordinates
       > Testing files with 10 channels, using absolute coordinates 2 times.
       > generating compression 0  tileSizeX 161 tileSizeY 38 writing per-tile reading per-tile reading per-tile
       > generating compression 0  tileSizeX 239 tileSizeY 150 writing bulk reading bulk reading bulk
       > generating compression 0  tileSizeX 244 tileSizeY 166 writing per-tile with relative coordinates reading per-tile with relative coordinates reading per-tile with relative coordinates
       >
       >
       > 80% tests passed, 1 tests failed out of 5
       >
       > Total Test time (real) = 3007.61 sec
       >
       > The following tests FAILED:
       >          4 - OpenEXR.IlmImf (Timeout)
       > Errors while running CTest
       > make: *** [Makefile:71: test] Error 8
       For full logs, run 'nix log /nix/store/ygxihzavfa629a58ighxh46xjq8sqxwd-openexr-2.5.10.drv'.
error: 1 dependencies of derivation '/nix/store/vn2l80xr9wh19n3fl1bh9srvj5hc3xdh-libdevil-1.8.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cd5pym7mdv9hcn7y8cpjv3fpdf0zdgr3-opencv-4.9.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/swh4mzmfnf7vh1d91aw1np1ivlngcjrz-opencv-4.9.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/kagksvpgf3jz66v9r9nl1njvpf2m8n05-avisynthplus-3.7.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fnj51gbq519a57qbi3i47lhlgl09cwmf-spectacle-24.08.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/afig5kyn46m329ry77ricqdj7qjgp16p-system-path.drv' failed to build
error (ignored): error: cannot unlink '"/tmp/nix-build-nodejs-20.18.3.drv-0/build"': Directory not empty
error: 1 dependencies of derivation '/nix/store/01yws1vbd3bmxcdvw2nlwdlcnxajprd4-nixos-system-840-g6-24.11.20250313.cdd2ef0.drv' failed to build

Is there any stuff that i can do about this?

What happens when you try building the derivation which failed? It says it timed out and it looks like it’s 7.61 seconds too slow? :person_shrugging:

I dont really know how to build specific derivation as you asked.

nix build '/nix/store/ygxihzavfa629a58ighxh46xjq8sqxwd-openexr-2.5.10.drv^*'

1 Like

Side note: the system-features are redundant, you can remove them, because the default already has those.


       nix.settings.system-features
           The set of features supported by the machine. Derivations can express dependencies on system features through the ‘requiredSystemFeatures’ attribute.

           Type: list of string

           Default: [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-<arch>" ]

           Declared by:
               <nixpkgs/nixos/modules/config/nix.nix>

and arch = "foo" implies tune = "foo", so you could probably remove gcc.tune too.

Using this first then try to do nixos rebuild removes the error but i am not sure if the rebuild itself finished. I left my laptop for several hours now and the terminal is gone but several apps opened?

Weird. I will give another rebuild and see how it goes.

After hours of compiling. Several news errors showing up such as

warning: Git tree '/home/cak/cak-nixos-conf' is dirty
building the system configuration...
warning: Git tree '/home/cak/cak-nixos-conf' is dirty
error: builder for '/nix/store/as8n92impxdakzixhbp9pak892qz4p83-re2-2024-07-02.drv' failed with exit code 1;
       last 25 log lines:
       > I0000 00:00:1742691773.279656     645 tester.cc:86] DFA1 enabled
       > I0000 00:00:1742691773.279659     645 tester.cc:86] OnePass enabled
       > I0000 00:00:1742691773.279662     645 tester.cc:86] BitState enabled
       > I0000 00:00:1742691773.279666     645 tester.cc:86] RE2 enabled
       > I0000 00:00:1742691773.279669     645 tester.cc:86] RE2a enabled
       > I0000 00:00:1742691773.279672     645 tester.cc:86] RE2b enabled
       > 4048 regexps, 165968 tests, 0 failures [3/3 str]
       > 4048 regexps, 165968 tests, 0 failures [3/3 str]
       > 4048 regexps, 165968 tests, 0 failures [3/3 str]
       > 4048 regexps, 165968 tests, 0 failures [3/3 str]
       > [       OK ] EgrepLiterals.Lowercase (1145141 ms)
       > [ RUN      ] EgrepLiterals.MixedCase
       >
       >
       > 90% tests passed, 2 tests failed out of 20
       >
       > Total Test time (real) = 1500.67 sec
       >
       > The following tests FAILED:
       >    16 - exhaustive1_test (Timeout)
       >        19 - exhaustive_test (Timeout)
       > Errors while running CTest
       > FAILED: CMakeFiles/test.util
       > cd /build/source/build && /nix/store/a4gy41sql6xqvvsvayvpk7bswyi8ys03-cmake-3.30.5/bin/ctest --force-new-ctest-process
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/as8n92impxdakzixhbp9pak892qz4p83-re2-2024-07-02.drv'.
error: 1 dependencies of derivation '/nix/store/x23w59p59imwgjjrbv96633grqs2cy6f-electron-unwrapped-34.3.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2c1c2wp9b38f2k0jwdy30b3g7a4wblqk-vesktop-1.5.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gwci3567k9jvj3na8rahvakz84rhys4v-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vxfiy7s6d6mpn89drbcd1vqj8l1f9smv-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sn9h4l44x6z74wf4zjgdkqfxkjcnm8dw-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rqcc6fzvk8czrwmmm7b5cnq2z0k11y6j-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/b3k2xrjr6fahl98vngx9c4qyvhx18vrv-nixos-system-840-g6-24.11.20250319.b75693f.drv' failed to build

and

warning: Git tree '/home/cak/cak-nixos-conf' is dirty
building the system configuration...
warning: Git tree '/home/cak/cak-nixos-conf' is dirty
error: builder for '/nix/store/c6b5a7x5aybc3l6crgcfywh12fhgg6k3-python3.12-hypothesis-6.112.2.drv' failed with exit code 1;
       last 25 log lines:
       > You can add @seed(164589877150843860312803762803644459954) to this test or run pytest with --hypothesis-seed=164589877150843860312803762803644459954 to reproduce this failure.
       > ============================= slowest 20 durations =============================
       > 459.59s call     hypothesis-python/tests/cover/test_slices.py::test_start_will_equal_0
       > 205.59s call     hypothesis-python/tests/cover/test_stateful.py::TestLotsOfEntropyPerStepMachine::runTest
       > 194.51s call     hypothesis-python/tests/cover/test_stateful.py::test_saves_failing_example_in_database
       > 142.84s call     hypothesis-python/tests/cover/test_stateful.py::test_removes_needless_steps
       > 118.20s call     hypothesis-python/tests/cover/test_slices.py::test_step_will_be_negative
       > 115.57s call     hypothesis-python/tests/cover/test_statistical_events.py::test_stateful_with_one_of_bundles_states_are_deduped
       > 109.39s call     hypothesis-python/tests/cover/test_stateful.py::TestMachineUsingMultiple::runTest
       > 78.10s call     hypothesis-python/tests/cover/test_statistical_events.py::test_stateful_states_are_deduped
       > 73.41s call     hypothesis-python/tests/cover/test_flakiness.py::test_failure_sequence_inducing
       > 68.31s call     hypothesis-python/tests/cover/test_database_backend.py::TestGADReads::runTest
       > 64.99s call     hypothesis-python/tests/cover/test_regex.py::test_fullmatch_generates_example[[ab]*-aBb]
       > 61.51s call     hypothesis-python/tests/cover/test_observability.py::test_observability
       > 58.14s call     hypothesis-python/tests/cover/test_testdecorators.py::test_float_addition_is_associative
       > 47.91s call     hypothesis-python/tests/cover/test_stateful.py::test_multiple_rules_same_func
       > 44.97s call     hypothesis-python/tests/cover/test_lookup.py::test_resolves_forwardrefs_to_builtin_types[object]
       > 44.76s call     hypothesis-python/tests/cover/test_sampled_from.py::test_efficient_lists_of_tuples_first_element_sampled_from
       > 44.72s call     hypothesis-python/tests/cover/test_lookup_py37.py::test_resolving_standard_ordered_dict_as_generic
       > 44.42s call     hypothesis-python/tests/cover/test_lookup.py::test_specialised_mapping_types[typing.OrderedDict[tests.cover.test_lookup.Elem, tests.cover.test_lookup.ElemValue]-typing.OrderedDict]
       > 44.18s call     hypothesis-python/tests/cover/test_lookup_py37.py::test_resolving_standard_defaultdict_as_generic
       > 43.88s call     hypothesis-python/tests/cover/test_lookup_py37.py::test_resolving_standard_itemsview_as_generic
       > =========================== short test summary info ============================
       > FAILED tests/cover/test_stateful.py::test_can_run_with_no_db - hypothesis.errors.FailedHealthCheck: Data generation is extremely slow: Onl...
       > ====== 1 failed, 3211 passed, 5 skipped, 1 xfailed in 1215.86s (0:20:15) =======
       For full logs, run 'nix log /nix/store/c6b5a7x5aybc3l6crgcfywh12fhgg6k3-python3.12-hypothesis-6.112.2.drv'.
error: 1 dependencies of derivation '/nix/store/gdfnq5qxd20jn6nsbmbkmh2lzrsr8c8d-python3.12-cbor2-5.6.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/6bm9mgbxf1cx50ricw5cvwprbxcyhgqp-python3.12-mutagen-1.47.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/701kmppvvrr6qb6cq7l6j57mlihxrgnp-python3.12-numpy-1.26.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cxlp0pj1r7918bbh309f1pp9zs2b8ia5-python3.12-pyrsistent-0.20.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/xfv3gcmxpg153b73gd98iy4bmf3h4ayc-python3.12-construct-2.10.70.drv' failed to build
error: 1 dependencies of derivation '/nix/store/658xy0rjzf12jklfs4f29lznk5id353m-python3.12-matplotlib-3.9.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mawx5rylcgl286sj1d8sylk0phq8v2wq-python3.12-pillow-11.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4098lc31y2qyhh8ldsvb1y6fx9g33j5b-python3.12-pybind11-2.13.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/f2glrxdclpv52mcfydyg5kb8amjn122c-python3.12-remarshal-0.20.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zcay1kryfvxg65s3dqws1sd7mqdpi376-python3.12-sentry-sdk-1.45.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/p0s2bdapvr5k65h76pazgk8hw5hw7gcc-python3.12-tqdm-4.66.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/p4pfr6b4l61j210a7xlhb54d0v9k72dj-yt-dlp-2025.2.19.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5xpxy7gaabgdppykx64zsp0j1q43zakb-containers.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/q1yhzydiglpaaq9i57klh64rrf7ia850-libcamera-0.3.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/6546mj2kdrqih5a7a806z1kfpn6p1p9a-mpv-with-scripts-0.39.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8ikfn1sk2nkrz53b460najm9ffc7l3vv-python3-3.12.8-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rzc4pvqfvs8f62iapmcg2qzvvy6vy4n5-python3-3.12.8-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/siah7h0k82311wls9v2dm2dgblfdirpz-python3.12-pytest-regressions-2.5.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rqcc6fzvk8czrwmmm7b5cnq2z0k11y6j-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nqj5156dvrafpvrjm2j1z1v6kbfc0522-pipewire-1.2.7.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cc6bns7nm24v5z93m5c8pp6n3a7vlncf-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/b3k2xrjr6fahl98vngx9c4qyvhx18vrv-nixos-system-840-g6-24.11.20250319.b75693f.drv' failed to build

I already tried to do

nix build '/nix/store/as8n92impxdakzixhbp9pak892qz4p83-re2-2024-07-02.drv'

and

nix build '/nix/store/c6b5a7x5aybc3l6crgcfywh12fhgg6k3-python3.12-hypothesis-6.112.2.drv'

Seems ended up in endless loop which both will show up on different times. Is there anyway to offload this from my laptop and maybe build it from my desktop (with emulated skylake CPU or perhaps just x86-64-v3)?