[ scummvm-Bugs-2114739 ] ALL: Linker errors when building ScummVM

SourceForge.net noreply at sourceforge.net
Tue Sep 16 21:18:55 CEST 2008


Bugs item #2114739, was opened at 2008-09-16 21:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2114739&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: All Games
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Torbjrn Andersson (eriktorbjorn)
Assigned to: Max Horn (fingolfin)
Summary: ALL: Linker errors when building ScummVM

Initial Comment:
Latest SVN snapshot

I'm currently not able to compile ScummVM because of linking errors. See linker output below.

It's as if the linking process never sees the base/game.o file. I tried passing the --verbose option to the linker, and part of the output read:

attempt to open base/libbase.a succeeded
(base/libbase.a)main.o
(base/libbase.a)commandLine.o
(base/libbase.a)plugins.o
(base/libbase.a)version.o

Note how base/game.o is missing. The manual makes vague references to the linker throwing away unnecessary object files, but I don't know what constitutes an unnecessary object file.

http://www.lysium.de/blog/index.php?/archives/222-Lost-static-objects-in-static-libraries-with-GNU-linker-ld.html has some things to say about the problem, but I don't really understand it yet.

I do know that if I add base/game.o manually to the build command, or surround base/libbase.a with -Wl,--whole-archive ... -Wl,--no-whole-archive it works.

I did notice that the code in base/game.cpp is not in any namespace, but I don't know if that makes any difference.

Linker output:

engines/scumm/libscumm.a(detection.o): In function `ScummMetaEngine::querySaveMetaInfos(char const*, int) const':
/home/d91tan/src/CVS/scummvm/engines/scumm/detection.cpp:1004: undefined reference to `SaveStateDescriptor::setDeletableFlag(bool)'
/home/d91tan/src/CVS/scummvm/engines/scumm/detection.cpp:1005: undefined reference to `SaveStateDescriptor::setThumbnail(Graphics::Surface*)'
/home/d91tan/src/CVS/scummvm/engines/scumm/detection.cpp:1014: undefined reference to `SaveStateDescriptor::setSaveDate(int, int, int)'
/home/d91tan/src/CVS/scummvm/engines/scumm/detection.cpp:1019: undefined reference to `SaveStateDescriptor::setSaveTime(int, int)'
/home/d91tan/src/CVS/scummvm/engines/scumm/detection.cpp:1025: undefined reference to `SaveStateDescriptor::setPlayTime(int, int)'
engines/scumm/libscumm.a(detection.o): In function `ScummMetaEngine::detectGames(Common::FSList const&) const':
/home/d91tan/src/CVS/scummvm/engines/scumm/detection.cpp:720: undefined reference to `findPlainGameDescriptor(char const*, PlainGameDescriptor const*)'
/home/d91tan/src/CVS/scummvm/engines/scumm/detection.cpp:723: undefined reference to `GameDescriptor::updateDesc(char const*)'
engines/kyra/libkyra.a(detection.o): In function `KyraMetaEngine::querySaveMetaInfos(char const*, int) const':
/home/d91tan/src/CVS/scummvm/engines/kyra/detection.cpp:1209: undefined reference to `SaveStateDescriptor::setDeletableFlag(bool)'
/home/d91tan/src/CVS/scummvm/engines/kyra/detection.cpp:1210: undefined reference to `SaveStateDescriptor::setThumbnail(Graphics::Surface*)'
engines/queen/libqueen.a(queen.o): In function `QueenMetaEngine::detectGames(Common::FSList const&) const':
/home/d91tan/src/CVS/scummvm/engines/queen/queen.cpp:119: undefined reference to `GameDescriptor::updateDesc(char const*)'
/home/d91tan/src/CVS/scummvm/engines/queen/queen.cpp:121: undefined reference to `GameDescriptor::updateDesc(char const*)'
/home/d91tan/src/CVS/scummvm/engines/queen/queen.cpp:123: undefined reference to `GameDescriptor::updateDesc(char const*)'
/home/d91tan/src/CVS/scummvm/engines/queen/queen.cpp:125: undefined reference to `GameDescriptor::updateDesc(char const*)'
engines/sky/libsky.a(sky.o): In function `SkyMetaEngine::detectGames(Common::FSList const&) const':
/home/d91tan/src/CVS/scummvm/engines/sky/sky.cpp:191: undefined reference to `GameDescriptor::updateDesc(char const*)'
gui/libgui.a(launcher.o): In function `GUI::SaveLoadChooser::updateSelection(bool)':
/home/d91tan/src/CVS/scummvm/gui/launcher.cpp:678: undefined reference to `SaveStateDescriptor::getBool(Common::String const&) const'
common/libcommon.a(advancedDetector.o): In function `Common::toGameDescriptor(Common::ADGameDescription const&, PlainGameDescriptor const*)':
/home/d91tan/src/CVS/scummvm/common/advancedDetector.cpp:153: undefined reference to `GameDescriptor::updateDesc(char const*)'
common/libcommon.a(advancedDetector.o): In function `Common::AdvancedDetector::findGameID(char const*, PlainGameDescriptor const*, Common::ADObsoleteGameID const*)':
/home/d91tan/src/CVS/scummvm/common/advancedDetector.cpp:117: undefined reference to `findPlainGameDescriptor(char const*, PlainGameDescriptor const*)'
/home/d91tan/src/CVS/scummvm/common/advancedDetector.cpp:127: undefined reference to `findPlainGameDescriptor(char const*, PlainGameDescriptor const*)'
collect2: ld returned 1 exit status
make: *** [scummvm] Error 1


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2114739&group_id=37116




More information about the Scummvm-tracker mailing list