Raspberry PI x-compile error + fix

It’s a flawless, sunny day in the north west, so I decided to port a game
engine to the Raspberry PI.

The bug I’m about to describe exists on 2.0.3 stable and Mercurial head.

Configure generates a linker search path “-L/opt/vc/lib”, but that dir
needs to be under the root of your rpi cross compile tools, or libbcm_host
won’t be found.

The solution is to pass LDFLAGS="-L$SYSROOT/opt/vc/lib" to the configure
step.

Fortunately, the fix is just to change the README-raspberrypi.txt file to
include this in the configure line:

LDFLAGS="-L$SYSROOT/opt/vc/lib" …/configure --with-sysroot=$SYSROOT
–host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed
–disable-pulseaudio --disable-esd

Let me know if you’d prefer to apply a patch to this doc file.

Michael Labbe

Fortunately, the fix is just to change the README-raspberrypi.txt file
to include this in the configure line:

Added this note in revision control, thanks!

–ryan.