Opened 5 years ago
Closed 3 years ago
#10660 closed defect (invalid)
BACKENDS: Linux (Manjaro) - Build failure
|Reported by:||lotharsm||Owned by:||lotharsm|
I checked out the current master code and tried to compile it with my current Manjaro installation (based on Arch Linux).
base-devel git curl faad2 freetype2 flac fluidsynth libjpeg-turbo libogg libvorbis libmad libmpeg2 libtheora libpng nasm readline sdl2 sdl2_net zlib
(worked as I tested it a few months ago for the last time)
C++ backends/platform/sdl/sdl.o In file included from ./backends/platform/sdl/sdl.h:26, from backends/platform/sdl/sdl.cpp:25: ./backends/platform/sdl/sdl-sys.h:144:10: schwerwiegender Fehler: SDL.h: Datei oder Verzeichnis nicht gefunden #include <SDL.h> ^~~~~~~ Kompilierung beendet. make: *** [Makefile.common:104: backends/platform/sdl/sdl.o] Fehler 1
[user@machine scummvm]$ whereis SDL.h SDL: /usr/include/SDL
Change History (16)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
defioram: This is the output:
g++ -MMD -MF "backends/platform/sdl/.deps/sdl.d" -MQ "backends/platform/sdl/sdl.o" -MP -Wall -g -ansi -W -Wno-unused-parameter -Wno-empty-body -pedantic -Wno-long-long -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow -Wnon-virtual-dtor -Wwrite-strings -fno-exceptions -fcheck-new -DHAVE_CONFIG_H -DSDL_BACKEND -DPOSIX -DHAS_POSIX_SPAWN -DDATA_PATH=\"/usr/local/share/scummvm\" -DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DENABLE_SCUMM=STATIC_PLUGIN -DENABLE_SCUMM_7_8 -DENABLE_HE -DENABLE_ACCESS=STATIC_PLUGIN -DENABLE_ADL=STATIC_PLUGIN -DENABLE_AGI=STATIC_PLUGIN -DENABLE_AGOS=STATIC_PLUGIN -DENABLE_AGOS2 -DENABLE_BBVS=STATIC_PLUGIN -DENABLE_CGE=STATIC_PLUGIN -DENABLE_CGE2=STATIC_PLUGIN -DENABLE_CINE=STATIC_PLUGIN -DENABLE_COMPOSER=STATIC_PLUGIN -DENABLE_CRUISE=STATIC_PLUGIN -DENABLE_DRACI=STATIC_PLUGIN -DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_DREAMWEB=STATIC_PLUGIN -DENABLE_FULLPIPE=STATIC_PLUGIN -DENABLE_GNAP=STATIC_PLUGIN -DENABLE_GOB=STATIC_PLUGIN -DENABLE_GROOVIE=STATIC_PLUGIN -DENABLE_HOPKINS=STATIC_PLUGIN -DENABLE_HUGO=STATIC_PLUGIN -DENABLE_ILLUSIONS=STATIC_PLUGIN -DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LOL -DENABLE_EOB -DENABLE_LAB=STATIC_PLUGIN -DENABLE_LURE=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN -DENABLE_MADS=STATIC_PLUGIN -DENABLE_MOHAWK=STATIC_PLUGIN -DENABLE_MYST -DENABLE_RIVEN -DENABLE_MORTEVIELLE=STATIC_PLUGIN -DENABLE_NEVERHOOD=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN -DENABLE_PEGASUS=STATIC_PLUGIN -DENABLE_PLUMBERS=STATIC_PLUGIN -DENABLE_QUEEN=STATIC_PLUGIN -DENABLE_SAGA=STATIC_PLUGIN -DENABLE_IHNM -DENABLE_SCI=STATIC_PLUGIN -DENABLE_SCI32 -DENABLE_SHERLOCK=STATIC_PLUGIN -DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN -DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_SWORD25=STATIC_PLUGIN -DENABLE_TEENAGENT=STATIC_PLUGIN -DENABLE_TINSEL=STATIC_PLUGIN -DENABLE_TITANIC=STATIC_PLUGIN -DENABLE_TOLTECS=STATIC_PLUGIN -DENABLE_TONY=STATIC_PLUGIN -DENABLE_TOON=STATIC_PLUGIN -DENABLE_TOUCHE=STATIC_PLUGIN -DENABLE_TSAGE=STATIC_PLUGIN -DENABLE_TUCKER=STATIC_PLUGIN -DENABLE_VOYEUR=STATIC_PLUGIN -DENABLE_WINTERMUTE=STATIC_PLUGIN -DENABLE_XEEN=STATIC_PLUGIN -DENABLE_ZVISION=STATIC_PLUGIN -I. -I. -I./engines -I//include/SDL2 -I/usr/include -D_REENTRANT -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -c backends/platform/sdl/sdl.cpp -o backends/platform/sdl/sdl.o In file included from ./backends/platform/sdl/sdl.h:26, from backends/platform/sdl/sdl.cpp:25: ./backends/platform/sdl/sdl-sys.h:144:10: schwerwiegender Fehler: SDL.h: Datei oder Verzeichnis nicht gefunden #include <SDL.h> ^~~~~~~ Kompilierung beendet. make: *** [Makefile.common:104: backends/platform/sdl/sdl.o] Fehler 1
comment:3 by , 5 years ago
The issue is likely with the
-I//include/SDL2. I suspect this is not the correct path to your SDL2 header files.
When you run
configure, what result do you get for the
Looking for sdl-config... line?
You may also want to check what
sdl2-config --cflags gives you.
As far as I can see none of the sdl-related stuff in configure has changed in the past two years, so this is more likely related to some changes on your side (for example in your environment).
comment:4 by , 5 years ago
Yep, it is indeed the
-I//include/SDL2 line, setting it manually to the right path in config.mk fixes the problem.
sdl2-config seems to be detected without issues:
Looking for sdl-config... /bin/sdl2-config
-I/usr/include/SDL2 -I/usr/include -D_REENTRANT, wghich is the correct path.
Since this is a completely new installed Workstation, I cannot compare to what change since the last time I tried this on my own installation...
comment:5 by , 5 years ago
sdl2-config installed in
/bin and not
/usr/bin? Is that a standard thing on that system?
This results in configure setting
/, and then it actually calls
sdl2-config --prefix=/ --cflags which is likely the reason why the include path gets wrong.
comment:6 by , 5 years ago
Yep, this is a default Manjaro installation with all packages installed via pacman, not even from AUR...
comment:7 by , 5 years ago
--prefix="$_sdlpath" from the sdl2-config call would likely solve this issue, but I wonder if this is a good idea.
This was added more that ten years ago in commit 0657ef6 with the message "Use sdl-config --prefix to enable better detection of include paths.". This does not explicitly indicate if this was to fix an issue with a specific port though, so maybe this was not really needed...
comment:8 by , 5 years ago
Should we revert this commit then and see if there are any issues with some of the ports?
comment:9 by , 5 years ago
I suspect passing the prefix is important when sdl has been relocated compared to the prefix used when it was compiled, which might be the case for most toolchains on buildbot for example. So I don't think we can just remove it. But I am not quite sure what would be the best solution here. Maybe we could limit the use of
--prefix when calling
sdl2-config to the case where a prefix is explicitly passed to
comment:10 by , 5 years ago
I think that would be a good idea only to call
--with-sdl-prefix= is used.
comment:11 by , 5 years ago
I suspect that something was wrong with my Manjaro installation, it broke completely today. I'll leave this bug report open with low priority for further reference.
comment:12 by , 5 years ago
|Priority:||normal → low|
comment:13 by , 4 years ago
|Component:||Ports → Port: Linux|
comment:14 by , 3 years ago
|Summary:||BUILD: Build failure on Manjaro Linux → BACKENDS: Linux (Manjaro) - Build failure|
Was your build error rectified?
Can this be closed?
comment:15 by , 3 years ago
Yes, I'll close it since it's obsolete and outdated. Thanks for the reminder!
comment:16 by , 3 years ago
|Status:||new → closed|
lotharsm: Try doing ./configure --enable-verbose-build && make clean && make
That should output the exact compile command being sent to C++ / gcc and thus make it clearer what is going on here.