1 (edited by baboon 2017-02-14 23:50:08)

Topic: Help compiling neverball

Hi guys I need help compiling the game. When I run make I get the following warning on my Ubuntu 16.04 system:

share/image.c:16:21: fatal error: SDL_ttf.h: No such file or directory

I tried 'sudo apt-get install libsdl-ttf2.0-dev' but it did not work.

How do I sort this out? what library do I have to install?


Re: Help compiling neverball

Although my walkthrough is outdated, if memory serves, you need SDL_tff in addition to SDL2_tff.

The linked walkthrough was written for Windows, but there are just a few difference in terms of libraries needed. GNU/Linux probably already comes with libintl pre-installed, and you might have a much easier time getting libjpeg and PhysicsFS to work.

Welcome... to the Nevergalaxy!
(and also Neverputt Calendar)


Re: Help compiling neverball

No. The latest version of the game uses SDL2. There's no need for SDL1. You need to install libsdl2-ttf-dev, not libsdl-ttf2.0-dev. I know. The Ubuntu/Debian packages for SDL are confusingly named. libsdl-ttf2.0-dev is actually version 2.0 of SDL1's TTF library. libsdl2-ttf-dev is SDL2's TTF library, which is what you need.


Re: Help compiling neverball

Thanks that worked on Ubuntu ! However, in my arch box I am getting now a fatal error: version.h: No such file or directory
#include "version.h"
. What library  (s) do I need to install to fix this?

I have tried to install linux-headers, but didn't fix it...


Re: Help compiling neverball

version.h should be generated by the Makefile. I don't know why that's not happening for you. I haven't tried building on Arch. You can just copy version.in.h to version.h to get around that.

cp share/version.in.h share/version.h


Re: Help compiling neverball

version.h is "generated" via a Git-related shell script. I do not know enough of the inner mechanics of this script to know exactly how this works.

Welcome... to the Nevergalaxy!
(and also Neverputt Calendar)


Re: Help compiling neverball

Yeah, scripts/version.sh creates it. That gets run every time you run make, and it creates share/version.h if and only if the so called VERSION (If this is a release build, it's the value set in the Makefile, otherwise it's the value reported by running 'git describe') does not match what is in the .version file. Deleting the .version file should force Make to regenerate version.h. I'm not sure what it does if git isn't installed, though. Perhaps we should just get rid of that script and put its functionality into the makefile. I also don't know why in the world it needs to read this .build file to tell it whether it's a release or devel build, when a simple environment variable (e.g. 'make BUILD=release') would suffice.

8 (edited by baboon 2017-08-24 23:07:00)

Re: Help compiling neverball

Thanks guys that worked!

For future reference, I built neverball successfully on Arch Linux:

-Go to /neverball-master folder and Install sdl2_ttf by typing:

sudo pacman -S sdl2_ttf

Then type (to avoid version.h error):

cp share/version.in.h share/version.h

Finally type:


To run neverball, simply type:


Note: using the procedure above,  you don't need to have git installed in your system.