Halite3 on Raspberry Pi3


Did anyone manage to run halite on a raspberry pi 3?



I just tried building the halite binary on a Raspberry Pi 3 running Raspbian Stretch and it failed. If it’s possible, I think it will take a bit of work.


How did it fail? We haven’t tested ARM but off the top of my head I don’t see why we would be doing something x64-specific.


Looking more closely at the messages, it failed because Stretch ships with cmake version 3.7.2 while Halite requires version 3.8 or above. I changed the cmake file to say it could use 3.7 or above, and didn’t read the cmake output properly.

In short, getting it working on the Pi 3 may be as simple as installing the required versions of the build tools. :slight_smile: I haven’t done this but will post again if I do (it probably won’t be today though).


I’ve made a few more attempts, and managed to build a halite binary on the Pi 3, however when I try to run it, it fails with the message mentioned in this discussion (different context, same error message):

I have confirmed that “libasan5” is installed. Maybe someone with more experience with C++ and cmake will know what to do?

To get the appropriate versions of the toolchain, this is what I did (approximately - if you follow this process, please check commands before running, and note that this may leave you with a broken operating system on the raspberry pi, so use a new image on a new SD card rather than using an existing installation you care about):

  • install latest Raspbian image on an SD card (codename “stretch”).
  • Boot the Pi with the new SD card and go through the initial setup.
  • run sudo apt-get update && sudo apt-get --yes upgrade
  • Edit /etc/apt/sources.list and change “stretch” to “buster”.
  • run sudo apt-get update && sudo apt-get --yes install cmake build-essential

Run the build script from the Halite source code (downloaded from the website). It will compile the binary, but finishes with the error message above, and those messages are repeated when running ./halite.

Thinking that the error above might result from the incomplete upgrade, I then ran:

sudo apt-get --yes upgrade

After that was complete and the system rebooted, I rebuilt the halite binary from a clean copy of the source. The desktop was mostly broken at this point, but it was still possible to access the command line with ctrl+alt+F2.

I could try the final process again, which is:

sudo apt-get --yes dist-upgrade

However, when I did this earlier, it didn’t go well, and left me with a system which I couldn’t access - I think something went wrong during the distribution upgrade, maybe it was a power supply issue overnight. However, rather than continuing with a trial-and-error process on the operating system, I suspect that someone reading this might already know what to do to fix the libasan issue, so I’ll stop typing for now. :slight_smile:

The other thing I might try is installing Arch on the Pi 3 because that’s what I’m more familiar with, and I suspect if it is an OS installation issue then Arch will have adequate toolchain versions to begin with.


A release build (cmake -DCMAKE_BUILD_TYPE=Release) should not enable ASan, or alternatively, try removing -fsanitize=address from the CMakeLists.txt.


It works!

I used the first suggestion (cmake -DCMAKE_BUILD_TYPE=Release) and now it runs. :slight_smile: