Opened 13 years ago
Closed 13 years ago
Last modified 4 years ago
#4833 closed defect
BUILD: Link error when building without engines
|Reported by:||salty-horse||Owned by:||fingolfin|
Using latest svn.
Building without engines is useful for testing non-engine functionality quickly. However, when configuring scummvm with --disable-all-engines, the final linking operation fails:
$ g++ -lm backends/platform/sdl/events.o backends/platform/sdl/graphics.o backends/platform/sdl/hardwarekeys.o backends/platform/sdl/main.o backends/platform/sdl/sdl.o base/libbase.a engines/libengines.a gui/libgui.a graphics/libgraphics.a sound/libsound.a backends/libbackends.a common/libcommon.a sound/softsynth/mt32/libmt32.a -lvorbisfile -lvorbis -logg -lFLAC -logg -lmad -lasound -lz -lfluidsynth -L/usr/lib -lSDL -o scummvm
/home/ori/clang-crash/scummvm-git/gui/saveload.cpp:247: undefined reference to `SaveStateDescriptor::getBool(Common::String const&) const' /home/ori/clang-crash/scummvm-git/backends/events/default/default-events.cpp:107: undefined reference to `g_engine'
I managed to fix this by moving engines/libengines.a and graphics/libgraphics.a (on which some engines, like gob, depend) to be right after backends/libbackends.a.
The attached patch changes the order of the "engines" module to be after "backends". I have tested that this successfully builds both --disable-all-engines and --enable-all-engines
Ticket imported from: #2976619. Ticket imported from: bugs/4833.
Change History (4)
by , 13 years ago
comment:1 by , 13 years ago
comment:2 by , 13 years ago
|Status:||new → closed|
comment:3 by , 4 years ago
|Component:||→ Port: Linux|
I cannot reproduce the issue on Mac OS X, but this is not the first time the OS X linker accepts stuff which Linux / GNU ld does not like. Since the patch has no negative effects for me, and you say it fixes issues on Linux, I just committed it.