# Linux Build -- fatal error: 'SDL\_version.h' file not found

**URL:** <https://discourse.ioquake.org/t/linux-build-fatal-error-sdl-version-h-file-not-found/1526>\
**Category:** Uncategorized\
**Created:** [August 7, 2020, 2:31am UTC](https://discourse.ioquake.org/t/linux-build-fatal-error-sdl-version-h-file-not-found/1526 "2020-08-07T02:31:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GoldenKrisp](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@GoldenKrisp](https://discourse.ioquake.org/u/GoldenKrisp)\
**Post date:** [August 7, 2020, 2:31am UTC](https://discourse.ioquake.org/t/linux-build-fatal-error-sdl-version-h-file-not-found/1526/1 "2020-08-07T02:31:33Z")

</div>

Compiling in ubuntu with sdl2 library installed (usr/include/SDL2):

> ubuntu@ubuntu:~/Github/ioq3$ make  
> make[1]: Entering directory ‘/home/ubuntu/Github/ioq3’
> 
> Building in build/release-linux-x86\_64:  
> PLATFORM: linux  
> ARCH: x86\_64  
> VERSION: 1.36\_GIT\_2b42f0bd-2020-07-15  
> COMPILE\_PLATFORM: linux  
> COMPILE\_ARCH: x86\_64  
> HAVE\_VM\_COMPILED: true  
> PKG\_CONFIG: pkg-config  
> CC: cc
> 
> CFLAGS:  
> -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe -DUSE\_ICON  
> -DARCH\_STRING=“x86\_64” -DNO\_GZIP -Icode/zlib -DUSE\_INTERNAL\_JPEG -Icode/jpeg-8c  
> -DUSE\_LOCAL\_HEADERS -DPRODUCT\_VERSION=“1.36\_GIT\_2b42f0bd-2020-07-15” -Wformat=2  
> -Wno-format-zero-length -Wformat-security -Wno-format-nonliteral -Wstrict-aliasing=2  
> -Wmissing-format-attribute -Wdisabled-optimization -Werror-implicit-function-declaration  
> -MMD -DNDEBUG -O3 -ffast-math
> 
> CLIENT\_CFLAGS:  
> -D\_REENTRANT -I/usr/include/SDL2 -DUSE\_OPENAL -DUSE\_OPENAL\_DLOPEN -DUSE\_CURL  
> -DUSE\_CURL\_DLOPEN -DUSE\_VOIP -DUSE\_CODEC\_OPUS -DOPUS\_BUILD -DHAVE\_LRINTF -DFLOATING\_POINT  
> -DFLOAT\_APPROX -DUSE\_ALLOCA -Icode/opus-1.2.1/include -Icode/opus-1.2.1/celt  
> -Icode/opus-1.2.1/silk -Icode/opus-1.2.1/silk/float -Icode/opusfile-0.9/include  
> -DUSE\_CODEC\_VORBIS -Icode/libvorbis-1.3.6/include -Icode/libvorbis-1.3.6/lib  
> -Icode/libogg-1.3.3/include -DUSE\_RENDERER\_DLOPEN -DUSE\_MUMBLE
> 
> SERVER\_CFLAGS:  
> -DUSE\_VOIP
> 
> LDFLAGS:
> 
> LIBS:  
> -ldl -lm
> 
> CLIENT\_LIBS:  
> -Wl,-rpath,/usr/lib -Wl,–enable-new-dtags -lSDL2 -lrt
> 
> AUTOUPDATER\_LIBS:  
> -ldl
> 
> Output:  
> ioq3ded.x86\_64  
> ioquake3.x86\_64  
> renderer\_opengl1\_x86\_64.so  
> renderer\_opengl2\_x86\_64.so  
> baseq3/cgamex86\_64.so  
> baseq3/qagamex86\_64.so  
> baseq3/uix86\_64.so  
> missionpack/cgamex86\_64.so  
> missionpack/qagamex86\_64.so  
> missionpack/uix86\_64.so  
> baseq3/vm/cgame.qvm  
> baseq3/vm/qagame.qvm  
> baseq3/vm/ui.qvm  
> missionpack/vm/cgame.qvm  
> missionpack/vm/qagame.qvm  
> missionpack/vm/ui.qvm
> 
> make[2]: Entering directory ‘/home/ubuntu/Github/ioq3’  
> make[2]: ‘build/release-linux-x86\_64/ioq3ded.x86\_64’ is up to date.  
> CC code/client/cl\_main.c  
> In file included from code/client/cl\_main.c:27:  
> code/client/…/sys/sys\_local.h:28:11: fatal error: ‘SDL\_version.h’ file not found
> 
> # include “SDL\_version.h”
> 
> ```
> ^ ~~~~~~~~~~~~~~
> 
> ```
> 
> 1 error generated.  
> Makefile:2662: recipe for target ‘build/release-linux-x86\_64/client/cl\_main.o’ failed  
> make[2]: \*\*\* [build/release-linux-x86\_64/client/cl\_main.o] Error 1  
> make[2]: Leaving directory ‘/home/ubuntu/Github/ioq3’  
> Makefile:1365: recipe for target ‘targets’ failed  
> make[1]: \*\*\* [targets] Error 2  
> make[1]: Leaving directory ‘/home/ubuntu/Github/ioq3’  
> Makefile:1316: recipe for target ‘release’ failed  
> make: \*\*\* [release] Error 2

My sdl2 library:

> ubuntu@ubuntu:~/Github/ioq3$ pkg-config --cflags --libs sdl2  
> -D\_REENTRANT -I/usr/include/SDL2 -Wl,-rpath,/usr/lib -Wl,–enable-new-dtags -lSDL2

It seems to me that the header should instead be included with: include “SDL2/SDL\_version.h”.  
Am I missing something here and doing something wrong?

---

<div class="post-metadata">

**Author:** ![GoldenKrisp](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@GoldenKrisp](https://discourse.ioquake.org/u/GoldenKrisp)\
**Post date:** [August 7, 2020, 9:29pm UTC](https://discourse.ioquake.org/t/linux-build-fatal-error-sdl-version-h-file-not-found/1526/2 "2020-08-07T21:29:33Z")

</div>

Okay I found the issue. I was somehow missing files in /usr/include/SDL2. I did

> sudo apt-get install libsdl2-dev

and it now compiles.
