UPDATE 2: I did the same thing on Raspbian and the compilation worked. See this.
UPDATE 1: This didn’t work, sorry guys. I couldn’t figure it out. Tried everything, running out of time…giving up…I’m going to try to make the game another way.
I have the very first Raspberry Pi, which I believe is a 1.0. I’m trying to make a game with it and I decided to use SDL. The goal is to run SDL without X, ie from console.
The first thing I needed was a lightweight distro for the RPi. I’m using Minibian because I’ve used it before and it works. Instructions for this are pretty simple:
- Download Minibian (https://minibianpi.wordpress.com/download/)
- Use Rufus to flash it to an SD Card
- Run the RPi and resize the partitions (https://minibianpi.wordpress.com/how-to/resize-sd/). Read the instructions carefully especially the part about aligning the partitions.
- Install nano
- If you need Wifi, install firmware-realtek (assuming you have a Realtek based dongle) and wpasupplicant. For more info visit https://minibianpi.wordpress.com/how-to/wifi/
Next step is to install SDL:
DON’T INSTALL using the package manager, it doesn’t work. You need to compile from scratch.
- Install these packages required for compiling SDL (not sure if the mesa libraries are required):
apt-get install build-essential libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile1-dev libudev-dev libasound2-dev libjpeg-dev libtiff5-dev libwebp-dev automake apt-get install libraspberrypi-dev raspberrypi-kernel-headers apt-get install libegl1-mesa libegl1-mesa-dev
- Get SDL2 (https://www.libsdl.org/release/SDL2-2.0.5.tar.gz)
mkdir install && cd install wget https://www.libsdl.org/release/SDL2-2.0.5.tar.gz tar zxvf SDL2-2.0.5.tar.gz cd SDL2-2.0.5
- Configure and build
./configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 make make install