!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

581 Members
127 Servers

Load older messages


SenderMessageTime
25 Apr 2025
@qyliss:fairydust.spaceAlyssa Ross
In reply to @rosscomputerguy:matrix.org
nix_cc_for_role_post=NIX_CC${role_post}
if [[ ! -z ${!nix_cc_for_role_post-} ]]; then
    export NIX_BINTOOLS_FLAGS="--plugin $(cat ${!nix_cc_for_role_post}/nix-support/orig-cc)/lib/gcc//14.2.1/plugin ${NIX_BINTOOLS_FLAGS-}"
fi

I wonder if this is causing issues from being inside the bintools setup hook

Could replace cat with < and do it in-process I think

08:32:49
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)

I tried crosscompiling gnustep-base, without any luck.... seems adding --host to configure flags is what i need to do, but log suggests i have two host flags then....

I found this android crosscompiling setup which i tried to adapt: https://github.com/gnustep/tools-android/blob/master/phases/30-gnustep-base.sh

09:48:57
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)but if i can't even set the host flag successfully, this is pain09:49:13
@rosscomputerguy:matrix.orgTristan RossTrue, I'll likely do that.16:29:44
@creepinson:matrix.org@creepinson:matrix.org joined the room.23:38:23
26 Apr 2025
@debaa:matrix.orgdebabrata pattnayak joined the room.16:12:09
@awwpotato:envs.net@awwpotato:envs.net changed their profile picture.19:52:47
@reckenrode:matrix.orgRandy EckenrodeHow do I use clang with a MinGW cross? The package’s CMake test for a working C compiler is trying to link libgcc.21:39:53
@reckenrode:matrix.orgRandy EckenrodeIt happens whether I try to use ld from binutils or lld.21:42:15
@reckenrode:matrix.orgRandy Eckenrode GCC appears to be building libgcc_s_seh-1.dll, but it’s trying to link everything but that. 21:56:54
@reckenrode:matrix.orgRandy Eckenrode
/nix/store/wcm9n053jg2c3wj3afbsir8fn96h3az8-x86_64-w64-mingw32-binutils-2.44/bin/x86_64-w64-mingw32-ld: cannot find -lgcc: No such file or directory
/nix/store/wcm9n053jg2c3wj3afbsir8fn96h3az8-x86_64-w64-mingw32-binutils-2.44/bin/x86_64-w64-mingw32-ld: cannot find -lgcc_eh: No such file or directory
/nix/store/wcm9n053jg2c3wj3afbsir8fn96h3az8-x86_64-w64-mingw32-binutils-2.44/bin/x86_64-w64-mingw32-ld: cannot find -lgcc: No such file or directory
/nix/store/wcm9n053jg2c3wj3afbsir8fn96h3az8-x86_64-w64-mingw32-binutils-2.44/bin/x86_64-w64-mingw32-ld: cannot find -lgcc_eh: No such file or directory
21:57:11
@rosscomputerguy:matrix.orgTristan Ross
In reply to @reckenrode:matrix.org
/nix/store/wcm9n053jg2c3wj3afbsir8fn96h3az8-x86_64-w64-mingw32-binutils-2.44/bin/x86_64-w64-mingw32-ld: cannot find -lgcc: No such file or directory
/nix/store/wcm9n053jg2c3wj3afbsir8fn96h3az8-x86_64-w64-mingw32-binutils-2.44/bin/x86_64-w64-mingw32-ld: cannot find -lgcc_eh: No such file or directory
/nix/store/wcm9n053jg2c3wj3afbsir8fn96h3az8-x86_64-w64-mingw32-binutils-2.44/bin/x86_64-w64-mingw32-ld: cannot find -lgcc: No such file or directory
/nix/store/wcm9n053jg2c3wj3afbsir8fn96h3az8-x86_64-w64-mingw32-binutils-2.44/bin/x86_64-w64-mingw32-ld: cannot find -lgcc_eh: No such file or directory
Is this with glibc as well?
22:16:58
@rosscomputerguy:matrix.orgTristan RossIt could be that GCC -> libgcc -> glibc chain22:17:24
@reckenrode:matrix.orgRandy EckenrodeIt’s using the default libc for MinGW on Windows, which is msvcrt IIRC.22:21:12
@reckenrode:matrix.orgRandy EckenrodeUsing a regular stdenv with GCC works, but I’m trying to compile libdispatch, which requires Clang.22:21:30
@reckenrode:matrix.orgRandy Eckenrode* Using a regular stdenv with GCC works (for other packages), but I’m trying to compile libdispatch, which requires Clang.22:21:45
@rosscomputerguy:matrix.orgTristan RossHmm22:22:38
27 Apr 2025
@codesupply:matrix.orgAndrew Bruce joined the room.10:07:08
@honnip:matrix.orgHonnip joined the room.11:22:10
@codesupply:matrix.orgAndrew BruceHey there. I'm having some fun with Klipper (3D printing server) cross compiling from x86 to aarch64. It looks a bit like a regression, since I'm getting the same error messages on latest unstable nixpkgs that have been fixed in prior PRs.13:41:42
@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

Show newer messages


Back to Room ListRoom Version: 6