signal-libs-build icon indicating copy to clipboard operation
signal-libs-build copied to clipboard

Provide build for armv6l

Open daCaPo opened this issue 1 year ago • 1 comments

Would it be possible to create a binary buld for a Raspberry Pi B (armv6l)?

daCaPo avatar Mar 14 '23 13:03 daCaPo

Compiling for ARMv6 turns out to be not very straightforward: the gcc-arm-linux-gnueabihf toolchain from the distros' repos is configured with armv7 flags, so the binaries it produces rely on armv7 instructions and don't run on armv6 (1, 2, 3, 4).

One recommended workaround is to use gcc from https://github.com/raspberrypi/tools. But when building libsignal it stumbles on the boringssl step due to the missing header files (logs). Attempting to use cross-rs fails on configuring Cmake for boringssl. Using a QEMU container to avoid cross-compilation hits a QEMU bug with large filesizes on 32-bit systems.

Some of the these methods could probably be made to work, but I haven't had the time to troubleshoot it further. PRs welcome!

Other ideas:

  • Compile a toolchain for armv6 from scratch
    • Use somebody else's (e.g. https://github.com/Pro/raspi-toolchain)
  • Use clang instead of GCC for cross-compilation

exquo avatar Mar 23 '23 08:03 exquo