!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

581 Members
128 Servers

Load older messages


SenderMessageTime
7 Mar 2025
@alexfmpe:matrix.orgalexfmpe I'm getting some "cannot find types.h" or "cannot find strings.h" with several things under pkgsCross.aarch64-android-prebuilt 20:42:54
@alexfmpe:matrix.orgalexfmpe * I'm getting some "types.h file not found" or "strings.h file not found" with several things under pkgsCross.aarch64-android-prebuilt 20:43:25
@alexfmpe:matrix.orgalexfmpeany idea how can I dig more into this?20:44:15
@puffnfresh:chat.home.brianmckenna.orgpuffnfresh joined the room.22:17:39
8 Mar 2025
@alexfmpe:matrix.orgalexfmpe I can see the standard header files in
/nix/store/vnpih2i860advbsw2g0dj6cx1j1dc256-aarch64-unknown-linux-android-ndk-toolchain-26.3.11579264/toolchain/sysroot/usr/include
but going by strace -f when reproducing the error, only toolchain/lib/clang/17/include seems to be looked at
02:55:23
@alexfmpe:matrix.orgalexfmpeseems this was working around november02:56:14
@alexfmpe:matrix.orgalexfmpe * I can see the standard header files in
/nix/store/vnpih2i860advbsw2g0dj6cx1j1dc256-aarch64-unknown-linux-android-ndk-toolchain-26.3.11579264/toolchain/sysroot/usr/include
but going by strace -f when reproducing the error on a standalone invocation, only toolchain/lib/clang/17/include seems to be looked at
03:02:27
@qyriad:katesiria.orgQyriad changed their display name from qyriad to Qyriad.21:41:03
9 Mar 2025
@picostove:matrix.orgpicostove joined the room.19:37:53
10 Mar 2025
@charles:computer.surgeryCharles left the room.22:29:16
@axman6:matrix.orgAxman6I'm currently working on moving some projects at work to build using Nix, things are working find for macOS and linux, but we also need to produce artefacts for windows. Specifically, we're bundling a python application using pyinstaller, and the mere involvement of python seems to cause a lot of issues as a lot of what it takes to build a python package involves running code on the buildPlatform which is intended for the hostPlatform. Is there any hope in being able to achieve this? I've managed to build C and C++ things for windows using pkgsCross.mingwW64 (though I'd also love to know if I should target one of the crt platforms instead), but python seems particularly problematic. Maybe some kind of windows based franken-builder that's able to natively run windows binaries under WSL or something?23:41:32
11 Mar 2025
@puffnfresh:chat.home.brianmckenna.orgpuffnfreshNix can execute Windows binaries within WSL00:18:56
@puffnfresh:chat.home.brianmckenna.orgpuffnfreshalternatively, Wine can execute within a Nix build, I've been doing that recently 00:20:37
@puffnfresh:chat.home.brianmckenna.orgpuffnfreshand finally I'm working on native Nix on Windows, but we're many months away from actually building the first derivation 00:21:49
@axman6:matrix.orgAxman6 @puffnfreshG'day g'day - yeah I need to look more into using wine for things. I have a good grasp how a linux VM operates but wine feels like a different beast 00:44:38
@puffnfresh:chat.home.brianmckenna.orgpuffnfresh
{ stdenv
, wine64Packages
}:

stdenv.mkDerivation {
  name = "wine-example";
  nativeBuildInputs = [ wine64Packages.minimal ];
  dontUnpack = true;
  buildPhase = ''
    WINEPREFIX=$PWD/.wine wine64 cmd.exe /c "echo %HOMEDRIVE% > Z:$out"
  '';
}
02:38:39
@alexfmpe:matrix.orgalexfmpe bisected down to https://github.com/NixOS/nixpkgs/issues/191152
confirmed I can get libffi and gmp building again by adding a && !targetPlatform.isAndroid
howver I don't understand why it matters? I'm building from nixos, there's nothing on /usr/include
13:41:24
@alexfmpe:matrix.orgalexfmpeer, rather, bisected down to https://github.com/NixOS/nixpkgs/pull/356162 which fixes that issue13:42:12
@alexfmpe:matrix.orgalexfmpe I guess there's some sysroot shenanigans I don't understand going on and having -nostdlibinc is messing with it? 13:43:50
@alexfmpe:matrix.orgalexfmpe hmm though... merely adding && !targetPlatform.isAndroid seems risky for non-nixos linux as /usr/include can leak there? 13:49:30
@qyliss:fairydust.spaceAlyssa RossRedacted or Malformed Event13:52:46
13 Mar 2025
@phanirithvij:matrix.orgloudgolem
nix-build '<nixpkgs>' --arg crossSystem '(import <nixpkgs> {}).lib.systems.examples.aarch64-multiplatform' -A tinc

nix-build '<nixpkgs>' -A pkgsCross.aarch64-multiplatform.tinc

any reason why lib.systems.examples, examples is there

05:51:13
@phanirithvij:matrix.orgloudgolem *
nix-build '<nixpkgs>' --arg crossSystem '(import <nixpkgs> {}).lib.systems.examples.aarch64-multiplatform' -A tinc

nix-build '<nixpkgs>' -A pkgsCross.aarch64-multiplatform.tinc

any reason why lib.systems.examples, examples is there

05:51:19
@phanirithvij:matrix.orgloudgolem *
nix-build '<nixpkgs>' --arg crossSystem '(import <nixpkgs> {}).lib.systems.examples.aarch64-multiplatform' -A tinc
nix-build '<nixpkgs>' -A pkgsCross.aarch64-multiplatform.tinc

any reason why lib.systems.examples, examples is there

05:51:37
@artturin:matrix.orgArtturin
In reply to @phanirithvij:matrix.org
nix-build '<nixpkgs>' --arg crossSystem '(import <nixpkgs> {}).lib.systems.examples.aarch64-multiplatform' -A tinc
nix-build '<nixpkgs>' -A pkgsCross.aarch64-multiplatform.tinc

any reason why lib.systems.examples, examples is there

It's easier to refer to existing example platforms than to write all the attrs, some platforms have more than just config https://github.com/NixOS/nixpkgs/blob/master/lib/systems/examples.nix

pkgsCross sets are made from examples
https://github.com/NixOS/nixpkgs/blob/b1f2198021490b51fb92b8b09db97b9ba2a7b4ce/pkgs/top-level/stage.nix#L197

05:55:54
@ashwinmathi:matrix.orgAshwin Mathi joined the room.14:58:36
@rosssmyth:matrix.org@rosssmyth:matrix.orgWould it be possible to add a new default/example pkgsCross system that is basically the same as arm-embedded but with newlib-nano? My goal would be to get that GCC cached so that I could use a newer GCC since it seems that latest gcc-arm-embedded update (14) PR was denied. 18:55:20
@rosssmyth:matrix.org@rosssmyth:matrix.orgI don't know what would be involved beyond adding something to the examples file, but I would be willing to do it 19:01:07
15 Mar 2025
@implr:hackerspace.plimplr joined the room.17:07:38
@implr:hackerspace.plimplrI ran into https://github.com/NixOS/nixpkgs/issues/231537 while cross compiling from a x86 host to a rv64 target. I know it's fixed in unstable, but this makes me wonder about a more general problem: Shellcheck doesn't care what host arch it runs on. Theoretically, we could shellcheck the rv64 shell scripts with a host (x86) shellcheck, eliminating the need for a rv64 ghc. Is that even possible in nixpkgs?17:10:09

Show newer messages


Back to Room ListRoom Version: 6