!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

535 Members
110 Servers

Load older messages


SenderMessageTime
16 Oct 2025
@dramforever:matrix.orgdramforeverah yes19:06:06
@dramforever:matrix.orgdramforeverthat one also must be static19:06:13
@dramforever:matrix.orgdramforeverit is itself a dynamic linker so it can't rely on another dynamic linker...19:06:32
@matthewcroughan:defenestrate.itmatthewcroughan
s
┃    │  │        ┌─ ⏸ libgcc-aarch64-unknown-linux-musl-14.3.0
┃    │  │     ┌─ ⏸ glibc-aarch64-unknown-linux-musl-2.40-66
┃    │  │  ┌─ ⏸ initrd-linux-aarch64-unknown-linux-musl-6.17.3
┃    │  ├─ ⏸ boot.json
┃    ├─ ⏸ nixos-system-nixos-25.11.20251016.6bec4e9
┃ ┌─ ⏸ run-nixos-vm
┃ ⏸ nixos-vm

I've gotten rid of that anyway, and now this

19:06:40
@matthewcroughan:defenestrate.itmatthewcroughanSo it looks like actually initrd itself depends on glibc19:07:04
@matthewcroughan:defenestrate.itmatthewcroughan nixos/modules/system/boot/systemd/initrd.nix- "${pkgs.glibc}/lib/libnss_files.so.2" 19:08:27
@matthewcroughan:defenestrate.itmatthewcroughan ah yeah ElvishJerricco already found this yesterday 19:08:33
@matthewcroughan:defenestrate.itmatthewcroughanHaha! Hell yeah 19:23:41
@matthewcroughan:defenestrate.itmatthewcroughanI fixed that, and now I have a native musl VM running :)19:23:48
@matthewcroughan:defenestrate.itmatthewcroughanAnd not just musl, but llvm built too19:24:00
@matthewcroughan:defenestrate.itmatthewcroughanActually, musl fails with the oddest error ever19:24:24
@matthewcroughan:defenestrate.itmatthewcroughan* Actually, musl native fails with the oddest error ever19:24:27
@matthewcroughan:defenestrate.itmatthewcroughan
 error: Cannot build '/nix/store/sbj58dyg6cbhzsxx2kbwy9ry0jmwawi5-perl5.40.0-DBI-1.644.drv'.
┃        Reason: builder failed with exit code 2.
┃        Output paths:
┃          /nix/store/4i2c9hd1q0pbk3yfmvbpczwjc7klvd19-perl5.40.0-DBI-1.644
┃          /nix/store/w3vb6ih35x1ag2vfdzrhhiab0ygczin2-perl5.40.0-DBI-1.644-devdoc
┃        Last 25 log lines:
┃        > rm -f blib/arch/auto/DBI/DBI.so
┃        > gcc  -shared -O2 -L/nix/store/c7f4fl560x8sr8znnib46c1ng8shxlvi-musl-1.2.5/lib -fstack-protector-strong  DBI.o  -o blib/arch/auto/DBI/DBI.so  \
┃        >       \
┃        >
┃        > chmod 755 blib/arch/auto/DBI/DBI.so
┃        > "/nix/store/wz6dsqy2ylsa87nc93rhaywnixd1rxhj-perl-5.40.0/bin/perl" "-Iblib/arch" "-Iblib/lib" dbilogstrip.PL dbilogstrip
┃        > Extracted dbilogstrip from dbilogstrip.PL with variable substitutions.
┃        > "/nix/store/wz6dsqy2ylsa87nc93rhaywnixd1rxhj-perl-5.40.0/bin/perl" "-Iblib/arch" "-Iblib/lib" dbiprof.PL dbiprof
┃        > Extracted dbiprof from dbiprof.PL with variable substitutions.
┃        > "/nix/store/wz6dsqy2ylsa87nc93rhaywnixd1rxhj-perl-5.40.0/bin/perl" "-Iblib/arch" "-Iblib/lib" dbiproxy.PL dbiproxy
┃        > Extracted dbiproxy from dbiproxy.PL with variable substitutions.
┃        > cp dbilogstrip blib/script/dbilogstrip
┃        > "/nix/store/wz6dsqy2ylsa87nc93rhaywnixd1rxhj-perl-5.40.0/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/dbilogstrip
┃        > cp dbiprof blib/script/dbiprof
┃        > "/nix/store/wz6dsqy2ylsa87nc93rhaywnixd1rxhj-perl-5.40.0/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/dbiprof
┃        > cp dbiproxy blib/script/dbiproxy
┃        > "/nix/store/wz6dsqy2ylsa87nc93rhaywnixd1rxhj-perl-5.40.0/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/dbiproxy
┃        > Manifying 3 pod documents
┃        > Manifying 49 pod documents
┃        > Running phase: checkPhase
┃        > check flags: SHELL=/nix/store/pgpkqmkb27m3m16c58ls6387vd6ah0k0-bash-5.3p3/bin/bash VERBOSE=y test
┃        > "/nix/store/wz6dsqy2ylsa87nc93rhaywnixd1rxhj-perl-5.40.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- DBI.bs blib/arch/auto/DBI/DBI.bs 644
┃        > PERL_DL_NONLAZY=1 "/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
┃        > /nix/store/pgpkqmkb27m3m16c58ls6387vd6ah0k0-bash-5.3p3/bin/bash: line 1: /bin/perl: No such file or directory
┃        > make: *** [Makefile:1435: test_dynamic] Error 127
┃        For full logs, run:
┃          nix log /nix/store/sbj58dyg6cbhzsxx2kbwy9ry0jmwawi5-perl5.40.0-DBI-1.644.drv
19:24:38
@matthewcroughan:defenestrate.itmatthewcroughanI guess my perl overlay does not work as expected 19:29:35
@matthewcroughan:defenestrate.itmatthewcroughanYeah it doesn't 19:29:52
@dramforever:matrix.orgdramforeveri can't reproduce the "ld" thing19:31:18
@dramforever:matrix.orgdramforeverwith or without my patch19:31:23
@dramforever:matrix.orgdramforeverso i have no idea what went wrong19:31:35
@matthewcroughan:defenestrate.itmatthewcroughanid thing?19:35:05
@dramforever:matrix.orgdramforeverthis19:35:51
@matthewcroughan:defenestrate.itmatthewcroughan oh, ld 19:35:58
@matthewcroughan:defenestrate.itmatthewcroughanmisread19:35:59
@dramforever:matrix.orgdramforeverdo you have the full logs of that19:37:29
@matthewcroughan:defenestrate.itmatthewcroughanyeah here's one https://hercules-ci.com/accounts/github/MatthewCroughan/derivations/%2Fnix%2Fstore%2F6xi1bfv9ndvsqxl4d12pf69i9zf78r0y-musl-static-aarch64-unknown-linux-musl-1.2.5.drv/log?via-job=12eff0bd-584c-4702-a61a-6e8f2964d6be19:38:33
@matthewcroughan:defenestrate.itmatthewcroughan

dramforever:

20:20:36
@matthewcroughan:defenestrate.itmatthewcroughan *

dramforever:

        > FAILED: [code=1] libnixexpr.so
┃        > aarch64-unknown-linux-musl-g++  -o libnixexpr.so libnixexpr.so.p/meson-generated_.._parser-tab.cc.o libnixexpr.so.p/meson-generated_.._lexer-tab.cc.o libnixexpr.so.p/attr-path.cc.o libnixexpr.so.p/attr-set.cc.o libnixexpr.so.p/eval-cache.cc.o libnixexpr.so.p/eval-error.cc.o libnixexpr.so.p/eval-gc.cc.o libnixexpr.so.p/eval-profiler-settings.cc.o libnixexpr.so.p/eval-p…
┃        > /nix/store/bifvnbzdcmm08kmvwj655a5dsyrh27l6-fortify-headers-1.1alpine3/include/stdio.h: In function '__to_xstring.constprop':
┃        > /nix/store/bifvnbzdcmm08kmvwj655a5dsyrh27l6-fortify-headers-1.1alpine3/include/stdio.h:80:28: error: inlining failed in call to 'always_inline' 'vsnprintf': function body can be overwritten at link time
┃        >    80 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
┃        >       |                            ^
┃        > /nix/store/v458d50aj6bcw0a0zzvkyiixyfakcz40-aarch64-unknown-linux-musl-gcc-14.3.0/include/c++/14.3.0/ext/string_conversions.h:113:32: note: called from here
┃        >   113 |       const int __len = __convf(__s, __n, __fmt, __args);
┃        >       |                                ^
┃        > make: *** [/build/ccCwh0jE.mk:86: /build/cccuMbHY.ltrans28.ltrans.o] Error 1
┃        > make: *** Waiting for unfinished jobs....
┃        > lto-wrapper: fatal error: make returned 2 exit status
┃        > compilation terminated.
┃        > /nix/store/pyfh6ldzdr8m3xkpxi60cjg6abha8r7i-aarch64-unknown-linux-musl-binutils-2.44/bin/aarch64-unknown-linux-musl-ld: error: lto-wrapper failed
┃        > collect2: error: ld returned 1 exit status
┃        > ninja: build stopped: subcommand failed.
┃        For full logs, run:
┃          nix log /nix/store/82aawiy1fids0wp7n9y8d18issf6d00a-nix-expr-aarch64-unknown-linux-musl-2.31.2.drv
`1``
20:20:40
@matthewcroughan:defenestrate.itmatthewcroughan *

dramforever:

        > FAILED: [code=1] libnixexpr.so
┃        > aarch64-unknown-linux-musl-g++  -o libnixexpr.so libnixexpr.so.p/meson-generated_.._parser-tab.cc.o libnixexpr.so.p/meson-generated_.._lexer-tab.cc.o libnixexpr.so.p/attr-path.cc.o libnixexpr.so.p/attr-set.cc.o libnixexpr.so.p/eval-cache.cc.o libnixexpr.so.p/eval-error.cc.o libnixexpr.so.p/eval-gc.cc.o libnixexpr.so.p/eval-profiler-settings.cc.o libnixexpr.so.p/eval-p…
┃        > /nix/store/bifvnbzdcmm08kmvwj655a5dsyrh27l6-fortify-headers-1.1alpine3/include/stdio.h: In function '__to_xstring.constprop':
┃        > /nix/store/bifvnbzdcmm08kmvwj655a5dsyrh27l6-fortify-headers-1.1alpine3/include/stdio.h:80:28: error: inlining failed in call to 'always_inline' 'vsnprintf': function body can be overwritten at link time
┃        >    80 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
┃        >       |                            ^
┃        > /nix/store/v458d50aj6bcw0a0zzvkyiixyfakcz40-aarch64-unknown-linux-musl-gcc-14.3.0/include/c++/14.3.0/ext/string_conversions.h:113:32: note: called from here
┃        >   113 |       const int __len = __convf(__s, __n, __fmt, __args);
┃        >       |                                ^
┃        > make: *** [/build/ccCwh0jE.mk:86: /build/cccuMbHY.ltrans28.ltrans.o] Error 1
┃        > make: *** Waiting for unfinished jobs....
┃        > lto-wrapper: fatal error: make returned 2 exit status
┃        > compilation terminated.
┃        > /nix/store/pyfh6ldzdr8m3xkpxi60cjg6abha8r7i-aarch64-unknown-linux-musl-binutils-2.44/bin/aarch64-unknown-linux-musl-ld: error: lto-wrapper failed
┃        > collect2: error: ld returned 1 exit status
┃        > ninja: build stopped: subcommand failed.
┃        For full logs, run:
┃          nix log /nix/store/82aawiy1fids0wp7n9y8d18issf6d00a-nix-expr-aarch64-unknown-linux-musl-2.31.2.drv
20:20:43
@matthewcroughan:defenestrate.itmatthewcroughan *

dramforever:

        > FAILED: [code=1] libnixexpr.so
┃        > aarch64-unknown-linux-musl-g++  -o libnixexpr.so libnixexpr.so.p/meson-generated_.._parser-tab.cc.o libnixexpr.so.p/meson-generated_.._lexer-tab.cc.o libnixexpr.so.p/attr-path.cc.o libnixexpr.so.p/attr-set.cc.o libnixexpr.so.p/eval-cache.cc.o libnixexpr.so.p/eval-error.cc.o libnixexpr.so.p/eval-gc.cc.o libnixexpr.so.p/eval-profiler-settings.cc.o libnixexpr.so.p/eval-p…
┃        > /nix/store/bifvnbzdcmm08kmvwj655a5dsyrh27l6-fortify-headers-1.1alpine3/include/stdio.h: In function '__to_xstring.constprop':
┃        > /nix/store/bifvnbzdcmm08kmvwj655a5dsyrh27l6-fortify-headers-1.1alpine3/include/stdio.h:80:28: error: inlining failed in call to 'always_inline' 'vsnprintf': function body can be overwritten at link time
┃        >    80 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
┃        >       |                            ^
┃        > /nix/store/v458d50aj6bcw0a0zzvkyiixyfakcz40-aarch64-unknown-linux-musl-gcc-14.3.0/include/c++/14.3.0/ext/string_conversions.h:113:32: note: called from here
┃        >   113 |       const int __len = __convf(__s, __n, __fmt, __args);
┃        >       |                                ^
┃        > make: *** [/build/ccCwh0jE.mk:86: /build/cccuMbHY.ltrans28.ltrans.o] Error 1
┃        > make: *** Waiting for unfinished jobs....
┃        > lto-wrapper: fatal error: make returned 2 exit status
┃        > compilation terminated.
┃        > /nix/store/pyfh6ldzdr8m3xkpxi60cjg6abha8r7i-aarch64-unknown-linux-musl-binutils-2.44/bin/aarch64-unknown-linux-musl-ld: error: lto-wrapper failed
┃        > collect2: error: ld returned 1 exit status
┃        > ninja: build stopped: subcommand failed.
┃        For full logs, run:
┃          nix log /nix/store/82aawiy1fids0wp7n9y8d18issf6d00a-nix-expr-aarch64-unknown-linux-musl-2.31.2.drv

This is what I get next

20:20:53
@matthewcroughan:defenestrate.itmatthewcroughanthis is for gnu->musl20:21:06
@matthewcroughan:defenestrate.itmatthewcroughanWoo20:53:45

Show newer messages


Back to Room ListRoom Version: 6