!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

530 Members
110 Servers

Load older messages


SenderMessageTime
18 Oct 2025
@matthewcroughan:defenestrate.itmatthewcroughan * the error about close_range is from llvm/musl, so I guess it's about that 14:11:11
@matthewcroughan:defenestrate.itmatthewcroughan

On native musl I get this from nix-expr

[35/35] Linking target libnixexpr.so
FAILED: [code=1] libnixexpr.so
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 libn>
/nix/store/24dkhnp0rpb1hvzx1h5frsbfjmgjfpk9-fortify-headers-1.1alpine3/include/stdio.h: In function ‘__to_xstring.constprop’:
/nix/store/24dkhnp0rpb1hvzx1h5frsbfjmgjfpk9-fortify-headers-1.1alpine3/include/stdio.h:80:28: error: inlining failed in call to ‘always_inline’ ‘vsnprintf’: function body can be overwritte>
   80 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
      |                            ^
/nix/store/f9y6ld56r5lpp6lcg6w865rghclf3yv7-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/ccBmNLOp.mk:86: /build/ccoJfonD.ltrans28.ltrans.o] Error 1
make: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/nix/store/hs52m3pqfjcx4a9wzd26mrq1zh09nnai-binutils-2.44/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
14:11:35
@matthewcroughan:defenestrate.itmatthewcroughan *

On native musl (no llvm), I get this from nix-expr

[35/35] Linking target libnixexpr.so
FAILED: [code=1] libnixexpr.so
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 libn>
/nix/store/24dkhnp0rpb1hvzx1h5frsbfjmgjfpk9-fortify-headers-1.1alpine3/include/stdio.h: In function ‘__to_xstring.constprop’:
/nix/store/24dkhnp0rpb1hvzx1h5frsbfjmgjfpk9-fortify-headers-1.1alpine3/include/stdio.h:80:28: error: inlining failed in call to ‘always_inline’ ‘vsnprintf’: function body can be overwritte>
   80 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
      |                            ^
/nix/store/f9y6ld56r5lpp6lcg6w865rghclf3yv7-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/ccBmNLOp.mk:86: /build/ccoJfonD.ltrans28.ltrans.o] Error 1
make: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/nix/store/hs52m3pqfjcx4a9wzd26mrq1zh09nnai-binutils-2.44/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
14:12:30
@dramforever:matrix.orgdramforeverhow on earth is it different on llvm and gcc14:14:32
@matthewcroughan:defenestrate.itmatthewcroughan Maybe it just fails earlier, I had --keep-going on but didn't spot it 14:14:50
@matthewcroughan:defenestrate.itmatthewcroughan on native musl, I don't see nix-util in the graph even 14:15:56
@matthewcroughan:defenestrate.itmatthewcroughanimage.png
Download image.png
14:15:58
@dramforever:matrix.orgdramforeverbut we definitely build nix against musl right?14:16:12
@matthewcroughan:defenestrate.itmatthewcroughanI guess it comes later, so yeah nix-expr fails first, before I can get a look at nix-util14:16:15
@dramforever:matrix.orgdramforever* but we definitely build nix with musl right?14:16:20
@matthewcroughan:defenestrate.itmatthewcroughanit has worked a lot in the past yeah, though atm it's failing 14:16:26
@matthewcroughan:defenestrate.itmatthewcroughanI've never had an issue with it until this experiment 14:16:40
@dramforever:matrix.orgdramforeverwell maybe close_range is new14:17:01
@matthewcroughan:defenestrate.itmatthewcroughanlooks like 2024 according to blame14:17:21
@dramforever:matrix.orgdramforeverno look https://hydra.nixos.org/job/nix/master/buildStatic.nix-cli.x86_64-linux14:17:23
@matthewcroughan:defenestrate.itmatthewcroughanericsson was refactoring14:17:24
@dramforever:matrix.orgdramforeverit's working14:17:35
@matthewcroughan:defenestrate.itmatthewcroughanstatic and musl aren't the same are they?14:17:37
@dramforever:matrix.orgdramforevermusl 1.2.514:17:37
@matthewcroughan:defenestrate.itmatthewcroughanpkgsStatic vs pkgsMusl14:17:40
@dramforever:matrix.orgdramforeverthey're not but it is definitely musl14:17:48
@dramforever:matrix.orgdramforever so there's something going on in the headers and crap 14:17:56
@dramforever:matrix.orgdramforever

i can't think of anything else

diff --git a/src/libutil/unix/file-descriptor.cc b/src/libutil/unix/file-descriptor.cc
index 2b612e854..194dcb3b6 100644
--- a/src/libutil/unix/file-descriptor.cc
+++ b/src/libutil/unix/file-descriptor.cc
@@ -6,6 +6,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <poll.h>
+#include <sys/syscall.h>
 
 #include "util-config-private.hh"
 #include "util-unix-config-private.hh"
14:19:20
@emilazy:matrix.orgemilyisn't that going to break macOS14:48:12
@emilazy:matrix.orgemily pkgsStatic.nix breaks constantly fwiw 14:48:38
@matthewcroughan:defenestrate.itmatthewcroughanLix builds fine, weird14:48:44
@emilazy:matrix.orgemilyI get the impression it's not a priority14:48:45
@matthewcroughan:defenestrate.itmatthewcroughansetting nix.package to lix hasn't nuked nix from the graph 15:08:25
@matthewcroughan:defenestrate.itmatthewcroughan do I have to say nix = lix in an overlay instead? 15:08:33
@matthewcroughan:defenestrate.itmatthewcroughanIt seems that works, with the exception of switch-to-configuration who dies because of rust things 15:09:54

Show newer messages


Back to Room ListRoom Version: 6