View topic - Build failure on Fedora 12 (gcc 4.4.2)



All times are UTC + 1 hour


Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: 21 Nov 2009, 10:06 

Joined: 17 Jan 2009, 18:26
Hi all,

I'm trying to build Spring 0.80.5.2 on Fedora 12 (gcc 4.4.2) and I get this failure at the linking stage :

Code:
CMakeFiles/spring.dir/Game/SelectMenu.cpp.o: In function `SelectMenu::Update()':
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/Game/SelectMenu.cpp:212: undefined reference to `Connection::Poll()'
CMakeFiles/spring.dir/System/UpdaterWindow.cpp.o: In function `UpdaterWindow':       
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/System/UpdaterWindow.cpp:14: undefined reference to `Connection::Connection()'
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/System/UpdaterWindow.cpp:26: undefined reference to `Connection::Connect(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'           
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/System/UpdaterWindow.cpp:27: undefined reference to `Connection::~Connection()'
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/System/UpdaterWindow.cpp:14: undefined reference to `Connection::Connection()'
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/System/UpdaterWindow.cpp:26: undefined reference to `Connection::Connect(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'           
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/System/UpdaterWindow.cpp:27: undefined reference to `Connection::~Connection()'
CMakeFiles/spring.dir/System/UpdaterWindow.cpp.o: In function `~UpdaterWindow':         
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/System/UpdaterWindow.h:16: undefined reference to `Connection::~Connection()'
/home/pkg/fedora/pkgs/spring/F-12/spring_0.80.5.2/rts/System/UpdaterWindow.h:16: undefined reference to `Connection::~Connection()'

Any idea what's happening here ? Thanks !


Top
 Offline Profile  
 
PostPosted: 21 Nov 2009, 12:36 
Spring Developer

Joined: 24 Jun 2007, 07:34
Location: 50┬░ 56' N, 11┬░ 35' O
Strange, that should not happen.

1. Did you start from a clean build directory?
2. Were there any errors before this one?


Top
 Offline Profile  
 
PostPosted: 21 Nov 2009, 15:07 

Joined: 17 Jan 2009, 18:26
Yes, I started from a clean tarball and ran :
Code:
cmake -DDATADIR:PATH=share/spring -DLIBDIR:PATH=lib

Before these lines are a "Linking CXX executable ../spring" message in red, followed by several screenful of files being linked, ending with :
Code:
 -o ../spring -rdynamic -lopenal -logg -lvorbisfile -lvorbis -lGL -lGLU -lGLEW -lIL -lILU -L/usr/lib -Wl,--export-dynamic -lalleg-4.2.2 -lalleg_unsharable -lfreetype -lX11 -lXcursor -lSDL -lpthread -lboost_regex-mt -lboost_thread-mt -lboost_program_options-mt -lboost_system-mt -lboost_signals-mt lib/liblua.a lib/lib7zip.a lib/libhpiutil2.a lib/liboscpack.a lib/libminizip.a lib/streflop/libstreflop.a lib/liblobby.so -lz -lboost_thread-mt -lboost_system-mt


Top
 Offline Profile  
 
PostPosted: 22 Dec 2009, 23:19 

Joined: 22 Dec 2009, 22:57
Same problem here


Top
 Offline Profile  
 
PostPosted: 22 Dec 2009, 23:38 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
could you try compiling latest spring master?
also, talk to devs on the lobby, for more comfortable problem finding.


Top
 Offline Profile  
 
PostPosted: 23 Dec 2009, 10:57 

Joined: 17 Jan 2009, 18:26
It does build here with the git master. I'm trying to extract which change caused the build to work, but it's pretty hard for me...


Top
 Offline Profile  
 
PostPosted: 23 Dec 2009, 11:44 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
git has some tools that can help you there.
for example, if you think you know which file could contian the fix, you can search for commits that changed this file with gitk. an other thing to use is git bisect (you'll find info about it online or in the man page).
sorry if you already knew ;-)


Top
 Offline Profile  
 
PostPosted: 23 Dec 2009, 21:47 

Joined: 17 Jan 2009, 18:26
Actually, it's not fixed in git master. It's rather hard to say, but I think it comes from one of my compilation options. I tried running make without "-j4" but it's not that either.

I'll keep looking...


Top
 Offline Profile  
 
PostPosted: 23 Dec 2009, 22:48 

Joined: 17 Jan 2009, 18:26
I think I tracked it back to this CMake option
Code:
-DBUILD_SHARED_LIBS:BOOL=ON

With it, the build fails, and without it it completes.

Olivier, can you confirm this ?


Top
 Offline Profile  
 
PostPosted: 23 Dec 2009, 23:47 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
CMake Docu wrote:
add_library(<name> [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] source1 source2 ... source)
If no type is given explicitly the type is STATIC or SHARED based on whether the current value of the variable BUILD_SHARED_LIBS is true.

how did that flag get in there??

guess we should make all types explicit though. i will do that.
thanks for finding!

edit:
made all add_library() calls in our CMake build files explicit (there was only this one for lib-lobby that was not).


Top
 Offline Profile  
 
PostPosted: 24 Dec 2009, 01:17 

Joined: 22 Dec 2009, 22:57
Yes, same here.
-DBUILD_SHARED_LIBS:BOOL=ON --> Fail
-DBUILD_SHARED_LIBS:BOOL=OFF --> Build


Top
 Offline Profile  
 
PostPosted: 24 Dec 2009, 08:28 

Joined: 17 Jan 2009, 18:26
hoijui wrote:
how did that flag get in there??


It's in the default cmake command when building Fedora RPMs.

hoijui wrote:
guess we should make all types explicit though. i will do that.


Thanks !


Top
 Offline Profile  
 
PostPosted: 24 Dec 2009, 08:45 

Joined: 17 Jan 2009, 18:26
I confirm it does build with rpm's default cmake command after adding this commit:
http://github.com/spring/spring/commit/ ... a20a839246

Thanks a lot hoijui !


Top
 Offline Profile  
 
PostPosted: 24 Dec 2009, 10:08 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
:D was really no work for me; you did it.
i also added the commit to the 0.80.5-branch, which can be compiled to play online (contains some more fixes then the current tarball on top of 0.80.5.2).


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.