Link error on Fedora 18 x86_64 [6121]

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
wheals
Space Squid
Posts: 88
Joined: Sun Mar 24, 2013 3:56 pm

Link error on Fedora 18 x86_64 [6121]

#1 Post by wheals »

I tried to compile FO on Linux for my first time today. I had no problems (except for not getting the right packages at first) until I ran into this error with ld crashing and not linking freeoriond:

Code: Select all

/bin/ld: CMakeFiles/freeoriond.dir/__/network/ServerNetworking.cpp.o: undefined reference to symbol '__cxa_free_exception@@CXXABI_1.3'
/bin/ld: note: '__cxa_free_exception@@CXXABI_1.3' is defined in DSO /lib64/libstdc++.so.6 so try adding it to the linker command line
/lib64/libstdc++.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [freeoriond] Error 1
make[1]: *** [server/CMakeFiles/freeoriond.dir/all] Error 2
make: *** [all] Error 2
All my code and content provided herein or on GitHub is released under the GPL 2.0 and/or CC-BY-SA 3.0, as appropriate.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Link error on Fedora 18 x86_64 [6121]

#2 Post by Geoff the Medio »

This may not be a FreeOrion-specific issue. You might try googling the error message (other than the FO-specific part) or the "note".

wheals
Space Squid
Posts: 88
Joined: Sun Mar 24, 2013 3:56 pm

Re: Link error on Fedora 18 x86_64 [6121]

#3 Post by wheals »

OK, fixed it. Freerion is working! :D

For the sake of those in the future who wonder what was wrong: When googling, I didn't find a solution (most of the error reports were for different problems) but I did find someone who implied the error was connected to building a C++ program with a C compiler. Sure enough, cmake's CXX variable (it's called something like that) was set to gcc, instead of g++. I fixed it with ccmake . and everything worked. (I'm not sure how the preocess even got that far; presumably, the CXX variable was changed in the middle of the building process.)

PS: Can you give me a wiki account so that I can post what changes I needed to make to the isntructions to get the compilation to work?
All my code and content provided herein or on GitHub is released under the GPL 2.0 and/or CC-BY-SA 3.0, as appropriate.

Post Reply