!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

542 Members
114 Servers

Load older messages


SenderMessageTime
18 Oct 2025
@matthewcroughan:defenestrate.itmatthewcroughan But is solved the headers/type issues like /nix/store/imi8qddc1zxz2s76m5xvmbyl945i1ppg-perl-5.40.0/lib/perl5/5.40.0/aarch64-linux-thread-multi/CORE/proto.h:10777:15: error: unknown type name 'off64_t'; did you mean 'off_t'? 13:49:26
@matthewcroughan:defenestrate.itmatthewcroughan * But it solves the headers/type issues like /nix/store/imi8qddc1zxz2s76m5xvmbyl945i1ppg-perl-5.40.0/lib/perl5/5.40.0/aarch64-linux-thread-multi/CORE/proto.h:10777:15: error: unknown type name 'off64_t'; did you mean 'off_t'? 13:49:34
@matthewcroughan:defenestrate.itmatthewcroughanWill put that in the PR for posterity13:50:01
@qyliss:fairydust.spaceAlyssa RossTry nix-diff13:50:43
@matthewcroughan:defenestrate.itmatthewcroughan
- /nix/store/h19ly4ls25gwznag9i1xypif4a1a2sly-perl5.40.0-DBI-1.644-aarch64-unknown-linux-musl.drv:{out}
+ /nix/store/d24y94s4dv8x33b4r5q57vq9yzqwbc0z-perl5.40.0-DBI-1.644-aarch64-unknown-linux-musl.drv:{out}
• The set of input derivation names do not match:
    - perl-5.40.0
• The environments do not match:
    - AUTOMATED_TESTING=1
    - PERL_AUTOINSTALL=--skipdeps
    - PERL_USE_UNSAFE_INC=1
    - fullperl=/nix/store/imi8qddc1zxz2s76m5xvmbyl945i1ppg-perl-5.40.0
    + NIX_CFLAGS_COMPILE= -Doff64_t=off_t
    nativeBuildInputs=''
    /nix/store/imi8qddc1zxz2s76m5xvmbyl945i1ppg-perl-5.40.0/nix/store/hm7smwqxxgvyja6rvfxnvf428k731gj9-perl-aarch64-unknown-linux-musl-5.40.
13:53:58
@matthewcroughan:defenestrate.itmatthewcroughanAh.. I was still applying my NIX_CFLAGS_COMPILE 13:54:04
@matthewcroughan:defenestrate.itmatthewcroughanBut how exactly would that lead to perl not being found 13:55:06
@matthewcroughan:defenestrate.itmatthewcroughanI guess something checks the types to decide on paths, weird13:55:50
@matthewcroughan:defenestrate.itmatthewcroughan
[33/61] Compiling C++ object libnixutil.so.p/unix_file-descriptor.cc.o
FAILED: [code=1] libnixutil.so.p/unix_file-descriptor.cc.o 
aarch64-unknown-linux-musl-clang++ -Ilibnixutil.so.p -I. -I.. -Iinclude -I../include -I../widecharwidth -Ilinux/include -I../linux/include -Iunix -I../unix -Iunix/include -I../unix/include -I/nix/store/2kq21fj8mcqbb2dk078kdkz0a4slp9y9-libarchive-aarch64-unknown-linux-musl-3.8.1-dev/include -I/nix/store/15nrd5ki3mn2wky0879jq6p8v3nl3ins-nlohmann_json-aarch64-unknown-linux-musl-3.12.>
../unix/file-descriptor.cc:174:20: error: use of undeclared identifier 'SYS_close_range'; did you mean 'unix_close_range'?
  174 |     return syscall(SYS_close_range, first, last, (unsigned int) flags);
      |                    ^~~~~~~~~~~~~~~
      |                    unix_close_range
../unix/file-descriptor.cc:171:12: note: 'unix_close_range' declared here
  171 | static int unix_close_range(unsigned int first, unsigned int last, int flags)
      |            ^
../unix/file-descriptor.cc:174:12: error: no matching function for call to 'syscall'
  174 |     return syscall(SYS_close_range, first, last, (unsigned int) flags);
      |            ^~~~~~~
/nix/store/4w3bhgsi1al9v1jwgk9vc6ch20l7ynba-musl-aarch64-unknown-linux-musl-1.2.5-dev/include/unistd.h:180:6: note: candidate function not viable: no known conversion from 'int (unsigned int, unsigned int, int)' to 'long' for 1st argument
  180 | long syscall(long, ...);
      |      ^       ~~~~
14:01:32
@matthewcroughan:defenestrate.itmatthewcroughanIs the suggestion that the compiler provides correct?14:01:39
@matthewcroughan:defenestrate.itmatthewcroughan use of undeclared identifier 'SYS_close_range'; did you mean 'unix_close_range'? 14:01:46
@matthewcroughan:defenestrate.itmatthewcroughan SYS_close_range and unix_close_range are both used in the same file 14:04:07
@matthewcroughan:defenestrate.itmatthewcroughan * SYS_close_range and unix_close_range are both used in the same file (src/libutil/unix/file-descriptor.cc) 14:04:17
@matthewcroughan:defenestrate.itmatthewcroughanhttps://www.openwall.com/lists/musl/2025/09/13/114:05:32
@dramforever:matrix.orgdramforever no because this is inside unix_close_range 14:05:37
@dramforever:matrix.orgdramforever
#if defined(__linux__) || defined(__FreeBSD__)
static int unix_close_range(unsigned int first, unsigned int last, int flags)
{
#  if !HAVE_CLOSE_RANGE
    return syscall(SYS_close_range, first, last, (unsigned int) flags);
#  else
    return close_range(first, last, flags);
#  endif
}
#endif
14:06:05
@matthewcroughan:defenestrate.itmatthewcroughanah yes, so it's like, musl doesn't have it14:06:25
@dramforever:matrix.orgdramforeverimplementing unix_close_range in terms of unix_close_range would be funny ... no it wouldn't work14:06:25
@matthewcroughan:defenestrate.itmatthewcroughanso it tries to use SYS_close_range14:06:29
@dramforever:matrix.orgdramforeverwhat musl version are you on again14:09:08
@matthewcroughan:defenestrate.itmatthewcroughan1.25, everything I'm doing is based on staging-next always14:09:48
@matthewcroughan:defenestrate.itmatthewcroughanif I'm ever behind it's by a day or two 14:09:55
@matthewcroughan:defenestrate.itmatthewcroughan* 1.2.5, everything I'm doing is based on staging-next always14:10:11
@matthewcroughan:defenestrate.itmatthewcroughanthis is gnu-musl-llvm and musl-llvm though, I went back to musl native for testing, and I get a different error there in nix-expr14:10:55
@matthewcroughan:defenestrate.itmatthewcroughanthe error about close_range is from llvm/musl, so I guess it's about tha14:11:09
@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

Show newer messages


Back to Room ListRoom Version: 6