Page 1 of 1

0.79.0.1/2 unitsync: undefined symbol

Posted: 23 May 2009, 04:47
by SirMaverick
I compiled the sources for 0.79.0.1 and 0.79.0.2. When I tried to start SpringLobby, I get an error when it tries to load unitsync.so:"undefined symbol: _ZN8Platform13GetBinaryPathEv"

This does not happen with 0.78.2.1 and 0.79.0. They work fine.

$ grep -r ZN8Platform13GetBinaryPathEv .
Binary file ./build/spring matches
Binary file ./build/rts/System/ConfigHandler.o matches
Binary file ./build/rts/System/FileSystem/DataDirLocater.o matches
Binary file ./build/rts/System/FileSystem/DataDirLocater.os matches
Binary file ./build/rts/System/Platform/Misc.o matches
Binary file ./build/unitsync/rts/System/ConfigHandler.cpp.os matches
Binary file ./build/unitsync/unitsync.so matches

setup:
no special configuration to compile the source (no extra parameter to scons)
gcc version 4.3.3

Re: 0.79.0.1/2 unitsync: undefined symbol

Posted: 23 May 2009, 10:48
by koshi
try building with cmake instead?

Re: 0.79.0.1/2 unitsync: undefined symbol

Posted: 23 May 2009, 11:04
by imbaczek
strange :/

try scons -c and then rebuild.

Re: 0.79.0.1/2 unitsync: undefined symbol

Posted: 23 May 2009, 11:53
by Kloot
The rts/System/Platform/Misc.cpp source file is missing from .79.0.*'s SConstruct. Patch to fix it:

Code: Select all

git diff SConstruct
diff --git a/SConstruct b/SConstruct
index d559773..165cda3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -287,7 +287,6 @@ unitsync_extra_files = [
        'rts/Rendering/Textures/Bitmap.cpp',
        'rts/Rendering/Textures/nv_dds.cpp',
        'rts/Sim/Misc/SideParser.cpp',
+       'rts/System/Platform/Misc.cpp',
        'rts/System/Info.cpp',
        'rts/System/Option.cpp',
        'rts/System/ConfigHandler.cpp',
imbaczek wrote:strange :/
Seems http://github.com/spring/spring/commit/ ... 9e3d96ff04 didn't make it into the .79 release branch.

Re: 0.79.0.1/2 unitsync: undefined symbol

Posted: 23 May 2009, 14:47
by SirMaverick
koshi wrote:try building with cmake instead?
Worked.
(libunitsync.so (cmake) is 2 times bigger than unitsync.so (scons))
imbaczek wrote:try scons -c and then rebuild.
I build on fresh sources. That did not help.
Kloot wrote:The rts/System/Platform/Misc.cpp source file is missing from .79.0.*'s SConstruct. Patch to fix it:
That fixed unitsync built with scons.