[24.05] Unable to build bash (and thus almost anything) on aarch64-linux

I am trying to upgrade a couple of aarch64 servers to 24.05 and get this error:

$ nix --max-jobs 1 --keep-failed build   .#nixosConfigurations.vno1-op5p.config.system.build.etc 
warning: input 'pre-commit-hooks' has an override for a non-existent input 'flake-utils'
note: keeping build directory '/tmp/nix-build-bash-aarch64-unknown-linux-gnu-5.2p26.drv-9'
error: builder for '/nix/store/q03i9ay07v2cxsbm01bmcvbqm3ix22nm-bash-aarch64-unknown-linux-gnu-5.2p26.drv' failed with exit code 77;
       last 10 log lines:
       > checking build system type... aarch64-unknown-linux-gnu
       > checking host system type... aarch64-unknown-linux-gnu
       >
       > Beginning configuration for bash-5.2-release for aarch64-unknown-linux-gnu
       >
       > checking for aarch64-unknown-linux-gnu-gcc... aarch64-unknown-linux-gnu-gcc
       > checking whether the C compiler works... no
       > configure: error: in `/build/bash-5.2':
       > configure: error: C compiler cannot create executables
       > See `config.log' for more details
       For full logs, run 'nix log /nix/store/q03i9ay07v2cxsbm01bmcvbqm3ix22nm-bash-aarch64-unknown-linux-gnu-5.2p26.drv'.
error: 1 dependencies of derivation '/nix/store/92isnbgl4laq53dayhqik5h6g8f8v1sc-zstd-aarch64-unknown-linux-gnu-1.5.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/y1sc4jgsn04dx6s6njiw4zazlc5c3k2a-kmod-aarch64-unknown-linux-gnu-31.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8vi2ykk1wyi0aa609zndq4z57nk5xd02-pciutils-aarch64-unknown-linux-gnu-3.12.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hrsmxng3kbjnjfvxmg9770v9m0adnqss-cpupower-aarch64-unknown-linux-gnu-6.9.0-rc1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vzhhwfz4f4brk8xl373mn7l3mr1dzyz1-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vkinbd88yfvds598i58xg9sv63c0dqpn-etc.drv' failed to build

Zooming into config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by bash configure 5.2-release, which was
generated by GNU Autoconf 2.71.  Invocation command line was

  $ ./configure --disable-static --prefix=/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26 --bindir=/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/bin --sbindir=/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/sbin --includedir=/nix/store/12xcpzlmrl0aw9pkxgxqadxi50lbvvgm-bash-aarch64-unknown-linux-gnu-5.2p26-dev/include --oldincludedir=/nix/store/12xcpzlmrl0aw9pkxgxqadxi50lbvvgm-bash-aarch64-unknown-linux-gnu-5.2p26-dev/include --mandir=/nix/store/mfj8rp1ns7vv0m1xyhrxalq9w5w6kqpg-bash-aarch64-unknown-linux-gnu-5.2p26-man/share/man --infodir=/nix/store/lzf8ydalvi03pkrhajdqz6w4y60wfk6i-bash-aarch64-unknown-linux-gnu-5.2p26-info/share/info --docdir=/nix/store/liw6kiqn541zjihyg5rrnwy5dbbkvj65-bash-aarch64-unknown-linux-gnu-5.2p26-doc/share/doc/bash --libdir=/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/lib --libexecdir=/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/libexec --localedir=/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/share/locale --without-bash-malloc --disable-readline bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing bash_cv_getcwd_malloc=yes --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu

## --------- ##
## Platform. ##
## --------- ##

hostname = localhost
uname -m = aarch64
uname -r = 6.9.0-rc1
uname -s = Linux
uname -v = #1-NixOS SMP Tue Jan  1 00:00:00 UTC 1980

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /nix/store/bqwjxqdz2ywf5zy5lw7wbbkbswwbb26x-gcc-wrapper-13.2.0/bin/
PATH: /nix/store/i9w3plvhpwk8x37i5dwqxlfp0knv2zcj-gcc-13.2.0/bin/
PATH: /nix/store/pz1sk0dk0x1k844nlrc6zhi1hck0d2s4-glibc-2.39-52-bin/bin/
PATH: /nix/store/bm07wi55028wb8qm46kb2wg75vik3fwx-coreutils-9.5/bin/
PATH: /nix/store/5pfllkhmmdrwi5z1da1009lx128kfbbq-binutils-wrapper-2.41/bin/
PATH: /nix/store/v71nlgkf8g6d36gac9r44pmlx54mdql3-binutils-2.41/bin/
PATH: /nix/store/v4l8dnw06idkh8zsds7334v93jyffk0f-bison-3.8.2/bin/
PATH: /nix/store/9h381ibkymmnfmns4ljzg4vvxdd291pd-gnum4-1.4.19/bin/
PATH: /nix/store/m921a1vhjlrbwpjdlgrwp6f7dh04a1nx-patchelf-0.15.0/bin/
PATH: /nix/store/4ilsrq88prbw12kmax6ng30lwmibmzsf-aarch64-unknown-linux-gnu-gcc-wrapper-13.2.0/bin/
PATH: /nix/store/7ckbzy7jnzfhsz7cxjs3bbx5r179c69r-aarch64-unknown-linux-gnu-gcc-13.2.0/bin/
PATH: /nix/store/80kndi3i14kridkynsmrdvdinayv4cch-glibc-aarch64-unknown-linux-gnu-2.39-52-bin/bin/
PATH: /nix/store/apn6g494lvvprfpj3664yqma7j8647x2-aarch64-unknown-linux-gnu-binutils-wrapper-2.41/bin/
PATH: /nix/store/9h00ngzzzzb6p5q4wxlaj6dyjhkcivi0-aarch64-unknown-linux-gnu-binutils-2.41/bin/
PATH: /nix/store/bm07wi55028wb8qm46kb2wg75vik3fwx-coreutils-9.5/bin/
PATH: /nix/store/zpihacm37rszgn64jcrj2qry17nlvzml-findutils-4.9.0/bin/
PATH: /nix/store/20d4w79na9xmj8fqqcvxfq0nk8f4mlwb-diffutils-3.10/bin/
PATH: /nix/store/gcizalgh6kmyyv7ssp7y8q3bv9rwxkfw-gnused-4.9/bin/
PATH: /nix/store/h792fsk266s45ijczib9ml3l69k705v4-gnugrep-3.11/bin/
PATH: /nix/store/hcdfvbyv0f0x8hicy9x4qn6q4wc735d0-gawk-5.2.2/bin/
PATH: /nix/store/kp7286vzrhb24j1frd7kk6bvpsrph4iq-gnutar-1.35/bin/
PATH: /nix/store/yrn2br8yajgg9vg3cnbxlzs2j924lyi1-gzip-1.13/bin/
PATH: /nix/store/h4r8ccs1bxdma16rxypyf896h4sa8zg5-bzip2-1.0.8-bin/bin/
PATH: /nix/store/c5fgpic4pq8rmw0gvgbnsbambfd7wgdj-gnumake-4.4.1/bin/
PATH: /nix/store/1fzg4cl3k2n9yq80vg6y1vcmvx3qm682-bash-5.2p26/bin/
PATH: /nix/store/5fycavbrpq4xlbfw6724195apdb7l7j3-patch-2.7.6/bin/
PATH: /nix/store/8l969253d0cvsfb5dbnvnk6xzl3w7i83-xz-5.4.6-bin/bin/
PATH: /nix/store/mxd5m6nvyrd031qflg2mw4nkjp2d435l-file-5.45/bin/


## ----------- ##
## Core tests. ##
## ----------- ##

configure:3017: looking for aux files: config.rpath install-sh config.guess config.sub
configure:3030:  trying ././support/
configure:3059:   ././support/config.rpath found
configure:3044:   ././support/install.sh found
configure:3059:   ././support/config.guess found
configure:3059:   ././support/config.sub found
configure:3193: checking build system type
configure:3208: result: aarch64-unknown-linux-gnu
configure:3228: checking host system type
configure:3242: result: aarch64-unknown-linux-gnu
configure:3913: checking for aarch64-unknown-linux-gnu-gcc
configure:3945: result: aarch64-unknown-linux-gnu-gcc
configure:4343: checking for C compiler version
configure:4352: aarch64-unknown-linux-gnu-gcc --version >&5
aarch64-unknown-linux-gnu-gcc (GCC) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4363: $? = 0
configure:4352: aarch64-unknown-linux-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/nix/store/i9w3plvhpwk8x37i5dwqxlfp0knv2zcj-gcc-13.2.0/libexec/gcc/aarch64-unknown-linux-gnu/13.2.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../gcc-13.2.0/configure --prefix=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gcc-13.2.0 --with-gmp-include=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gmp-6.3.0-dev/include --with-gmp-lib=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gmp-6.3.0/lib --with-mpfr-include=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpfr-4.2.1-dev/include --with-mpfr-lib=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpfr-4.2.1/lib --with-mpc=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libmpc-1.3.1 --with-native-system-header-dir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.39-52-dev/include --with-build-sysroot=/ --with-gxx-include-dir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gcc-13.2.0/include/c++/13.2.0/ --program-prefix= --enable-lto --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-static --enable-languages=c,c++ --disable-multilib --enable-plugin --disable-libcc1 --with-isl=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-isl-0.20 --with-arch=armv8-a --disable-bootstrap --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC) 
configure:4363: $? = 0
configure:4352: aarch64-unknown-linux-gnu-gcc -V >&5
aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option '-V'
aarch64-unknown-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4363: $? = 1
configure:4352: aarch64-unknown-linux-gnu-gcc -qversion >&5
aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
aarch64-unknown-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4363: $? = 1
configure:4352: aarch64-unknown-linux-gnu-gcc -version >&5
aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option '-version'
aarch64-unknown-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4363: $? = 1
configure:4383: checking whether the C compiler works
configure:4405: aarch64-unknown-linux-gnu-gcc    conftest.c  >&5
/nix/store/v71nlgkf8g6d36gac9r44pmlx54mdql3-binutils-2.41/bin/ld: cannot find crt1.o: No such file or directory
/nix/store/v71nlgkf8g6d36gac9r44pmlx54mdql3-binutils-2.41/bin/ld: cannot find crti.o: No such file or directory
/nix/store/v71nlgkf8g6d36gac9r44pmlx54mdql3-binutils-2.41/bin/ld: cannot find -lgcc_s: No such file or directory
collect2: error: ld returned 1 exit status
configure:4409: $? = 1
configure:4449: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "bash"
| #define PACKAGE_TARNAME "bash"
| #define PACKAGE_VERSION "5.2-release"
| #define PACKAGE_STRING "bash 5.2-release"
| #define PACKAGE_BUGREPORT "bug-bash@gnu.org"
| #define PACKAGE_URL ""
| #define ALIAS 1
| #define PUSHD_AND_POPD 1
| #define RESTRICTED_SHELL 1
| #define PROCESS_SUBSTITUTION 1
| #define PROMPT_STRING_DECODE 1
| #define SELECT_COMMAND 1
| #define HELP_BUILTIN 1
| #define ARRAY_VARS 1
| #define DPAREN_ARITHMETIC 1
| #define BRACE_EXPANSION 1
| #define COMMAND_TIMING 1
| #define EXTENDED_GLOB 1
| #define EXTGLOB_DEFAULT 0
| #define COND_COMMAND 1
| #define COND_REGEXP 1
| #define COPROCESS_SUPPORT 1
| #define ARITH_FOR_COMMAND 1
| #define NETWORK_REDIRECTIONS 1
| #define PROGRAMMABLE_COMPLETION 1
| #define DEBUGGER 1
| #define CASEMOD_ATTRS 1
| #define CASEMOD_EXPANSIONS 1
| #define GLOBASCII_DEFAULT 1
| #define FUNCTION_IMPORT 1
| #define TRANSLATABLE_STRINGS 1
| #define MEMSCRAMBLE 1
| /* end confdefs.h.  */
| 
| int
| main (void)
| {
| 
|   ;
|   return 0;
| }
configure:4454: error: in `/build/bash-5.2':
configure:4456: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=aarch64-unknown-linux-gnu
ac_cv_env_CC_FOR_BUILD_set=set
ac_cv_env_CC_FOR_BUILD_value=gcc
ac_cv_env_CC_set=set
ac_cv_env_CC_value=aarch64-unknown-linux-gnu-gcc
ac_cv_env_CFLAGS_FOR_BUILD_set=
ac_cv_env_CFLAGS_FOR_BUILD_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_FOR_BUILD_set=
ac_cv_env_CPPFLAGS_FOR_BUILD_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_DEBUGGER_START_FILE_set=
ac_cv_env_DEBUGGER_START_FILE_value=
ac_cv_env_LDFLAGS_FOR_BUILD_set=
ac_cv_env_LDFLAGS_FOR_BUILD_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=aarch64-unknown-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=aarch64-unknown-linux-gnu
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=aarch64-unknown-linux-gnu
ac_cv_prog_CC=aarch64-unknown-linux-gnu-gcc
bash_cv_getcwd_malloc=yes
bash_cv_job_control_missing=nomissing
bash_cv_sys_named_pipes=nomissing
lt_cv_deplibs_check_method=pass_all

## ----------------- ##
## Output variables. ##
## ----------------- ##

ALLOCA=''
AR='aarch64-unknown-linux-gnu-ar'
ARFLAGS=''
ARRAY_O='array.o'
BASE_CFLAGS_FOR_BUILD=''
BASHVERS='5.2'
BUILD_DIR=''
BUILD_INCLUDED_LIBINTL=''
CATOBJEXT=''
CC='aarch64-unknown-linux-gnu-gcc'
CC_FOR_BUILD='gcc'
CFLAGS=''
CFLAGS_FOR_BUILD=''
CFLAG_VISIBILITY=''
CPP=''
CPPFLAGS=''
CPPFLAGS_FOR_BUILD=''
CROSS_COMPILE=''
DATADIRNAME=''
DEBUG=''
DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GENCAT=''
GETTEXT_MACRO_VERSION=''
GLIBC21=''
GLIBC2=''
GMSGFMT=''
GMSGFMT_015=''
GNULIB_OVERRIDES_WINT_T=''
GREP=''
HAVE_ASPRINTF=''
HAVE_NAMELESS_LOCALES=''
HAVE_NEWLOCALE=''
HAVE_POSIX_PRINTF=''
HAVE_SNPRINTF=''
HAVE_VISIBILITY=''
HAVE_WPRINTF=''
HELPDIR=''
HELPDIRDEFINE=''
HELPFILES_TARGET=''
HELPINSTALL=''
HELPSTRINGS=''
HISTORY_DEP=''
HISTORY_LIB=''
HIST_LIBDIR=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTOBJEXT=''
INTLBISON=''
INTLLIBS=''
INTLOBJS=''
INTL_DEFAULT_VERBOSITY=''
INTL_DEP=''
INTL_INC=''
INTL_LIBTOOL_SUFFIX_PREFIX=''
INTL_MACOSX_LIBS=''
JOBS_O=''
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LIBICONV=''
LIBINTL=''
LIBINTL_H=''
LIBMULTITHREAD=''
LIBOBJS=''
LIBPTH=''
LIBPTH_PREFIX=''
LIBS=''
LIBS_FOR_BUILD=''
LIBTHREAD=''
LOCAL_CFLAGS=''
LOCAL_DEFS=''
LOCAL_LDFLAGS=''
LOCAL_LIBS=''
LTLIBICONV=''
LTLIBINTL=''
LTLIBMULTITHREAD=''
LTLIBOBJS=''
LTLIBPTH=''
LTLIBTHREAD=''
MAKE_SHELL=''
MALLOC_DEBUG=''
MALLOC_DEP=''
MALLOC_LDFLAGS=''
MALLOC_LIB=''
MALLOC_LIBRARY=''
MALLOC_SRC=''
MALLOC_TARGET=''
MKDIR_P=''
MSGFMT=''
MSGFMT_015=''
MSGMERGE=''
OBJEXT=''
PACKAGE_BUGREPORT='bug-bash@gnu.org'
PACKAGE_NAME='bash'
PACKAGE_STRING='bash 5.2-release'
PACKAGE_TARNAME='bash'
PACKAGE_URL=''
PACKAGE_VERSION='5.2-release'
PATH_SEPARATOR=':'
POSUB=''
PRI_MACROS_BROKEN=''
PROFILE_FLAGS=''
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=''
RANLIB='aarch64-unknown-linux-gnu-ranlib'
READLINE_DEP=''
READLINE_LIB=''
RELSTATUS='release'
RL_INCLUDE=''
RL_INCLUDEDIR=''
RL_LIBDIR=''
RL_MAJOR=''
RL_MINOR=''
RL_VERSION=''
SED=''
SET_MAKE=''
SHELL='/nix/store/1fzg4cl3k2n9yq80vg6y1vcmvx3qm682-bash-5.2p26/bin/bash'
SHOBJ_CC=''
SHOBJ_CFLAGS=''
SHOBJ_LD=''
SHOBJ_LDFLAGS=''
SHOBJ_LIBS=''
SHOBJ_STATUS=''
SHOBJ_XLDFLAGS=''
SIGLIST_O=''
SIGNAMES_H=''
SIGNAMES_O=''
SIZE='aarch64-unknown-linux-gnu-size'
STATIC_LD=''
STYLE_CFLAGS=''
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=''
TERMCAP_DEP=''
TERMCAP_LIB=''
TESTSCRIPT='run-all'
TILDE_LIB=''
TIME_H_DEFINES_STRUCT_TIMESPEC=''
USE_INCLUDED_LIBINTL=''
USE_NLS=''
WINDRES=''
WOE32=''
WOE32DLL=''
XGETTEXT=''
XGETTEXT_015=''
XGETTEXT_EXTRA_OPTIONS=''
YACC=''
YFLAGS=''
ac_ct_CC=''
bindir='/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/bin'
build='aarch64-unknown-linux-gnu'
build_alias='aarch64-unknown-linux-gnu'
build_cpu='aarch64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='/nix/store/liw6kiqn541zjihyg5rrnwy5dbbkvj65-bash-aarch64-unknown-linux-gnu-5.2p26-doc/share/doc/bash'
dvidir='${docdir}'
exec_prefix='NONE'
headersdir=''
host='aarch64-unknown-linux-gnu'
host_alias='aarch64-unknown-linux-gnu'
host_cpu='aarch64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
incdir=''
includedir='/nix/store/12xcpzlmrl0aw9pkxgxqadxi50lbvvgm-bash-aarch64-unknown-linux-gnu-5.2p26-dev/include'
infodir='/nix/store/lzf8ydalvi03pkrhajdqz6w4y60wfk6i-bash-aarch64-unknown-linux-gnu-5.2p26-info/share/info'
libdir='/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/lib'
libexecdir='/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/libexec'
loadablesdir=''
localedir='/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/share/locale'
localstatedir='${prefix}/var'
mandir='/nix/store/mfj8rp1ns7vv0m1xyhrxalq9w5w6kqpg-bash-aarch64-unknown-linux-gnu-5.2p26-man/share/man'
oldincludedir='/nix/store/12xcpzlmrl0aw9pkxgxqadxi50lbvvgm-bash-aarch64-unknown-linux-gnu-5.2p26-dev/include'
pdfdir='${docdir}'
prefix='/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='/nix/store/pifqxyp36bf4hd7k38jgbway33z63xnc-bash-aarch64-unknown-linux-gnu-5.2p26/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "bash"
#define PACKAGE_TARNAME "bash"
#define PACKAGE_VERSION "5.2-release"
#define PACKAGE_STRING "bash 5.2-release"
#define PACKAGE_BUGREPORT "bug-bash@gnu.org"
#define PACKAGE_URL ""
#define ALIAS 1
#define PUSHD_AND_POPD 1
#define RESTRICTED_SHELL 1
#define PROCESS_SUBSTITUTION 1
#define PROMPT_STRING_DECODE 1
#define SELECT_COMMAND 1
#define HELP_BUILTIN 1
#define ARRAY_VARS 1
#define DPAREN_ARITHMETIC 1
#define BRACE_EXPANSION 1
#define COMMAND_TIMING 1
#define EXTENDED_GLOB 1
#define EXTGLOB_DEFAULT 0
#define COND_COMMAND 1
#define COND_REGEXP 1
#define COPROCESS_SUPPORT 1
#define ARITH_FOR_COMMAND 1
#define NETWORK_REDIRECTIONS 1
#define PROGRAMMABLE_COMPLETION 1
#define DEBUGGER 1
#define CASEMOD_ATTRS 1
#define CASEMOD_EXPANSIONS 1
#define GLOBASCII_DEFAULT 1
#define FUNCTION_IMPORT 1
#define TRANSLATABLE_STRINGS 1
#define MEMSCRAMBLE 1

configure: exit 77

Extract:

/nix/store/v71nlgkf8g6d36gac9r44pmlx54mdql3-binutils-2.41/bin/ld: cannot find crt1.o: No such file or directory
/nix/store/v71nlgkf8g6d36gac9r44pmlx54mdql3-binutils-2.41/bin/ld: cannot find crti.o: No such file or directory
/nix/store/v71nlgkf8g6d36gac9r44pmlx54mdql3-binutils-2.41/bin/ld: cannot find -lgcc_s: No such file or directory

How can I troubleshoot it? I don’t know what to do beyond looking at config.log; and I am also quite puzzled on why it’s trying to build bash instead of downloading it from nix cache.

A few notes:

  • here is the tree (24.05 branch).
  • 23.11 (current main) works on both x86_64-linux and aarch64-linux.
  • 24.05 (this branch) works on x86_64-linux.
  • nix run .#legacyPackages.aarch64-linux.hello works while in nixos-24.05 branch.

Thank you!

Did you post your full config.log? The errors are usually at the end, not the beginning (where autoconf probes compiler type by trying various version flags).

Thanks, updated (after closer inspection it turns out to be bash not pcre2).

/nix/store/v71nlgkf8g6d36gac9r44pmlx54mdql3-binutils-2.41/bin/ld: cannot find crt1.o: No such file or directory is usually a sign that derivation uses unwrapped gcc (like stdenv.cc.cc) instead of a gcc wrapper (like stdenv.cc). Unwrapped gcc lacks a few standard lookup paths to crt files.

bash-aarch64-unknown-linux-gnu-5.2p26.drv suggests you are cross-compiling, but build system type... aarch64-unknown-linux-gnu / host system type... aarch64-unknown-linux-gnu says your tuples are identical. nixpkgs has a few unfixed bugs for that configuration. How do you set up that cross-compilation?

1 Like

Here it is: config/orangepi5plus.nix at 32dcf4e9dd49b7924cca9a02333ba89dc7696287 - config - gitea: Gitea Service

The goal is to build an arm64 kernel. I have set up cross-compiling, so it is forced to use an arm64 host on both arm64 and amd64 (via a remote builder).

If I “just remove” it like here, AFAIK it will compile an x86_64 kernel?

At least for vno1-op5p you instantiate nixpkgs with system = "aarch64-linux" config/flake.nix at 32dcf4e9dd49b7924cca9a02333ba89dc7696287 - config - gitea: Gitea Service. If you include this module there it should be fine to use pkgs. directly and rely on the remote builder and you should get aarch64-linux kernel.

If you want to also cross-compile the kernel on system = "x86_64-linux"; you might want to use pkgsCross or instantiate nixpkgs with crossSystem. But I would advise doing it only for cases where build and host systems are different. Cross Compiling - NixOS Wiki has a few instantiation examples.

1 Like

Works perfectly now, thank you!

1 Like