I had a great deal of trouble making this work, so I’m posting this here. So I don’t forget how to do it.
Tested for my setup:
- Ubuntu 12.04 32-bit
- 2014-01-07-wheezy-raspbian
- OpenFrameworks 0.8 (release)
- My Pi is NFS booting from the Ubuntu box, FWIW.
Follow the directions from the Raspberry Pi cross-compiling guide on the oF site (but see below)
There are two errors in the cross-compiling guide:
- The correct command to build is
make -j6 RPI_TOOLS=$RPI_TOOLS RPI_ROOT=$RPI_ROOT GST_VERSION=1.0 PLATFORM_OS=Linux PLATFORM_ARCH=armv6l
(the difference is in the GST_VERSION) - the
$RPI_ROOT
directory should be set to a directory that contains the raspberry pi/usr
, not the/usr
directory itself.
You will get PKG_CONFIG errors. To fix them:
export PKG_CONFIG_PATH=$RPI_ROOT/usr/lib/arm-linux-gnueabihf/pkgconfig:$RPI_ROOT/usr/share/pkgconfig:$RPI_ROOT/usr/lib/pkgconfig
You may get errors related to libdl when linking (depending on how you’re accessing $RPI_ROOT
). There are some absolute symlinks in your $RPI_ROOT that are broken. Fix them with this script. Change the first line to #!/bin/bash
.