[Debian-lego-team] Need help, trying to cross-build LibNXT

Nicolas Schodet nico at ni.fr.eu.org
Sun Oct 31 16:40:32 GMT 2021


Hello,

LibNXT is a library to access the LEGO Mindstorms NXT brick, which is
running an ARM microcontroller. To program the flash it needs to send
a small stub which is loaded to microcontroller RAM. This stub is
compiled using gcc-arm-none-eabi, and embedded in the library.

The stub is always cross-compiled, no problem with that.

My problem is when I try to cross-compile libnxt itself. For a reason I
do not understand, gcc-arm-none-eabi is installed for the host system
instead of the build system. The other build deps are installed for the
build system so there must be a decision made somewhere.

Here is an example build failure:

https://salsa.debian.org/nschodet/libnxt/-/jobs/2129880#L1417

It is installing gcc-arm-none-eabi for arm64, but binutils-arm-none-eabi
for build system:

    The following NEW packages will be installed:
      binutils-arm-none-eabi{a} gcc-arm-none-eabi:arm64{a}
      libglib2.0-0{a} libgmp10:arm64{a} libisl23:arm64{a}
      libmpc3:arm64{a} libmpfr6:arm64{a} libudev1:arm64{a}
      libusb-1.0-0:arm64{a} libusb-1.0-0-dev:arm64{a} meson{a}
      ninja-build{a} pkg-config{a} python3-distutils{a}
      python3-lib2to3{a} python3-pkg-resources{a} scdoc{a}
      zlib1g:arm64{a}

Do you know why it chooses to install it for host system, and how I can
force it to install it for build system?

Thanks,

Nicolas.



More information about the Debian-lego-team mailing list