bitcoin: guix: building for `aarch64-linux-gnu` on aarch64 fails
Running a Guix build of master (f002f8a0e76bd5abd60ef6809b1ff2b4c2d56071) using:
HOSTS="aarch64-linux-gnu" ./contrib/guix/guix-build
on aarch64 hardware (Alpine Docker container, running on Apple M1) currently fails with the following:
cc1: error: no include path in which to search for stdc-predef.h
/gnu/store/lzf5zg0diw2bhh2qji4bl2v46wd8pylc-bash-minimal-5.1.8/bin/bash ../../gcc-10.3.0/gcc/../move-if-change tmp-macro_list macro_list
echo timestamp > s-macro_list
rm -rf include-fixed; mkdir include-fixed
chmod a+rx include-fixed
if [ -d ../prev-gcc ]; then \
cd ../prev-gcc && \
make real-install-headers-tar DESTDIR=`pwd`/../gcc/ \
libsubdir=. ; \
else \
set -e; for ml in `cat fixinc_list`; do \
sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'`; \
multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'`; \
fix_dir=include-fixed${multi_dir}; \
if ! false && test ! -d `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`; then \
echo The directory that should contain system headers does not exist: >&2 ; \
echo " `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" >&2 ; \
tooldir_sysinc=`echo "/gnu/store/bp869rrz2z24yvjyma9kkj0alzxvqkc2-gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0-lib/lib/gcc/aarch64-linux-gnu/10.3.0/../../../../../../../aarch64-linux-gnu/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
if test "x`echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" = "x${tooldir_sysinc}"; \
then sleep 1; else exit 1; fi; \
fi; \
/gnu/store/lzf5zg0diw2bhh2qji4bl2v46wd8pylc-bash-minimal-5.1.8/bin/bash ../../gcc-10.3.0/gcc/../mkinstalldirs ${fix_dir}; \
chmod a+rx ${fix_dir} || true; \
(TARGET_MACHINE='aarch64-unknown-linux-gnu'; srcdir=`cd ../../gcc-10.3.0/gcc; ${PWDCMD-pwd}`; \
SHELL='/gnu/store/lzf5zg0diw2bhh2qji4bl2v46wd8pylc-bash-minimal-5.1.8/bin/bash'; MACRO_LIST=`${PWDCMD-pwd}`/macro_list ; \
gcc_dir=`${PWDCMD-pwd}` ; \
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
cd ../build-aarch64-unknown-linux-gnu/fixincludes && \
/gnu/store/lzf5zg0diw2bhh2qji4bl2v46wd8pylc-bash-minimal-5.1.8/bin/bash ./fixinc.sh "${gcc_dir}/${fix_dir}" \
`echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta` ); \
rm -f ${fix_dir}/syslimits.h; \
if [ -f ${fix_dir}/limits.h ]; then \
mv ${fix_dir}/limits.h ${fix_dir}/syslimits.h; \
else \
cp ../../gcc-10.3.0/gcc/gsyslimits.h ${fix_dir}/syslimits.h; \
fi; \
chmod a+r ${fix_dir}/syslimits.h; \
done; \
fi
The directory that should contain system headers does not exist:
/usr/include
make[3]: *** [Makefile:3172: stmp-fixinc] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0.drv-0/build/gcc'
make[2]: *** [Makefile:4688: all-stage1-gcc] Error 2
make[2]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0.drv-0/build'
make[1]: *** [Makefile:18381: stage1-bubble] Error 2
make[1]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0.drv-0/build'
make: *** [Makefile:946: all] Error 2
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 24 (24 by maintainers)
Commits related to this issue
- test fix for issue #22458 — committed to fanquake/bitcoin by fanquake 3 years ago
- test fix for issue #22458 — committed to fanquake/bitcoin by fanquake 3 years ago
- test fix for issue #22458 — committed to fanquake/bitcoin by fanquake 3 years ago
- test fix for issue #22458 — committed to fanquake/bitcoin by fanquake 3 years ago
- Merge bitcoin/bitcoin#24495: guix: only use native GCC 7 toolchain for Linux builds bb12870bac230960bbe2df35f579570e465d8ea4 guix: only use native GCC 7 toolchain for Linux builds (fanquake) Pull re... — committed to bitcoin-core/gui by fanquake 2 years ago
- Merge bitcoin/bitcoin#25490: guix: more cross arch reproducibility (x86_64 -> arm64) 54faac968971131161f7d6c8def01af1aff4c6b6 guix: Remove guix store paths from glibc (Andrew Chow) 1d4d711de2d9beb203... — committed to bitcoin/bitcoin by laanwj 2 years ago
- test fix for issue #22458 — committed to fanquake/bitcoin by fanquake 3 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to hebasto/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- guix: use --build={arch}-guix-linux-gnu in cross toolchain Technically we are always cross-compiling, so make that explicit. Fixes: #22458. — committed to fanquake/bitcoin by fanquake 2 years ago
- Merge bitcoin/bitcoin#25861: guix: use --build={arch}-guix-linux-gnu in cross toolchain 56e79fe683d36c1944e52326fae3bcc4cb7deec7 guix: use --build={arch}-guix-linux-gnu in cross toolchain (fanquake) ... — committed to bitcoin/bitcoin by fanquake 2 years ago
The reason you’re no-longer seeing the previous issue is because by bumping to the newer glibc, that code that was failing to compile (sunrpc) has been obseleted and removed. In any case, bumping to a much newer glibc is not going to be an appropriate fix. I had patched around the sunrpc issue by backporting a glibc commit, see here so no need for a bump, but had stopped looking again after running into the above.
The new issue is this one: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56954. However I think the actual problem here is to do with the fact that this is a cross-compilation, but less so compared to our other cross-compiles. i.e it’s more like x86_64 on x86_64, and something in cross-compilation detection is getting confused.
I’ve just updated https://github.com/fanquake/bitcoin/tree/test_22458_patch.