Opened 17 years ago
Closed 17 years ago
Last modified 4 years ago
#2710 closed defect (fixed)
ALL: Linker error due to link order / savefiles vtable
|Reported by:||SF/bellut||Owned by:||fingolfin|
The latest svn (23319) failes to link:
g++ backends/platform/sdl/events.o backends/platform/sdl/graphics.o backends/platform/sdl/sdl.o base/libbase.a engines/scumm/libscumm.a engines/simon/libsimon.a engines/sky/libsky.a engines/sword1/libsword1.a engines/sword2/libsword2.a engines/queen/libqueen.a engines/saga/libsaga.a engines/kyra/libkyra.a engines/gob/libgob.a engines/lure/liblure.a engines/cine/libcine.a engines/agi/libagi.a gui/libgui.a graphics/libgraphics.a sound/libsound.a common/libcommon.a backends/libbackends.a sound/softsynth/mt32/libmt32.a -lvorbisfile -lvorbis -logg -lFLAC -lmad -lasound -lz -lmpeg2 -L/usr/lib -lSDL -lpthread -o scummvm backends/libbackends.a(default-saves.o):/home/bodo/src/scummvm/svn/scummvm/backends/saves/default/default-saves.cpp:148: undefined reference to `Common::SaveFileManager::getSavePath() const' backends/libbackends.a(default-saves.o): In function `DefaultSaveFileManager::~DefaultSaveFileManager [in-charge]()': /home/bodo/src/scummvm/svn/scummvm/backends/saves/default/default-saves.cpp:146: undefined reference to `vtable for Common::SaveFileManager' backends/libbackends.a(default-saves.o): In function `DefaultSaveFileManager::~DefaultSaveFileManager [in-charge deleting]()': /home/bodo/src/scummvm/svn/scummvm/backends/saves/default/default-saves.cpp:146: undefined reference to `vtable for Common::SaveFileManager' collect2: ld returned 1 exit status make: *** [scummvm] Error 1
g++ is 3.2, there were no warnings except for 3 unused variables (2 in SAGA, 1 in Lure). configure options : --enable-lure --enable-cine --enable-agi
Ticket imported from: #1512872. Ticket imported from: bugs/2710.
Change History (14)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
comment:3 by , 17 years ago
|Priority:||normal → blocker|
comment:4 by , 17 years ago
Happens to me, too, unless I compile ScummVM with plugin support.
comment:5 by , 17 years ago
I'm unable to compile ScummVM SVN under mingw too, which currently doesn't offer plugin support.
Adding '-Wl,-whole-archive' at link time, doesn't help either.
comment:6 by , 17 years ago
|Summary:||compile error on svn 23319 → ALL: Linker error due to link order / savefiles vtable|
comment:7 by , 17 years ago
Kirben: So where did you add the -Wl,-whole-archive, precisely?
Anyway, I'll implement a workaround tonight or tomorrow, depending on my available time...
comment:8 by , 17 years ago
Passing "whole-archive" to the linker works here (mingw/gcc3.4.2). I just added these 2 defines to config.mk :
PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--no-whole-archive
comment:9 by , 17 years ago
Yes, that works, I must not have added it correctly.
I'm using GCC 3.4.5 under mingw.
comment:10 by , 17 years ago
whole-archive also works for me (Linux, g++ 3.2, ld 220.127.116.11.15), using the latest ld (2.17) however doesn't work.
comment:11 by , 17 years ago
I commited a change to SVN which should hopefully fix the issue. Please try again and tell me whether it helps.
comment:12 by , 17 years ago
The change works here, ScummVM links without whole-archive.
comment:13 by , 17 years ago
|Status:||new → closed|
comment:14 by , 4 years ago
|Component:||--Unset-- → Port: Win32|
Another victim of b0rked ld.