!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

495 Members
108 Servers

Load older messages


SenderMessageTime
27 Apr 2025
@k900:0upti.meK900Cross is like that, yes13:42:29
@k900:0upti.meK900What is failing?13:42:31
@codesupply:matrix.orgAndrew BruceI seem to be hitting this, which is still open: https://github.com/NixOS/nixpkgs/issues/30585813:42:32
@codesupply:matrix.orgAndrew BruceJust gonna rerun without any of my overrides, one sec13:43:43
@codesupply:matrix.orgAndrew Bruceso I get an exec format error when attempting to build klipper with cross13:44:09
@codesupply:matrix.orgAndrew Bruce
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/8cja5ayb2ly220yq2ffz3jq59vjg3nyv-source
source root is source/klippy
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
substituteStream() in derivation klipper-aarch64-unknown-linux-gnu-0.12.0-unstable-2025-03-25: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'klippy.py')
substituteStream() in derivation klipper-aarch64-unknown-linux-gnu-0.12.0-unstable-2025-03-25: WARNING: pattern /usr/bin/env\ python2 doesn't match anything in file 'parsedump.py'
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
no Makefile or custom buildPhase, doing nothing
/nix/store/8zmq6va4hap58sjixw9ligkg0whd59mv-stdenv-linux/setup: line 269: /nix/store/jvvwna8fl73zh1ds2i1si4j116y6xn6j-python3-aarch64-unknown-linux-gnu-3.12.9-env/bin/python: cannot execute binary file: Exec format error
13:45:20
@codesupply:matrix.orgAndrew Brucewhen I try to override that derivation to use buildPackages.python3, I get another error because the python thing in that upstream project can't find a .so13:46:21
@codesupply:matrix.orgAndrew BruceI guess for now I'm wondering if binfmt emulation is the way to go to sidestep cross altogether13:46:58
@k900:0upti.meK900Yeah that's just broken13:47:02
@k900:0upti.meK900binfmt emulation is the way to go if you want to avoid cross, yes13:47:12
@codesupply:matrix.orgAndrew BruceI mean obviously I'd love for this to work, but rn I want my new printer to spring into life :)13:47:38
@codesupply:matrix.orgAndrew BruceIt looks like maybe that upstream project wants to do on-the-fly compilation or something which could mean trouble13:48:29
@k900:0upti.meK900Uhh OK13:48:36
@codesupply:matrix.orgAndrew BruceIt's this if you're interested: https://github.com/Klipper3d/klipper/blob/master/klippy/chelper/__init__.py13:48:41
@k900:0upti.meK900Yeah klipper cross is going to be a huge pain13:48:44
@k900:0upti.meK900Yes I just found that13:48:49
@codesupply:matrix.orgAndrew Brucefeels like the same sort of issue I deal with in a 2nix I've written where some packages want to get clever13:50:11
28 Apr 2025
@rhelmot:matrix.orgrhelmottrying to build pkgsCross.mingwW64.buildPackages.at-spi2-core on an aarch64-linux machine tries to pull in wine64 for some reason and refuses to eval - seems to be splicing related?00:09:36
@rhelmot:matrix.orgrhelmotI could be wrong. gobject-introspection has gotten me with its labrynthine tendrils before00:14:20
@rhelmot:matrix.orgrhelmotoh my god, WHY does gobject-introspection-wrapper use targetPackages. this isn't accounted for by the standard guard about whether to enable introspection for a given project???00:22:39
@rhelmot:matrix.orgrhelmot okay this seems to be the actual minimal issue: pkgsCross.mingwW64.stdenv.targetPlatform.emulatorAvailable pkgs throws instead of returning false. is this intended? 00:51:56
@artturin:matrix.orgArtturin
In reply to @rhelmot:matrix.org
I could be wrong. gobject-introspection has gotten me with its labrynthine tendrils before
Yeah its weird, and I wrote it lol, luckily buildroot had it working before us so I could copy some of their stuff
05:10:01
@artturin:matrix.orgArtturin
In reply to @rhelmot:matrix.org
okay this seems to be the actual minimal issue: pkgsCross.mingwW64.stdenv.targetPlatform.emulatorAvailable pkgs throws instead of returning false. is this intended?
The issue should be that emulatorAvailable doesn't check for the actual availability of the package
06:02:55
@rhelmot:matrix.orgrhelmotI ended up adding an additional clause that checked if the host was x86_64 linux before returning wine, and that seems to have worked06:12:08
@artturin:matrix.orgArtturin
index ce257d5307b6..57cc5189fa3e 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -380,7 +380,7 @@ let
               # arguments, a wrapper should be used.
               if pkgs.stdenv.hostPlatform.canExecute final then
                 lib.getExe (pkgs.writeShellScriptBin "exec" ''exec "$@"'')
-              else if final.isWindows then
+              else if final.isWindows && wine.meta.available then
                 "${wine}/bin/wine${optionalString (final.parsed.cpu.bits == 64) "64"}"
               else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null then
                 "${pkgs.qemu-user}/bin/qemu-${final.qemuArch}"
06:15:15
@rhelmot:matrix.orgrhelmot👀06:15:45
@artturin:matrix.orgArtturin* --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -380,7 +380,7 @@ let # arguments, a wrapper should be used. if pkgs.stdenv.hostPlatform.canExecute final then lib.getExe (pkgs.writeShellScriptBin "exec" ''exec "$@"'') - else if final.isWindows then + else if final.isWindows && wine.meta.available then "${wine}/bin/wine${optionalString (final.parsed.cpu.bits == 64) "64"}" else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null then "${pkgs.qemu-user}/bin/qemu-${final.qemuArch}" 06:15:52
@artturin:matrix.orgArtturin* ``` --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -380,7 +380,7 @@ let # arguments, a wrapper should be used. if pkgs.stdenv.hostPlatform.canExecute final then lib.getExe (pkgs.writeShellScriptBin "exec" ''exec "$@"'') else if final.isWindows then else if final.isWindows && wine.meta.available then "${wine}/bin/wine${optionalString (final.parsed.cpu.bits == 64) "64"}" else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null then "${pkgs.qemu-user}/bin/qemu-${final.qemuArch}" ```06:16:14
@artturin:matrix.orgArtturin* ``` --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -380,7 +380,7 @@ let # arguments, a wrapper should be used. if pkgs.stdenv.hostPlatform.canExecute final then lib.getExe (pkgs.writeShellScriptBin "exec" ''exec "$@"'') - else if final.isWindows then + else if final.isWindows && wine.meta.available then "${wine}/bin/wine${optionalString (final.parsed.cpu.bits == 64) "64"}" else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null then "${pkgs.qemu-user}/bin/qemu-${final.qemuArch}" leo@nixos ~/nixpkgs (git)-[master] %06:16:56
@artturin:matrix.orgArtturin* ``` --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -380,7 +380,7 @@ let # arguments, a wrapper should be used. if pkgs.stdenv.hostPlatform.canExecute final then lib.getExe (pkgs.writeShellScriptBin "exec" ''exec "$@"'') - else if final.isWindows then + else if final.isWindows && wine.meta.available then "${wine}/bin/wine${optionalString (final.parsed.cpu.bits == 64) "64"}" else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null then "${pkgs.qemu-user}/bin/qemu-${final.qemuArch}"06:17:22

Show newer messages


Back to Room ListRoom Version: 6