!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

486 Members
102 Servers

Load older messages


SenderMessageTime
28 Apr 2025
@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
@rhelmot:matrix.orgrhelmotif you submit a patch I'll test it06:18:25
@qyliss:fairydust.spaceAlyssa Ross lib.meta.availableOn pls 06:43:48
@artturin:matrix.orgArtturin Maybe like this availableOn pkgs.stdenv.buildPlatform wine 06:47:09
@artturin:matrix.orgArtturin Or wine.stdenv.buildPlatform 06:48:39
@fliegendewurst:matrix.orgFliegendeWurst funny error message I just got: checking bits per byte... configure: error: failed to compile test program
Interestingly enough it does use the detected value in a sensible way, in exactly two places.. but I'd bet it assumes 8 bits/byte in at least one other place.
22:09:11
29 Apr 2025
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)when will we have cross-compilation for WITCH, the computer that does 9 bits per byte (sign + 8 actual bits)06:44:23
@rosssmyth:matrix.orgrosssmythOr the Apollo Guidance Computer, which was 15 bits per word (which is for all intents and purposes a byte)16:28:46
@k900:0upti.meK900/me laughs in Setun16:29:30
@k900:0upti.meK90018 trit per word16:29:41
@k900:0upti.meK900Yes, trit16:29:44
1 May 2025
@rosariopulella:matrix.orgRosuavio changed their display name from Rosario Pulella to Rosuavio.20:08:33
@oak:universumi.fioak 🏳️‍🌈♥️ changed their display name from oak - mikatammi.fi to oak 🫱⭕🫲.23:18:35
6 May 2025
@rosssmyth:matrix.orgrosssmyth

I was messing around trying to see if I could build a stdenv with gcc-arm-embedded last night. Feels like it should be possible, but I'm unsure of the exact incantation to do so. I'm starting with an embedded stdenv, then trying to override it.

The first issue that apparently cc-wrapper complain if your target platform is not linux or darwin, so I have to pass NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM. Whether this is actually unsupported or not I'm unsure.

I've tried it two ways: One using pkgs.wrapCCWith { stdenvNoCC = pkgsCross.stdenvNoCC; } and one with pkgsCross.wrapCCWith. The former got me closer, but for some reason the wrapper were not being symlinked to the bin dir. Looking at the source I tried a few things, but was unsuccessful in getting it to work. The latter fails because even though I'm trying to make a nolibc wrapper, the gcc wrapper seems to try and access libc directories at pkgs/development/compilers/gcc/common/configure-flags.nix:112:31, resulting in a cannot coerce null to string.

You can find my progress so far here:
https://github.com/RossSmyth/armRepro/tree/NativeWrap
https://github.com/RossSmyth/armRepro/tree/EmbedWrap

If anyone has tried this in the past, let me know if you may know how to wrangle it into shape

16:50:03
7 May 2025
@aerden:matrix.orgAerden joined the room.07:55:08
@szlend:matrix.orgszlend is there any way to get a pkgs instance where buildPlatform != hostPlatform != targetPlatform? 20:30:56
@qyliss:fairydust.spaceAlyssa RossI don't think so20:37:40
@szlend:matrix.orgszlend I'm trying to map how pkgs<host><target> packages are offset inside another pkgs<host><target> and it would really help with understanding 20:58:45
@szlend:matrix.orgszlendit don't actually need to build anything20:59:51
@k900:0upti.meK900Are you trying to do Canadian cross21:09:37

Show newer messages


Back to Room ListRoom Version: 6