!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

563 Members
120 Servers

Load older messages


SenderMessageTime
25 Jan 2026
@matthewcroughan:defenestrate.itmatthewcroughan In that case I get configure: error: C compiler cannot create executables 13:12:11
@matthewcroughan:defenestrate.itmatthewcroughan
Beginning configuration for bash-5.3-release for aarch64-unknown-linux-gnu

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in '/build/bash-5.3':
configure: error: C compiler cannot create executables
13:12:27
@matthewcroughan:defenestrate.itmatthewcroughan Maybe John Ericson would know how to fix it :D 13:13:40
@dramforever:matrix.orgdramforeverdo you have the full log13:13:51
@dramforever:matrix.orgdramforeverfor the first one13:13:52
@matthewcroughan:defenestrate.itmatthewcroughanYeah can put it on termbin, sec13:14:02
@matthewcroughan:defenestrate.itmatthewcroughan
 nix log /nix/store/946y9d3skwapp70wn66s6rvsfsypn9rc-bash-aarch64-unknown-linux-musl-5.3p9.drv | nc termbin.com 9999
https://termbin.com/z6eb
13:14:31
@dramforever:matrix.orgdramforeveryeah looks like c23-ness mismatch13:16:02
@dramforever:matrix.orgdramforeveri love cross compilation13:16:12
@matthewcroughan:defenestrate.itmatthewcroughanAh you would hate native musl llvm stuff more13:19:06
@dramforever:matrix.orgdramforeverhmm, looks like bootstrapping will be "okay"13:24:00
@dramforever:matrix.orgdramforeverlemme give it a try13:24:06
@matthewcroughan:defenestrate.itmatthewcroughanFunny enough, system closures end up smaller if you cross compile instead of native13:24:32
@matthewcroughan:defenestrate.itmatthewcroughanlike I have a small nixos closure built with gnu-llvm-musl, and it comes out smaller than the one build without the gnu cross stuff13:24:51
@matthewcroughan:defenestrate.itmatthewcroughana few megabytes13:24:55
@matthewcroughan:defenestrate.itmatthewcroughanthere's also an accidental linkage to the llvm toolchain that occurs in the native setup that adds 40M13:25:29
@matthewcroughan:defenestrate.itmatthewcroughanbut even when that is corrected for, the cross-compiled setup produces smaller closures13:25:41
@dramforever:matrix.orgdramforeveroh, got tricked by parallel build13:30:48
@dramforever:matrix.orgdramforever yeah it's compiling that with gcc aka $CC_FOR_BUILD 13:31:07
@dramforever:matrix.orgdramforeverwhich is std=c2313:31:09
@dramforever:matrix.orgdramforever

it's this line

gcc -c  -DHAVE_CONFIG_H -DSHELL -I. -I..  -I.. -I../include -I../lib -I.  -Wno-parentheses -Wno-format-security   -g -DCROSS_COMPILING mkbuiltins.c
13:31:25
@dramforever:matrix.orgdramforever has nothing to do with the aarch64-unknown-linux-musl-clang line 13:31:43
@dramforever:matrix.orgdramforever lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) does fix it 13:36:15
@dramforever:matrix.orgdramforeveri'm guessing if you don't condition it on cross it breaks the native bootstrap instead?13:36:44
@matthewcroughan:defenestrate.itmatthewcroughanoooh yeah13:37:06
@matthewcroughan:defenestrate.itmatthewcroughanI see13:37:08
@matthewcroughan:defenestrate.itmatthewcroughan dramforever: next is iproute2 14:46:28
@matthewcroughan:defenestrate.itmatthewcroughanhttps://termbin.com/sz5114:47:02
@matthewcroughan:defenestrate.itmatthewcroughan utils_math.c43:136:13: error: | #define SIOCGSTAMPNS use of undeclared identifier 'UINT_MAX'SI 14:47:29
@rick:matrix.ciphernetics.nlMindaviMissing include maybe? But would be strange vs normal compilation15:14:09

There are no newer messages yet.


Back to Room ListRoom Version: 6