!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

398 Members
92 Servers

Load older messages


SenderMessageTime
27 Sep 2024
@artturin:matrix.orgArtturin* Dunno if it'll fix that but build time tools go in nativeBuildInputs and usually we import nixpkgs with the wanted wanted crossSystem(or use pkgsCross) and then use mkDerivation from it Also do pkgs = (import ./pkgs.nix {}).__splicedPackages for the dependency attributes to work correctly when cross. Or pkgsCross.x.__splicedPackages On native splicing isn't used so it's a noop 23:56:55
@yehowshua:matrix.orgyehowshuaAh!23:58:49
@yehowshua:matrix.orgyehowshua It seems that pkgs.pkgsCross.riscv32.glibc.static did the trick 23:58:54
@yehowshua:matrix.orgyehowshuaI had to explicitly include glibc.static for riscv32 !23:59:09
28 Sep 2024
@artturin:matrix.orgArtturinMaybe we should a hint to https://github.com/NixOS/nixpkgs/blob/master/doc/stdenv/cross-compilation.chapter.md#cross-packaging-cookbook-ssec-cross-cookbook00:06:26
@yehowshua:matrix.orgyehowshuasounds like a good idea!00:07:07
@majiir:matrix.orgMajiir Paktu left the room.00:11:27
@majiir:matrix.orgMajiir Paktu joined the room.00:12:06
@yehowshua:matrix.orgyehowshuaDoes nixpkgs have a multi target gdb?01:35:19
@yehowshua:matrix.orgyehowshuaNeed gdb to help me debug a platform different from host01:35:42
@artturin:matrix.orgArtturinBtw check out https://github.com/nix-community/nix-index for locating files01:40:09
@artturin:matrix.orgArtturin pkgsCross.x.buildPackages.gdb should get you what you want 01:42:21
@yehowshua:matrix.orgyehowshuaDo you have a buy me a coffee button?01:44:43
@yehowshua:matrix.orgyehowshuaYou're saving my butt01:44:47
@artturin:matrix.orgArtturinI got github sponsors enabled01:45:11
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/pull/34498501:45:32
@yehowshua:matrix.orgyehowshuawill send something this weekend01:47:03
@artturin:matrix.orgArtturinThanks!01:47:37
@artturin:matrix.orgArtturin * Thanks in advance!01:47:43
30 Sep 2024
@snylonue:matrix.orgsnylonueHello, I'm wondering if it is possible to cross build to windows using msvc toolchain?01:06:42
@k900:0upti.meK900Somewhat04:05:15
@k900:0upti.meK900Very somewhat04:05:17
@kamillaova:matrix.orgKamilla 'ova what's wrong with this?

user@NixOS ~> nix-build --no-out-link '<nixpkgs>' -A nix --arg crossSystem '{ config = "aarch64-unknown-linux-android"; libc = "bionic"; isStatic = true; }'
error:
       … while evaluating 'strict' to select 'drvPath' on it
         at /builtin/derivation.nix:1:552:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: infinite recursion encountered
       at /nix/store/wrc7by8z4xpp3cz39d61xbv3vgklzdrz-nixos/nixos/pkgs/development/libraries/openssl/default.nix:71:7:
           70|       !(stdenv.hostPlatform.useLLVM or false) &&
           71|       stdenv.cc.isGNU;
             |       ^
           72|
user@NixOS ~ [1]>
10:08:54
@k900:0upti.meK900I doubt this will work as-is10:12:02
@artturin:matrix.orgArtturin
In reply to @kamillaova:matrix.org
what's wrong with this?

user@NixOS ~> nix-build --no-out-link '<nixpkgs>' -A nix --arg crossSystem '{ config = "aarch64-unknown-linux-android"; libc = "bionic"; isStatic = true; }'
error:
       … while evaluating 'strict' to select 'drvPath' on it
         at /builtin/derivation.nix:1:552:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: infinite recursion encountered
       at /nix/store/wrc7by8z4xpp3cz39d61xbv3vgklzdrz-nixos/nixos/pkgs/development/libraries/openssl/default.nix:71:7:
           70|       !(stdenv.hostPlatform.useLLVM or false) &&
           71|       stdenv.cc.isGNU;
             |       ^
           72|
user@NixOS ~ [1]>
Check https://github.com/NixOS/nixpkgs/blob/d590835329e99ddca53f1311ed5e2526f28472a6/lib/systems/examples.nix#L68
14:56:35
@artturin:matrix.orgArtturin
In reply to @kamillaova:matrix.org
what's wrong with this?

user@NixOS ~> nix-build --no-out-link '<nixpkgs>' -A nix --arg crossSystem '{ config = "aarch64-unknown-linux-android"; libc = "bionic"; isStatic = true; }'
error:
       … while evaluating 'strict' to select 'drvPath' on it
         at /builtin/derivation.nix:1:552:
       … while calling the 'derivationStrict' builtin
         at /builtin/derivation.nix:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: infinite recursion encountered
       at /nix/store/wrc7by8z4xpp3cz39d61xbv3vgklzdrz-nixos/nixos/pkgs/development/libraries/openssl/default.nix:71:7:
           70|       !(stdenv.hostPlatform.useLLVM or false) &&
           71|       stdenv.cc.isGNU;
             |       ^
           72|
user@NixOS ~ [1]>
* Check https://github.com/NixOS/nixpkgs/blob/d590835329e99ddca53f1311ed5e2526f28472a6/lib/systems/examples.nix#L76
14:56:48
@kamillaova:matrix.orgKamilla 'ova
In reply to@artturin:matrix.org
Check https://github.com/NixOS/nixpkgs/blob/d590835329e99ddca53f1311ed5e2526f28472a6/lib/systems/examples.nix#L76
will this work with isStatic = true; ?
18:49:47
@k900:0upti.meK900Very unlikely18:54:24
@k900:0upti.meK900Does bionic even support static?18:54:29
@kamillaova:matrix.orgKamilla 'ova
In reply to@k900:0upti.me
Does bionic even support static?
I think yes
18:55:28

Show newer messages


Back to Room ListRoom Version: 6