#3989 closed defect (fixed)
Linking fails when disabling certain engines
Reported by: | eriktorbjorn | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | --Other-- |
Version: | Keywords: | ||
Cc: | Game: |
Description
Latest ScummVM SVN snapshot Unstable Debian (Linux)
If I disable the SCUMM and AGOS engines, I can no longer build ScummVM. (I don't usually disable engines like that, but it's occasionally useful, e.g. when doing regression testing.)
To clarify, --disable-scumm and --disable-agos were the only configuration options I used. The linker claims that:
backends/libbackends.a(compressed-saves.o): In function `wrapOutSaveFile(Common::WriteStream*)': /home/d91tan/src/CVS/scummvm+test/backends/saves/compressed/compressed-saves.cpp:35: undefined reference to `Common::wrapCompressedWriteStream(Common::WriteStream*)' backends/libbackends.a(compressed-saves.o): In function `wrapInSaveFile(Common::SeekableReadStream*)': /home/d91tan/src/CVS/scummvm+test/backends/saves/compressed/compressed-saves.cpp:31: undefined reference to `Common::wrapCompressedReadStream(Common::SeekableReadStream*)' collect2: ld returned 1 exit status make: *** [scummvm] Error 1
Ticket imported from: #2144834. Ticket imported from: bugs/3989.
Attachments (1)
Change History (11)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
It still happens for me, but now I have to disable the Broken Sword engines, as well. So this configuration still give me the error: --disable-sword2 --disable-sword1 --disable-agos --disable-scumm
comment:3 by , 16 years ago
Configuring ScummVM with --disable-zlib will lead to the same linking problems later on.
comment:4 by , 16 years ago
There's a cyclic dependency between the "common" and "backends" modules, so changing the link order just gives this other error:
common/libcommon.a(system.o): In function `OSystem::getEventManager()': common/system.cpp:95: undefined reference to `DefaultEventManager::DefaultEventManager(OSystem*)'
I'm attaching a hack for the makefile which links "common" twice (before and after "backends") to solve this.
I'll continue evaluating other possible solutions but I guess this would involve moving code between those modules.
comment:5 by , 16 years ago
We had to deal with similar issues in the past. The issues do not occur on Mac OS X, which is why I usually have a hard time catching them (I need to remote login to some Linux machine to fix such stuff).
Anyway, linking common & backend twice is of course a workaround, but not a proper solution for the problem, so I wouldn't accept it into trunk. I'll take a peek at the issue and how to resolve it.
comment:6 by , 16 years ago
I thought I'd give this one another try, after Fingolfin's recent barrage of patches. At the very least, the problem has changed. Doing systematic testing of which engines do and don't work is super-boring, but as an experiment I tried compiling ScummVM with only the AGOS engine, and got this linking error:
/home/d91tan/src/CVS/scummvm+test/engines/advancedDetector.cpp:353: undefined reference to `Common::md5_file_string(Common::FSNode const&, char*, unsigned int)' collect2: ld returned 1 exit status make: *** [scummvm] Error 1
comment:8 by , 16 years ago
I wasn't aware anything had been changed with regards to this, but the problem seems to be gone now. I was able to build every supported engine without any linking error. (I may have missed some, and I'm not going to try every combination) So I guess this can be closed.
comment:9 by , 16 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:10 by , 6 years ago
Component: | → --Other-- |
---|
I can't reproduce the issue with the current HEAD and gcc 4.1.2. Is it still broken for you?