!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

581 Members
126 Servers

Load older messages


SenderMessageTime
23 Feb 2026
@theo-paris:matrix.orgTheo ParisI'm not even sure where to start to attempt to fix this issue... I could try adding nativeBuildInputs or removeAttrs but I'm not sure if those are the right solutions01:00:37
@artturin:matrix.orgArtturin
In reply to @theo-paris:matrix.org

Not sure if this is the right place for this but:
I was testing github.com/NixOS/nixpkgs/pull/463361 with a nixos config flake using

  nixpkgs.localSystem = {
    system = "x86_64-linux";
    useLLVM = true;
    linker = "lld";
  };

And I ran into the following error:


       … while evaluating the option `home-manager.users.theo.i18n.glibcLocales':

       … while evaluating the option `i18n.glibcLocales':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: function 'anonymous lambda' called with unexpected argument 'nativeBuildInputs'
       at /nix/store/hq30166l4qc2l2va8v4lj9fyg894wdqs-source/pkgs/build-support/fetchurl/boot.nix:10:1:
            9|
           10| {
             | ^
           11|   url ? builtins.head urls,

That's a common symptom of bootstrap issues
The bootstrap fetchurl is used in a place where the full fetchurl should be used.
It's not an issue in fetchurl itself

https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/boot.nix

01:34:32
24 Feb 2026
@haylin:catgirl.cloudhaylin joined the room.04:17:53
@vcunat:matrix.orgvcunatThe cross-trunk jobset is broken now: https://hydra.nixos.org/jobset/nixpkgs/cross-trunk#tabs-errors07:34:18
@vcunat:matrix.orgvcunatProbably since https://github.com/NixOS/nixpkgs/pull/488406#event-2299933764507:34:44
@vcunat:matrix.orgvcunatI don't even know what error is relevant in there.07:39:49
@cdepillabout:matrix.org@cdepillabout:matrix.org left the room.07:40:25
@vcunat:matrix.orgvcunatOh wait, it probably isn't broken.07:46:16
@vcunat:matrix.orgvcunatFor a couple days there was no rebuild of those jobs, apparently. And the timer just hasn't fired since the staging-next merge yesterday 🀦 07:46:54
@vcunat:matrix.orgvcunatWe'll see in about an hour; I queued an eval.07:47:10
@crazychaoz:matrix.orgcrazychaoz

what happened in between

β€’ Updated input 'nixpkgs':
       'github:NixOS/nixpkgs/41da1e3ea8e23e094e5e3eeb1e6b830468a7399e?narHash=sha256-jp0D4vzBcRKwNZwfY4BcWHemLGUs4JrS3X9w5k/JYDA%3D' (2025-06-14)
  β†’ 'github:NixOS/nixpkgs/724cf38d99ba81fbb4a347081db93e2e3a9bc2ae?narHash=sha256-MpAKyXfJRDTgRU33Hja%2BG%2B3h9ywLAJJNRq4Pjbb4dQs%3D' (2026-02-19)

so that

error: Package β€˜mingw_w64-pthreads-13.0.0’ in /nix/store/00k5v1i44s1dqjryvq6q414rnha8x6ld-source/pkgs/os-specific/windows/mingw-w64/headers.nix:35 is not available on the requested hostPlatform:
         hostPlatform.system = "x86_64-linux"
         package.meta.platforms = [
           "aarch64-windows"
           "x86_64-windows"
           "i686-windows"
         ]

(i cannot cross compile for windows anymore)

error (gcc-15.2.0):

       > The directory (BUILD_SYSTEM_HEADER_DIR) that should contain system headers does not exist:
       >   /usr/include
       > make[2]: *** [Makefile:3641: stmp-fixinc] Error 1
       > rm gcc.pod
       > make[2]: Leaving directory '/build/build/gcc'
09:32:21
@crazychaoz:matrix.orgcrazychaoz *

what happened in between

β€’ Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/41da1e3ea8e23e094e5e3eeb1e6b830468a7399e?narHash=sha256-jp0D4vzBcRKwNZwfY4BcWHemLGUs4JrS3X9w5k/JYDA%3D' (2025-06-14)
  β†’ 'github:NixOS/nixpkgs/724cf38d99ba81fbb4a347081db93e2e3a9bc2ae?narHash=sha256-MpAKyXfJRDTgRU33Hja%2BG%2B3h9ywLAJJNRq4Pjbb4dQs%3D' (2026-02-19)

so that

error: Package β€˜mingw_w64-pthreads-13.0.0’ in /nix/store/00k5v1i44s1dqjryvq6q414rnha8x6ld-source/pkgs/os-specific/windows/mingw-w64/headers.nix:35 is not available on the requested hostPlatform:
         hostPlatform.system = "x86_64-linux"
         package.meta.platforms = [
           "aarch64-windows"
           "x86_64-windows"
           "i686-windows"
         ]

(i cannot cross compile for windows anymore)

error (gcc-15.2.0):

       > The directory (BUILD_SYSTEM_HEADER_DIR) that should contain system headers does not exist:
       >   /usr/include
       > make[2]: *** [Makefile:3641: stmp-fixinc] Error 1
       > rm gcc.pod
       > make[2]: Leaving directory '/build/build/gcc'
09:32:29
@vcunat:matrix.orgvcunatIt evaluated fine. I'm sorry for the false alarm.10:20:46
@vcunat:matrix.orgvcunatThough the "removed jobs" might be worth investigating: https://hydra.nixos.org/eval/182312310:20:53
@vcunat:matrix.orgvcunat* The jobset evaluated fine. I'm sorry for the false alarm.10:21:51
@alexfmpe:matrix.orgalexfmpe
In reply to @crazychaoz:matrix.org

what happened in between

β€’ Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/41da1e3ea8e23e094e5e3eeb1e6b830468a7399e?narHash=sha256-jp0D4vzBcRKwNZwfY4BcWHemLGUs4JrS3X9w5k/JYDA%3D' (2025-06-14)
  β†’ 'github:NixOS/nixpkgs/724cf38d99ba81fbb4a347081db93e2e3a9bc2ae?narHash=sha256-MpAKyXfJRDTgRU33Hja%2BG%2B3h9ywLAJJNRq4Pjbb4dQs%3D' (2026-02-19)

so that

error: Package β€˜mingw_w64-pthreads-13.0.0’ in /nix/store/00k5v1i44s1dqjryvq6q414rnha8x6ld-source/pkgs/os-specific/windows/mingw-w64/headers.nix:35 is not available on the requested hostPlatform:
         hostPlatform.system = "x86_64-linux"
         package.meta.platforms = [
           "aarch64-windows"
           "x86_64-windows"
           "i686-windows"
         ]

(i cannot cross compile for windows anymore)

error (gcc-15.2.0):

       > The directory (BUILD_SYSTEM_HEADER_DIR) that should contain system headers does not exist:
       >   /usr/include
       > make[2]: *** [Makefile:3641: stmp-fixinc] Error 1
       > rm gcc.pod
       > make[2]: Leaving directory '/build/build/gcc'
That sounds very recent, I've been cross compiling to windows for months
10:40:03
@crazychaoz:matrix.orgcrazychaoz

how?
for me it worked previously with:

          TARGET_CC = "${pkgs.pkgsCross.mingwW64.stdenv.cc}/bin/${pkgs.pkgsCross.mingwW64.stdenv.cc.targetPrefix}cc";

          depsBuildBuild = with pkgs; [
            pkgsCross.mingwW64.stdenv.cc
            pkgsCross.mingwW64.windows.pthreads
            perl
          ];
11:22:33
@alexfmpe:matrix.orgalexfmpeI've mostly used pkgsCross.ucrt64, not sure about that one11:34:48
@alexfmpe:matrix.orgalexfmpe pkgsCross.ucrt64.windows.pthreads builds for me 11:35:41
@alexfmpe:matrix.orgalexfmpe actually pkgsCross.mingwW64.windows.pthreads also builds for me 11:36:45
@alexfmpe:matrix.orgalexfmpeon aarch64-darwin11:36:49
@crazychaoz:matrix.orgcrazychaozi believe the error is with the cc11:38:27
@crazychaoz:matrix.orgcrazychaoz
┃                β”Œβ”€ ⏡ gcc-15.2.0 (buildPhase) ⏱ 5m0s
┃             β”Œβ”€ ⏸ gcc-wrapper-15.2.0
┃          β”Œβ”€ ⏸ stdenv-linux
┃       β”Œβ”€ ⏸ mingw_w64-pthreads-13.0.0
11:40:49
@alexfmpe:matrix.orgalexfmpe nix-build -A pkgsCross.mingwW64.stdenv.cc also built for me 12:01:27
@alexfmpe:matrix.orgalexfmpe
┏━ Dependency Graph:
┃          β”Œβ”€ βœ” dlltool
┃          β”‚  β”Œβ”€ βœ” 001-fix-rpath.patch
┃          β”œβ”€ βœ” meson-1.10.1 ⏱ 5m9s
┃          β”‚                       β”Œβ”€ ↓ βœ” gcc-15.2.0.tar.xz from [2]
┃          β”‚                       β”‚  β”Œβ”€ βœ” mingw_w64-headers-13.0.0 ⏱ 7s
┃          β”‚                       β”‚  β”œβ”€ βœ” x86_64-w64-mingw32-binutils-2.44 ⏱ 3m1s
┃          β”‚                       β”œβ”€ βœ” x86_64-w64-mingw32-binutils-wrapper-2.44 ⏱ 4s
┃          β”‚                    β”Œβ”€ βœ” x86_64-w64-mingw32-nolibc-gcc-15.2.0 ⏱ 6m26s
┃          β”‚                 β”Œβ”€ βœ” win-dll-hook.sh
┃          β”‚              β”Œβ”€ βœ” x86_64-w64-mingw32-nolibc-gcc-wrapper-15.2.0
┃          β”‚           β”Œβ”€ βœ” stdenv-darwin
┃          β”‚        β”Œβ”€ βœ” mingw-w64-x86_64-w64-mingw32-13.0.0 ⏱ 3m53s
┃          β”‚     β”Œβ”€ βœ” x86_64-w64-mingw32-binutils-wrapper-2.44
┃          β”‚  β”Œβ”€ βœ” x86_64-w64-mingw32-nolibc-gcc-wrapper-15.2.0
┃          β”œβ”€ βœ” stdenv-darwin
┃       β”Œβ”€ βœ” mcfgthread-x86_64-w64-mingw32-2.3.1 ⏱ 13s
┃    β”Œβ”€ βœ” x86_64-w64-mingw32-gcc-15.2.0 ⏱ 7m52s
┃ β”Œβ”€ βœ” win-dll-hook.sh
┃ βœ” x86_64-w64-mingw32-gcc-wrapper-15.2.0
12:01:45
@alexfmpe:matrix.orgalexfmpeI can't test on linux right now12:02:07
@alexfmpe:matrix.orgalexfmpe* I can't test on x86_64-linux right now12:02:21
@alexfmpe:matrix.orgalexfmpethis was on master12:03:49
@alexfmpe:matrix.orgalexfmpe if I try in your 724... commit, pkgsCross.mingwW64.stdenv.cc is fetched from cache 12:05:08
@crazychaoz:matrix.orgcrazychaozjust as a sanity check: please update & compile this: https://github.com/CrazyChaoz/backtor12:06:35

Show newer messages


Back to Room ListRoom Version: 6