Building mjmech dependencies with bazel
Previously, I set up bazel to be able to cross compile for the raspberry pi using an extracted sysroot. That sysroot was very minimal, basically just glibc and the kernel headers. The software used for SMMB has many dependencies beyond that though, including some heavyweight ones such as gstreamer and I needed some solution for building against them.
Options
There were two basic options:
- Install all the dependencies I cared about on an actual raspberry pi, and extract them into the sysroot.
- Build all the dependencies I cared about using bazel’s external projects mechanism.
The former would certainly be quicker in the short term, at the expense of needing to check in or otherwise version a very large sysroot. It would also be annoying to update, as I would need to keep around a physical raspberry pi and continually reset it to zero in order to generate suitably pristine sysroots.