!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

564 Members
118 Servers

Load older messages


SenderMessageTime
12 Feb 2026
@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
@opna2608:matrix.orgPuna i think the issue is that we fix up the target triplet for clang by passing -target powerpc64-unknown-linux-gnu, but don't have a powerpc64-unknown-linux-gnu-ld in clangStdenv.cc.bintools. only a powerpc64-unknown-linux-gnuabielfv1-ldguh 13:29:26
@opna2608:matrix.orgPuna -fuse-ld=<full path to corresponding bintools wrapper>/bin/<original target>-ld works… anything against throwing this into the General clang support section somehow? 13:44:39
@opna2608:matrix.orgPuna * -fuse-ld=<full path to corresponding bintools wrapper>/bin/<original target triplet>-ld works… anything against throwing this into the General clang support section somehow? 13:44:49
@opna2608:matrix.orgPuna"if doing cross cross and <new target triplet>-ld doesn't exist, add the above flag"13:45:26
@opna2608:matrix.orgPunaor it might be time to look deeper into clang and figure out how to make it just accept our full triplets like GCC does, instead of requiring all this song-and-dance. but big scary code base…13:46:24
@grizzlt:matrix.orgGrizzlT joined the room.20:33:44
13 Feb 2026
@hoplophfeil:matrix.orghoplopf joined the room.10:20:07
@opna2608:matrix.orgPuna

so it definitely also links build-grub-mkfont with a freetype for the wrong platform when cross-compiling for other targets, but it only seems to complain when there is a difference in endianness? wack…

gcc -o build-grub-mkfont -I./include -std=gnu99 -fno-common  -DGRUB_FILE=\"util/grub-mkfont.c\" -I. -I. -I. -I. -I./include -I./include -I./grub-core/lib/libgcrypt-grub/src/  -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-mkfont\" util/grub-mkfont.c grub-core/unidata.c grub-core/kern/emu/misc.c util/misc.c -I/nix/store/cc1p26vnf53s7rk01hazvi1x6r90rhw8-freetype-aarch64-unknown-linux-gnu-2.13.3-dev/include/freetype2 -L/nix/store/x49s38xdy4h12k0ynrfh5z6xv9qhppjb-freetype-aarch64-unknown-linux-gnu-2.13.3/lib -lfreetype
[...]
./build-grub-mkfont -o unicode.pf2 /nix/store/6d4rjzwgsh8vlr8pmzikxzlm5jrnd4lc-unifont-aarch64-unknown-linux-gnu-16.0.03/share/fonts/unifont.pcf.gz || (rm -f unicode.pf2; exit 1)
14:35:11
@opna2608:matrix.orgPunahttps://github.com/NixOS/nixpkgs/pull/49012814:49:00
@stas:mainframe.lvStasI hope to learn more about nix by osmosis just by being in these channels :)17:46:17
15 Feb 2026
@matthewcroughan:defenestrate.itmatthewcroughan changed their display name from matthewcroughan @fosdem to matthewcroughan.17:37:03
16 Feb 2026
@zimward:zimward.moezimward changed their display name from zimward to zim.13:48:48
@zimward:zimward.moezimward changed their display name from zim to zimward.13:50:12
@mon:tchncs.depneumatic changed their profile picture.15:18:32
18 Feb 2026
@leonard:menzel.lolLeonard-Orlando Menzelhas someone successfully crosscompiled gnome passes? it fails at build, but if i change the python in native buildinputs to ' (buildPackages.python3.withPackages (pp: [ pp.pygobject3 ]))' (adding the buildPackages prefix) it successuflly compiles, but i cant execute the resulting binary11:34:53
@artturin:matrix.orgArtturinWhat's the package name, I don't see a package called gnome-passes11:59:45
@artturin:matrix.orgArtturin .withPackages discards splicing so you have to python3.pythonOnBuildForHost or buildPackages.python3 12:01:02
@leonard:menzel.lolLeonard-Orlando Menzel the package name is just passes 12:09:15
@artturin:matrix.orgArtturinDoesn't look related to gnome :P12:11:04
@artturin:matrix.orgArtturinWhy does it not launch12:11:09
@artturin:matrix.orgArtturinCan't cross on my laptop atm12:11:14
@artturin:matrix.orgArtturinWrong python in some place I assume12:13:05

Show newer messages


Back to Room ListRoom Version: 6