compiling SDL2_ttf on a raspberry pi

tonetheman profile image Tony Colston ・1 min read

I was trying to get love2d to compile on a Raspberry pi 3+ and kept getting errors trying to build SDL2_ttf-2.0.14

Mainly it could not find freetype2

I did not want to mess up or change to much from what comes by default on the Raspberry Pi so ran this command to see what freetype I should use

dpkg -l | grep freetype

From that I came up with the correct version of freetype. In hindsight I am not sure that really mattered. Maybe as long as my version of SDL2_ttf will link it does not matter which freetype I use?

wget -c https://download.savannah.gnu.org/releases/freetype/freetype-2.9.1.tar.bz2

Then I did the normal configure, make, and make install dance as you would expect to build that.

That still did not seem to help my SDL ttf build. So I read the config.log file and found the build was really looking for a utility script named freetype-config. Armed with this knowledge I started looking on disk for that file and found it in the build directory. WOOOO!


At this point I put that directory on my PATH and could get further in the SDL ttf build.

All the other instructions I followed are here on this great page: https://choccyhobnob.com/sdl2-2-0-8-on-raspberry-pi/

Posted on by:

tonetheman profile

Tony Colston


wanna be gamedev ... all around nerd and dev


markdown guide