Raspberry Pi cross-compilation
In the end it took several hours to set up a working cross-compilation environment for the RPi. The one that worked was the Vagrant/VirtualBox+QEmu setup from https://github.com/nickhutchinson/raspberry-devbox .
The instructions are rather short and self-explanatory, and what you end up with is a Vagrant (VirtualBox) VM with a Scratchbox/QEmu cross-compiler environment inside. Nice! Even though it’s a bit slow at least with the default 380MB memory share it gets, it was able to build Armstrong and the UI projects without any tricks.
The other compilers I tried were the QT cross-compilation environment from http://qt-project.org/wiki/RaspberryPi_Beginners_guide, which I got to compile everything, but the binaries simply wouldn’t run on the device. Some problem with the instruction set dialect or floating-point support, I guess. I also tried http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/ but couldn’t get the linker paths to work out right. Armstrong depends on several libraries and fbgui on even more; those I copied for these experiments as binaries from the RPi box itself after installing the packages there with apt-get.
With the Vagrant raspberry-devbox all of this was trivial: just boot the Vagrant VM, jump into the scratchbox as root, and apt-get all the necessary packages. And packages you need: this was the final list (plus dependencies I didn’t include here, but apt-get would find automatically) that worked:
libjack-dev libjack0 libportmidi0 libportmidi-dev libboost-dev libsndfile1-dev libsndfile1 libboost1.49-dev libboost-dev liblua5.2-0 liblua5.2-dev libsdl1.2debian libsdl1.2-dev autoconf libsqlite3-dev
The build command-line turned out to be something like this:
CFLAGS="-I../target/include -L../target/lib" CPPFLAGS="-I../target/include -L../target/lib" CXXFLAGS="-I../target/include -L../target/lib" ./configure --prefix=/home/vagrant/rpc-buze/target && make && make install
Nothing out of the ordinary then, as it should be. After pushing the binaries from target/ to the RPi, it just works!