!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

561 Members
122 Servers

Load older messages


SenderMessageTime
19 Sep 2025
@matthewcroughan:defenestrate.itmatthewcroughanRedacted or Malformed Event17:08:10
@matthewcroughan:defenestrate.itmatthewcroughanpkgsMusl.zig_0_14 seems to build fine, so it's just LLVM causing it17:22:30
@matthewcroughan:defenestrate.itmatthewcroughanfound https://www.reddit.com/r/Zig/comments/18x1wce/is_it_true_that_zig_wants_to_move_away_from_llvm/ 🤔17:22:57
21 Sep 2025
@matthewcroughan:defenestrate.itmatthewcroughan Tristan Ross: When I compile a fully LLVM system, the vm attribute produces something that says this 00:14:44
@matthewcroughan:defenestrate.itmatthewcroughan
unable to handle EFI zboot image with "zstd" compression
qemu-system-aarch64: could not load kernel '/nix/store/fiwxkwxq0nsbmlsbi44cj3jmv0c175nl-nixos-system-nixos-25.11.20250919.8eaee11/kernel'
``
00:14:56
@matthewcroughan:defenestrate.itmatthewcroughan *
unable to handle EFI zboot image with "zstd" compression
qemu-system-aarch64: could not load kernel '/nix/store/fiwxkwxq0nsbmlsbi44cj3jmv0c175nl-nixos-system-nixos-25.11.20250919.8eaee11/kernel'
00:15:01
@matthewcroughan:defenestrate.itmatthewcroughan

However..

  boot.kernelPatches = [
    {
      name = "config-enable-zboot";
      patch = null;
      structuredExtraConfig = {
        EFI_ZBOOT = lib.mkForce lib.kernel.yes;
        KERNEL_ZSTD = lib.mkForce lib.kernel.yes;
        RD_ZSTD = lib.mkForce lib.kernel.yes;
      };
    }
  ];
00:15:19
@matthewcroughan:defenestrate.itmatthewcroughanso I'm not sure what's happening there00:15:24
@matthewcroughan:defenestrate.itmatthewcroughanhttps://grep.app/qemu/qemu/master/hw/core/loader.c?q=unable+to+handle+EFI+zboot+image+with#L88700:15:51
@matthewcroughan:defenestrate.itmatthewcroughanAh okay I see, I'm producing a linux kernel with vmlinuz.efi as the target, which isn't supported by qemu on arm64 I guess00:17:34
@matthewcroughan:defenestrate.itmatthewcroughan* Ah okay I see, I'm producing a linux kernel with vmlinuz.efi as the target, which isn't supported by qemu on aarch64 I guess00:17:38
@matthewcroughan:defenestrate.itmatthewcroughanwhereas for musl I'm just setting crossSystem, here I'm setting nixpkgs.hostPlatform and some linux-kernel args leaked in from my other experiments00:18:00
@rosscomputerguy:matrix.orgTristan Ross
In reply to @matthewcroughan:defenestrate.it
Ah okay I see, I'm producing a linux kernel with vmlinuz.efi as the target, which isn't supported by qemu on arm64 I guess
Just do an uncompressed kernel
01:12:34
@matthewcroughan:defenestrate.itmatthewcroughanI did, that worked fine01:12:43
@matthewcroughan:defenestrate.itmatthewcroughanI have an llvm, llvm-musl, llvm nixos config and the minimal nix files to change that now01:12:57
@matthewcroughan:defenestrate.itmatthewcroughanit's not too much, but it was a lot of research01:13:34
@matthewcroughan:defenestrate.itmatthewcroughanwhen I get my m2 ultra I'm gonna put up some CI on github for it01:15:00
@jannik.wolff:fachschaften.orgJannik Wolff joined the room.08:04:08
@ss:someonex.netSomeoneSerge (back on matrix) py_mod.find_installation() with strictDeps = true seems to pick up meson's interpreter, rather than the python-env wrapper from buildInputs 16:47:51
@ss:someonex.netSomeoneSerge (back on matrix) FWIW I tried to trace the chain from find_installation to find_program in hopes to understand how does one even specify which platform's python they want, and my conclusion was "fuck if I know" 16:48:54
@ss:someonex.netSomeoneSerge (back on matrix)mesonbuild matrix says it's supposed to look for the host python, so something must be wrong on our side21:52:00
@rosssmyth:matrix.orgrosssmyth What are you working on? If this is running at build-time it will probably sniff around PATH and find the meson interpreter or something. Add python to depsBuildBuild or nativeBuildInputs. buildInputs is for a python interpreter than runs on the host machine the final executable runs on, so at build time it will not find it. 22:14:16
@ss:someonex.netSomeoneSerge (back on matrix)

this is running at build-time

It's not, it's for the host. The find_installation method is, according to upstream chat, for the host. It's a meson-packaged gtk app written in python o_0. Native/strictDeps=false works and builds fine, but like why would I want strictDeps=false this is cringe

23:44:02
@ss:someonex.netSomeoneSerge (back on matrix) *

this is running at build-time

It's not, it's for the host. The find_installation method is, according to upstream chat, for the host. It's a meson-packaged (nb: not meson-python) gtk app written in python o_0. Native/strictDeps=false works and builds fine, but like why would I want strictDeps=false this is cringe

23:44:53
22 Sep 2025
@ss:someonex.netSomeoneSerge (back on matrix)Mhmmm update: it's basically the same disaster as cmake, they look to run python from PATH on BUILD, but want its sysconfig to return cross stuff01:11:07
@ss:someonex.netSomeoneSerge (back on matrix)So I guess nvm it's meant to be broken01:11:21
@rosssmyth:matrix.orgrosssmyth Maybe. You might be able to add a path to one of these options https://mesonbuild.com/Builtin-options.html#python-module but who knows. If not then patching your cross-file may be required with substituteInPlace or replaceVars 01:28:56
@rosssmyth:matrix.orgrosssmyth * Maybe. You might be able to add a path to one of these options https://mesonbuild.com/Builtin-options.html#python-module but who knows. If not then patching your cross-file may be required with substituteInPlace or replaceVars 01:29:03
23 Sep 2025
@estrange:matrix.orgestrange joined the room.00:18:31
@a-kenji:matrix.orgkenji changed their display name from a-kenji to kenji.10:42:22

Show newer messages


Back to Room ListRoom Version: 6