Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make can't find SDL_mixer.h but I included the SDL dir

I'm trying to build eduke32 from source .

It requires, among other things, SDL_mixer.h.

I do have it :

$ locate SDL_mixer.h
/usr/include/SDL/SDL_mixer.h

(I have Devel Tools group installed, as well as a lot of other dev packages)

But when I start building, I get the SDL_mixer file not found error.

$ make

Build started using:
compiler: "gcc -Wimplicit -Wdeclaration-after-statement -O2 -funswitch-loops -fomit-frame-pointer -DNDEBUG -DUSING_LTO -flto -fno-stack-protector  -W -Wall -Werror-implicit-function-declaration -Wpointer-arith -Wextra  -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 -fjump-tables -Wno-unused-result  -Wno-char-subscripts -DUSE_LIBPNG -DUSE_LIBVPX -Isource -Ibuild/include -Isource/jmact -Isource/jaudiolib/include -Isource/enet/include  -fno-pic -DHAVE_GTK2 -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/harfbuzz    -DHAVE_INTTYPES -DSDL_TARGET=2 -I/usr/include/SDL2 -D_REENTRANT -DRENDERTYPESDL=1 -DMIXERTYPESDL=1 -Wno-strict-overflow -DUSE_OPENGL -DNOASM -DPOLYMER  -Wno-attributes"
linker: " -flto  -Wl,-Map=start.memmap     -lrt -lFLAC -lvorbisfile -lvorbis -logg -lSDL2_mixer -lm -lvpx  -lSDL2 -lpthread -ldl -pthread -lpng -lz  "
Built object source/obj/game.o 
Built object source/obj/global.o 
In file included from build/include/mutex.h:11:0,
                 from build/include/cache1d.h:7,
                 from source/duke3d.h:43,
                 from source/sdlmusic.c:39:
build/include/sdl_inc.h:62:25: fatal error: SDL_mixer.h: No such file or directory
 #  include "SDL_mixer.h"
                         ^
compilation terminated.
Failed building source/obj/sdlmusic.o from source/sdlmusic.c!

this happens even if I add the include-dir option :

$ make --include-dir=/usr/include/SDL/

what's happening here ? Someone has a clue ?

like image 999
Lioobayoyo Avatar asked Nov 01 '22 01:11

Lioobayoyo


1 Answers

I inspected the Makefile and found that the program was looking for SDL**2**/SDL_mixer.h

I installed SDL2_mixer-devel package and everything went fine.

my use of --include-dir option in make seems to be irrelevant to what I was trying to do. (see etan comment)

like image 59
Lioobayoyo Avatar answered Jan 01 '23 00:01

Lioobayoyo