# Chez for architectures without native backends

**URL:** <https://racket.discourse.group/t/chez-for-architectures-without-native-backends/950>\
**Category:** Distro Packagers\
**Tags:** question, chez\
**Created:** [May 1, 2022, 8:11pm UTC](https://racket.discourse.group/t/chez-for-architectures-without-native-backends/950 "2022-05-01T20:11:50Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![LiberalArtist](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/liberalartist/32/151_2.png) [@LiberalArtist](https://racket.discourse.group/u/LiberalArtist)\
**Post date:** [July 29, 2022, 5:06am UTC](https://racket.discourse.group/t/chez-for-architectures-without-native-backends/950/15 "2022-07-29T05:06:53Z")

</div>

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](https://github.com/racket/racket/blob/release/racket/src/ChezScheme/BUILDING#L85-L93)) to generate a set of bootfiles. Then I've `configure`d with these flags:

```scheme
("--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:

```scheme
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:

```scheme
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.

---

_[View the full topic](https://racket.discourse.group/t/chez-for-architectures-without-native-backends/950)._
