Uncategorized

Raspbian (PIXEL) with SDL2 (compiled from source)

Here are the instructions to (re)installing SDL2 on Raspbian by compiling from source.

sudo apt-get remove --purge libsdl2-dev
sudo apt-get autoremove
sudo 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
sudo apt-get install libraspberrypi-dev raspberrypi-kernel-headers
mkdir build && cd build
wget https://www.libsdl.org/release/SDL2-2.0.5.tar.gz
cd SDL2-2.0.5
./configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
make
sudo make install
sudo ldconfig

Hooray! SDL performance is much much faster! 🙂

SOURCE 1: https://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/
SOURCE 2: http://choccyhobnob.com/tutorials/sdl2-2-0-5-on-raspberry-pi/

2 thoughts on “Raspbian (PIXEL) with SDL2 (compiled from source)

Leave a reply to deedeedaydee Cancel reply