!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

577 Members
125 Servers

Load older messages


SenderMessageTime
9 Feb 2026
@opna2608:matrix.orgPuna * (#exotic:nixos.org might be a better channel for this until this rolls back to being about issues with cross, but I'll reply here ig)
https://github.com/NixOS/nixpkgs/pull/488831 is what I needed for the installer to be recognised (and for it to look nice in the boot menu).
https://github.com/OPNA2608/nixpkgs/commit/848a9e2f68e726b3727d10e759074eae3c6414e6 has the config i'm using.
env "NIX_PATH=nixpkgs=$PWD:nixos-config=$PWD/newworldmac-nixos-installer.nix" nom-build ./nixos -A config.system.build.images.iso is what i've been using to build it.
and the wip/ppc64-installer branch on my nixpkgs fork has the full nixpkgs state that i've been using to build & test everything. cherrypicked fixes from master-past-fork and staging, and relevant open PRs.
19:31:44
10 Feb 2026
@mon:tchncs.depneumatic changed their display name from ribosomerocker to pneumatic.10:28:26
@ashley_:matrix.org@ashley_:matrix.org left the room.10:36:46
@grimmauld:m.grimmauld.deGrimmauld (any/all) left the room.19:48:27
@janusz-bit:matrix.org@janusz-bit:matrix.org left the room.22:42:57
11 Feb 2026
@stas:mainframe.lvStasThank you! I will try it out on weekend and let you know. For now I am preparing electricity in the mancave. Wife wants me out of the bedroom with my gear :D06:48:00
@stas:mainframe.lvStasthe screenshot of boot menu is epic11:22:49
@stas:mainframe.lvStasI am starting on the build11:23:01
@stas:mainframe.lvStastrying to YOLO the cross compile. If that fails, I will move to a native build or try QEMU static12:04:06
@opna2608:matrix.orgPuna

https://github.com/NixOS/nixpkgs/issues/473862#issuecomment-3872075407 has a change to rust-bindgen which may get you further, if you fail on smth with

Unable to generate bindings: clang diagnosed error: error: version 'abielfv1' in target triple 'powerpc64-unknown-linux-gnuabielfv1' is invalid
12:08:54
@stas:mainframe.lvStas

it stopped on GRUB:

make[2]: *** [Makefile:14916: unicode.pf2] Error 1
       > ./build-grub-mkfont: error while loading shared libraries: /nix/store/92k5h8m28vfmvsdn464yfbi7br8wrb55-freetype-powerpc64-unknown-linux-gnuabielfv1-2.13.3/lib/libfreetype.so.6: ELF file data encoding not little-endian

It tried to generate fonts and got confused between host and cross system it seems. No worries, I will try it on a native system on the weekend

17:06:23
@opna2608:matrix.orgPuna i feel like i had fixed that at some point when i tried to test grub2_ieee1275 built cross… 17:28:03
@opna2608:matrix.orgPuna ah, i must've excluded that to get rid of 10.rebuild-nixos-tests17:29:48
@opna2608:matrix.orgPunahttps://github.com/NixOS/nixpkgs/commit/5dd035f7ff49bf2ff560720e46d5505cd02e1367 try applying this17:30:37
@opna2608:matrix.orgPuna * ah, i must've excluded that to get rid of 10.rebuild-nixos-tests on the grub2_ieee1275 init, and then forgotten about submitting that separately… 17:37:15
@stas:mainframe.lvStasapplied, and re-trying17:59:03
@opna2608:matrix.orgPuna building the BootX with the fancy nixos flake icon cross fails. moving ppm2osbadgeicon from the let block into pkgs/by-name/pm/ppm2osbadgeicons so it doesn't try to run a cross-compiled binary should fix it… 18:17:28
12 Feb 2026
@stas:mainframe.lvStas

it did not get that far yet. Cross compiling libqrtr fails:

libqrtr-glib> /nix/store/w74a7hgymrh13gknfm07nmbs8nnzx625-qemu-user-10.1.2/bin/qemu-ppc64: error while loading shared libraries: /nix/store/pyzyni2iaxjq6cw58ffyr70dcf1ydav7-glib-powerpc64-unknown-linux-gnuabielfv1-2.86.3/lib/libglib-2.0.so.0: ELF file data encoding not little-endian

any direction I should look at? I am clsoe to finishing the installer cross compile

07:58:27
@stas:mainframe.lvStas

this one has some special logic for meson cross-compile:

  strictDeps = true;

  depsBuildBuild = [
    pkg-config
  ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    gobject-introspection
    gtk-doc
    docbook-xsl-nons
    docbook_xml_dtd_43
  ]
  ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
    mesonEmulatorHook
  ];

  buildInputs = [
    glib
  ];
08:28:03
@stas:mainframe.lvStas

it tried to use the following qemu wrapper:

#! /nix/store/mlbapfqmfrar7b87hmv2s9vb3g9dq3p7-bash-interactive-5.3p3/bin/bash
# shellcheck shell=bash

# fixes issues like
# libdbusmenu-gtk3-aarch64-unknown-linux-gnu> /build/libdbusmenu-16.04.0/libdbusmenu-gtk/tmp-introspect2jhtiwwn/.libs/DbusmenuGtk3-0.4:
# error while loading shared libraries: libdbusmenu-glib.so.4: cannot open shared object file: No such file or directory
# in non-meson builds

# see: https://github.com/void-linux/void-packages/blob/master/srcpkgs/gobject-introspection/files/g-ir-scanner-qemuwrapper
# https://github.com/openembedded/openembedded-core/blob/c5a14f39a6717a99b510cb97aa2fb403d4b98d99/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb#L74
while read -r d; do \
    # some meson projects may have subprojects which use makefiles for docs(e.g. gi-docgen), ignore those as they will never be needed
    if [[ -f "$d/Makefile" && "$d" != *"subproject"* ]]; then
        GIR_EXTRA_LIBS_PATH="$(readlink -f "$d/.libs"):$GIR_EXTRA_LIBS_PATH"
        export GIR_EXTRA_LIBS_PATH
    fi
done < <(find "$NIX_BUILD_TOP" -type d)

# quoting broke the build of atk
# shellcheck disable=2086
exec /nix/store/w74a7hgymrh13gknfm07nmbs8nnzx625-qemu-user-10.1.2/bin/qemu-ppc64 ${GIR_EXTRA_OPTIONS:-} \
    ${GIR_EXTRA_LIBS_PATH:+-E LD_LIBRARY_PATH="${GIR_EXTRA_LIBS_PATH}"} \
    "$@"
09:58:36
@stas:mainframe.lvStasand seems it passed some ppc64 binaries in the LD_ paths I think09:58:56
@stas:mainframe.lvStasqemu-ppc64 seems to work fine, it is my host native binary09:59:42
@leonard:menzel.lolLeonard-Orlando Menzel joined the room.10:20:22
@leonard:menzel.lolLeonard-Orlando Menzelhi, can someone take a look at https://github.com/NixOS/nixpkgs/pull/489743 please? it does fix one issue for fractal to crosscompile but i am not sure if this is the most elegant way to solve it11:36:24
@stas:mainframe.lvStas

if I disable modemmanager, it fails on gdk-pixbuf:

gdk-pixbuf> /nix/store/w74a7hgymrh13gknfm07nmbs8nnzx625-qemu-user-10.1.2/bin/qemu-ppc64: error while loading shared libraries: /nix/store/pyzyni2iaxjq6cw58ffyr70dcf1ydav7-glib-powerpc64-unknown-linux-gnuabielfv1-2.86.3/lib/libglib-2.0.so.0: ELF file data encoding not little-endian
12:01:58
@opna2608:matrix.orgPunathat sounds like something got linked incorrectly. built for the buildPlatform, but with hostPlatform library paths in its rpath.12:08:57
@opna2608:matrix.orgPuna

i'm failing in pkgsCross.ppc64-elfv1.capnproto with pkgsCross.ppc64-elfv1.clangStdenv.cc being non-functional.

capnproto> -- Check for working CXX compiler: /nix/store/dw2m30ah26gl0rkxk585v85j5lh6sw8s-powerpc64-unknown-linux-gnuabielfv1-clang-wrapper-21.1.7/bin/powerpc64-unknown-linux-gnuabielfv1-clang++ - broken
[...]
capnproto>     Building CXX object CMakeFiles/cmTC_abe92.dir/testCXXCompiler.cxx.o
capnproto>     /nix/store/dw2m30ah26gl0rkxk585v85j5lh6sw8s-powerpc64-unknown-linux-gnuabielfv1-clang-wrapper-21.1.7/bin/powerpc64-unknown-linux-gnuabielfv1-clang++   -std=c++20  -MD -MT CMakeFiles/cmTC_abe92.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_abe92.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_abe92.dir/testCXXCompiler.cxx.o -c /build/source/build/CMakeFiles/CMakeScratch/TryCompile-idO2pp/testCXXCompiler.cxx
[with -v added to clang shows its internal invocations]
capnproto>      "ld" --hash-style=gnu --eh-frame-hdr -m elf64ppc 
capnproto>     clang++: error: unable to execute command: posix_spawn failed: No such file or directory
capnproto>     clang++: error: linker command failed with exit code 1 (use -v to see invocation)
12:42:07
@opna2608:matrix.orgPunai'll try to submit the grub thing from earlier when i have time (not rn) and i'll adjust the bootx stuff so cross is happier, but i don't have a clue for this one. you might have to setup either a VM or some other linux distro on the machine itself, build the image natively, and let the machine run for afew days…12:43:49
@opna2608:matrix.orgPuna* i'll try to submit the grub thing from earlier when i have time (not rn) and i'll adjust the bootx stuff so cross is happier, but i don't have a clue for this one. you might have to setup either a VM or some other linux distro on the machine itself, start building the image natively, and let the machine run for afew days to complete the builds…12:44:23
@opna2608:matrix.orgPuna(same error on nixpkgs master FWIW)12:45:51

Show newer messages


Back to Room ListRoom Version: 6