Sean Francis N. Ballais
Sean Francis N. Ballais

Reputation: 2478

SDL 2.0.1 Linux Make Compilation Error

I'm trying to compile the latest version of SDL, SDL version 2.0.1. I tried compiling SDL from Mercurial. All seems fine when executing ./configure with the following messages:

checking for working volatile... no
checking for GCC -MMD -MT option... no
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking stdio.h usability... no
checking stdio.h presence... no
checking for stdio.h... no
checking for stdlib.h... (cached) yes
checking stddef.h usability... no
checking stddef.h presence... no
checking for stddef.h... no
checking stdarg.h usability... no
checking stdarg.h presence... no
checking for stdarg.h... no
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking for memory.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking ctype.h usability... no
checking ctype.h presence... no
.
.
.
.
checking dbus/dbus.h usability... no
checking dbus/dbus.h presence... no
checking for dbus/dbus.h... no
checking for Linux 2.4 unified input interface... no
checking for Linux kd.h... no
checking for Touchscreen library support... no
config.status: creating SDL2.spec
config.status: creating sdl2.pc
config.status: creating include/SDL_config.h
config.status: executing libtool commands

I'm receiving tons of no's in ./configure and when I tried to run make it displays this message:

Makefile:226: *** missing separator.  Stop.

What could be the reason behind the messages? Does anyone know of a fix?

Upvotes: 1

Views: 1277

Answers (2)

Yuran Pereira
Yuran Pereira

Reputation: 256

I had the same issue and this is what worked for me:

Install the following libraries before you install SDL:

sudo apt-get install build-essential mercurial make cmake autoconf
automake \
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev

After that you can run ./configure , make , and make install just fine. Note: All this information I got from the README.txt file that comes with the SDL source code, so you need to get used to read those files before trying anything. I hope it helps.

Upvotes: 1

Yeti_Face
Yeti_Face

Reputation: 76

I just had exactly the same problem (to a tee), this is what worked for me.

I'd placed the uncompressed folder into another folder with a space in its name, in my case a folder I named "SDL 2.0". When the configure command was used it caused it to split the file location within the make file into two lines, which first comes up at line 226. To fix this I renamed the offending folder with an underscore, so "SDL_2.0". I was then able to use the configure command again, and after that the updated make file worked.

TLDR: use underscores instead of spaces in your file names.

Upvotes: 3

Related Questions