I am trying to install Marathon on my laptop. Been following along with the instructions at: https://github.com/Aleph-One-Marathon/alephone/wiki/Linux%20Install%20Instructions#ubuntu.

I installed the following libraries, per the instructions,

sudo apt-get install libboost-all-dev libsdl1.2-dev libsdl-image1.2-dev \
libsdl-net1.2-dev libsdl-ttf2.0-dev libspeexdsp-dev libzzip-dev \
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev

However, when I configure the installation with,

 ~/file path/AlephOne$ ./ configure

I get the following message,

checking for SDL_ttf.h presence....no
error: You need SDL_ttf.h to run Aleph One.

I thought this was included in the libsdl-ttf2.0-dev? Anyone have any clues what is going on? Any help would be much appreciated.

  • Is there a file config.log that shows more details of the error? Possibly configure is looking in the wrong location...
    – andrew.46
    Jun 25 '16 at 19:38
  • Would it be in one of the logs in /var/log/ directory? I am looking look through the dpkg.log and it says, status unpacked lidsdl-ttf2.0-0:i386 2.0.11-3 Status half configured lodsdl-ttf2.0-0:i386 2.0.11-3 Status installed libsdl-ttf2.0-0:i386 2.0.11-3 Is that at all relevant? Jun 25 '16 at 20:03
  • config.log will be generated in the same location as the ./configure file and can be opened and searched with gedit or similar. Which version of Ubuntu are you running? I can run the compile in VM to check.....
    – andrew.46
    Jun 25 '16 at 20:09
  • 1
    @andrew.46 I ran the find command. The file path says SDL2, not SDL, "usr/include/SDL2/SDL_ttf.h". Jun 25 '16 at 23:26
  • 1
    After narrowing down the config.log with steeldriver's suggestion, I got the following result, "checking SDL_ttf.h usability / contest.c:64:21: fatal error: SDL_ttf.h: no such file or directory". Jun 25 '16 at 23:32

Try: sudo apt-get install libsdl2-ttf-dev

After that, you should find it via:

find /usr|grep SDL_ttf
  • 1
    How about SDL (Not SDL2) ? Oct 31 '18 at 5:17

I was installing gosu gem for Ruby and had the same error, on Ubuntu 16.04. All solutions pointed to installing sdl2 ttf libs, but I already had them all installed. I noticed, however, that I had /usr/include/SDL2/SDL_ttf.h, and the gem included lib directories didn't list that one, but listed /usr/local/include/SDL2/SDL_ttf.h.

I managed to solve the problem by creating a symbolic link with

sudo ln -s /usr/include/SDL2/SDL_ttf.h /usr/local/include/SDL2/

  • I just experienced this on Ubuntu 18.04, and your solution worked for me. I'm surprised this issue has lasted as long as it has, but that's not all I found surprising. I supplied my own CFLAGS, as in CFLAGS="$(pkg-config --cflags SDL2_ttf)" make, and there was no change. The makefile hard-codes CFLAGS (not even ?= or += but =) based on the outcome of configure. In my case, this includes -DHAVE_SDL_TTF, which I do, but it omits the discovered path in favor of its own installation path, where of course it never installed SDL_ttf.h. Should be an easy fix, eh?
    – John P
    Aug 31 '18 at 20:06
  • In case anyone else has this issue, you can either add the path directly to CFLAGS in the Makefile, or you can replace the = with += and prepend flags to your make invocation like I did. My apologies if what I'm talking about is unrelated to your issue, but I suspect that your local installation stepped on your system installation for the same reason.
    – John P
    Aug 31 '18 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.