I've gotten a little further with this, after figuring out an issue with my Guix recipe, but now the Chez build process is trying to run my cross-compiled scheme
as part of the build process.
In more detail: I'm on x86_64-linux-gnu
and trying to build tpb64l
for powerpc64le-linux-gnu
. With an existing ta6le
build, I've used zuo makefiles/boot.zuo /my/installed/ta6le/scheme tpb64l
(method 5) to generate a set of bootfiles. Then I've configure
d with these flags:
("--disable-x11" "--threads" "-m=tpb64l" "CFLAGS=-g -O2 -D_REENTRANT -pthread" "LIBS=-lm -ldl -lncurses" "--toolprefix=powerpc64le-linux-gnu-" "--installcsug=/gnu/store/zmkijfnk1nqsrwziflg861y57r21ddjc-chez-scheme-for-racket-9.5.9.2-doc/share/doc/chez-scheme-for-racket-9.5.9.2/csug" "--installreleasenotes=/gnu/store/zmkijfnk1nqsrwziflg861y57r21ddjc-chez-scheme-for-racket-9.5.9.2-doc/share/doc/chez-scheme-for-racket-9.5.9.2/release_notes" "--installprefix=/gnu/store/qs4rwfphpzj3aw50ij7v0iicby5p95gl-chez-scheme-for-racket-9.5.9.2" "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=/gnu/store/q9pidl3hg9l0qga88gsgjs8brv82qy0v-bash-minimal-5.1.8/bin/sh" "ZLIB=-lz" "LZ4=-llz4" "--libkernel" "--nogzip-man-pages")
The C build steps then succeed, from:
powerpc64le-linux-gnu-gcc -DGUIX_RKTIO_PATCH_BIN_SH=/gnu/store/q9pidl3hg9l0qga88gsgjs8brv82qy0v-bash-minimal-5.1.8/bin/sh -DPORTABLE_BYTECODE -Itpb64l/boot/tpb64l -Itpb64l/c -I../ChezScheme/c/ -g -O2 -D_REENTRANT -pthread -o tpb64l/c/statics.o -c ../ChezScheme/c/statics.c
but then we get to the problem:
powerpc64le-linux-gnu-gcc -g -O2 -D_REENTRANT -pthread -o tpb64l/bin/tpb64l/scheme tpb64l/boot/tpb64l/main.o tpb64l/boot/tpb64l/libkernel.a -lm -ldl -lncurses -lz -llz4
: tpb64l/bin/tpb64l/scheme
running tpb64l/bin/tpb64l/scheme to build tpb64l/s/cmacros.so
exec failed
failed
in build-one
in loop
in module->hash
make: *** [Makefile:10: build] Error 1
Since tpb64l/bin/tpb64l/scheme
was compiled for powerpc64le-linux-gnu
, it doesn't run on x86_64-linux-gnu
.
I'm not sure how to deal with this in general for cross-compiling Chez, but it seems especially likely for things to get confused when trying to cross-compile a pb
variant that is also supported by the build machine. It seems like nothing in my configure
flags communicates that this is supposed to be a cross build, and I'm not seeing any way to add that information, either.