Racket distro packagers: please try building from a snapshot

For Void Linux, native compilation seems to work fine without additional changes over 8.5.

Cross-compilation is broken in a few ways. Note that we use --enable-racket=/usr/bin/racket with a Racket built for the host before building cross-compiled packages.

First, zuo is compiled for the target platform due to

HOSTCC=$(CC) $(CFLAGS) -O2

in the Makefile (but $CC is the cross-compiler).

Next, building Chez for the target works fine, but in make install I get

...
/usr/bin/racket -O info'@'compiler/cm -l- setup --chain setup-go.rkt cs/c/compiled ignored cs/c/ignored.d cs/c/add-terminator.rkt cs/c/scheme-v.boot /destdir/aarch64-linux-musl/racket-8.6/usr/lib64/racket/scheme.boot
/usr/bin/racket -O info'@'compiler/cm -l- setup --chain setup-go.rkt cs/c/compiled ignored cs/c/ignored.d cs/c/add-terminator.rkt cs/c/racket-v.boot /destdir/aarch64-linux-musl/racket-8.6/usr/lib64/racket/racket.boot
/builddir/racket-8.5.0.8/src/ChezScheme/ta6le/bin/ta6le/scheme -B /builddir/racket-8.5.0.8/src/ChezScheme/ta6le/boot/ta6le/petite.boot -B /builddir/racket-8.5.0.8/src/ChezScheme/ta6le/boot/ta6le/scheme.boot --script mk-cross-serve.ss . cross-serve.ss ../expander/env.ss
compiling cross-serve.ss with output to /builddir/racket-8.5.0.8/src/cs/c/cross-serve.so
-O info'@'compiler/cm -l- setup --chain setup-go.rkt cs/c/compiled ignored cs/c/ignored.d ../collects/setup/unixstyle-install.rkt make-install-copytree .. /destdir/aarch64-linux-musl/racket-8.6/usr/bin /destdir/aarch64-linux-musl/racket-8.6/usr/share/racket/collects /destdir/aarch64-linux-musl/racket-8.6/usr/share/racket/pkgs /destdir/aarch64-linux-musl/racket-8.6/usr/share/doc/racket /destdir/aarch64-linux-musl/racket-8.6/usr/lib64 /destdir/aarch64-linux-musl/racket-8.6/usr/include/racket /destdir/aarch64-linux-musl/racket-8.6/usr/lib64/racket /destdir/aarch64-linux-musl/racket-8.6/usr/share/racket /destdir/aarch64-linux-musl/racket-8.6/etc/racket /destdir/aarch64-linux-musl/racket-8.6/usr/share/applications /destdir/aarch64-linux-musl/racket-8.6/usr/share/man no
process: not a path string: (hash 'MAKE_COPYTREE "copytree" 'RANLIB "aarch64-linux-musl-ranlib" 'etcpltdir "/etc/${PACKAGE}" 'RKTLINKER "aarch64-linux-musl-gcc" 'racket "/usr/bin/racket" 'INSTALL_SETUP_FLAGS "--no-user" 'libpltdir_rel "" 'datarootdir "${prefix}/share" 'SETUP_MACHINE_FLAGS "" 'CROSS_MODE "cross" 'MACLIBRKT_LINK_MODE "fw" 'FRAMEWORK_REL_INSTALL "" 'exec_prefix "${prefix}" 'LINK_DYNAMIC "-rdynamic" 'PACKAGE "racket" 'POST_LINKER "" 'INSTALL_PKGSCOPE "user" 'DISABLE_WPO "f" 'OSX "f" 'ZUO "bin/zuo" 'MAKE_INSTALL_PKGSCOPE "preserve" 'COMPRESS_COMP "--compress" 'srcdir "." 'HOSTCC "cc -O2" 'DISABLE_ICONV "no" 'CONFIGURE_RACKET_SO_COMPILE "" 'SELF_ROOT_CONFIG_DIR "" 'CONFIG_PATH "${etcpltdir}" 'PLT_CS_SLSP_SUFFIX "" 'INSTALL_LIBZO "libzo" 'TARGET_MACH "tarm64le" 'COLLECTS_PATH "${collectsdir}" 'CROSS_COMPILE_TARGET_KIND "machine" 'ARFLAGS "rc" 'DISABLE_CURSES "yes" 'INSTALL_ORIG_TREE "no" 'MACH "ta6le" 'configdir "/etc/${PACKAGE}" 'AR "aarch64-linux-musl-ar" 'mandir "/usr/share/man" 'collectsdir "${exec_prefix}/share/${PACKAGE}/collects" 'SETUP_BOOT_MODE "--chain" 'includepltdir "${prefix}/include/${PACKAGE}" 'upsrcdir "../." 'SCHEME_LIBFFI "no" 'appsdir "${exec_prefix}/share/applications" 'DESTDIR "/destdir/aarch64-linux-musl/racket-8.6" 'sharepltdir "${datarootdir}/${PACKAGE}" 'FRAMEWORK_INSTALL_DIR "$(libpltdir)" 'LIBS "-ldl -lm  -lrt -lz -llz4" 'docdir "${datarootdir}/doc/${PACKAGE}" 'RKTIO_CONFIGURE_ARGS "'--prefix=/usr' '--sysconfdir=/etc' '--sbindir=/usr/bin' '--bindir=/usr/bin' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--localstatedir=/var' '--host=x86_64-unknown-linux-musl' '--build=x86_64-unknown-linux-musl' '--libdir=${exec_prefix}/lib64' '--host=aarch64-linux-musl' '--with-sysroot=/usr/aarch64-linux-musl' '--with-libtool-sysroot=/usr/aarch64-linux-musl' 'build_alias=x86_64-unknown-linux-musl' 'host_alias=aarch64-linux-musl' 'CC=aarch64-linux-musl-gcc' 'CFLAGS=-fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a   -I/usr/aarch64-linux-musl/usr/include -fdebug-prefix-map=/builddir/racket-8.5.0.8=.' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed    -L/usr/aarch64-linux-musl/usr/lib' 'CPPFLAGS=  ' 'CPP=aarch64-linux-musl-cpp'  CC=\"aarch64-linux-musl-gcc\" CFLAGS=\"-fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a   -I/usr/aarch64-linux-musl/usr/include -fdebug-prefix-map=/builddir/racket-8.5.0.8=.\" LDFLAGS=\"-Wl,-z,relro -Wl,-z,now -Wl,--as-needed    -L/usr/aarch64-linux-musl/usr/lib -pthread\" LIBS=\"-ldl -lm  -lrt -lz -llz4\" AR=\"aarch64-linux-musl-ar\" ARFLAGS=\"rc\" RANLIB=\"aarch64-linux-musl-ranlib\" WINDRES=\"windres\" CPPFLAGS=\"    -pthread\" --enable-pthread --enable-iconv" 'libpltdir "${exec_prefix}/lib64/${PACKAGE}" 'CS_INSTALLED "" 'LDFLAGS "-Wl,-z,relro -Wl,-z,now -Wl,--as-needed    -L/usr/aarch64-linux-musl/usr/lib -pthread" 'pkgsdir "${datarootdir}/${PACKAGE}/pkgs" 'STRIP_LIB_DEBUG "aarch64-linux-musl-strip -S" 'BOOT_COMPRESS_COMP "" 'INSTALL_LIBS_ENABLE "install" 'libdir "${exec_prefix}/lib64" 'BOOTFILE_RACKET "" 'CFLAGS "-fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a   -I/usr/aarch64-linux-musl/usr/include -fdebug-prefix-map=/builddir/racket-8.5.0.8=." 'LZ4_LIB "-llz4" 'RACKET "/usr/bin/racket" 'STRIP_DEBUG "aarch64-linux-musl-strip" 'KERNEL_TARGET_MACH "tarm64le" 'prefix "/usr" 'CPPFLAGS "-pthread" 'SCHEME_DIR "/builddir/racket-8.5.0.8/src/ChezScheme" 'ICP_LIB "cp" 'PBCHUNK_MODE "plain" 'WINDRES "windres" 'CC "aarch64-linux-musl-gcc" 'Z_LIB "-lz" 'ICP "cp" 'bindir "/usr/bin" 'SCHEME "")

Note how it seems to use an empty string as compiler? The line starts with -O info. So mk-cross-serve.ss may need adjustments here to use /usr/bin/racket as well?

1 Like