Questions, problems and discussion about compiling FreeOrion.
Moderator: Oberlus
dwlg122
Space Krill
Posts: 9 Joined: Sun May 23, 2010 7:52 am
#1
Post
by dwlg122 » Sun May 23, 2010 8:11 am
Hi,
I can't compile freeorion because ld fails with some crazy boost error:
Code: Select all
Linking CXX executable ../freeoriond
CMakeFiles/freeoriond.dir/__/network/Message.cpp.o: In function `boost::archive::detail::iserializer<boost::archive::xml_iarchive, System>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const':
Message.cpp:(.text._ZNK5boost7archive6detail11iserializerINS0_12xml_iarchiveE6SystemE16load_object_dataERNS1_14basic_iarchiveEPvj[boost::archive::detail::iserializer<boost::archive::xml_iarchive, System>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const]+0x70): undefined reference to `void System::serialize<boost::archive::xml_iarchive>(boost::archive::xml_iarchive&, unsigned int)'
CMakeFiles/freeoriond.dir/__/util/SerializeMultiplayerCommon.cpp.o: In function `boost::archive::detail::oserializer<boost::archive::xml_oarchive, System>::save_object_data(boost::archive::detail::basic_oarchive&, void const*) const':
SerializeMultiplayerCommon.cpp:(.text._ZNK5boost7archive6detail11oserializerINS0_12xml_oarchiveE6SystemE16save_object_dataERNS1_14basic_oarchiveEPKv[boost::archive::detail::oserializer<boost::archive::xml_oarchive, System>::save_object_data(boost::archive::detail::basic_oarchive&, void const*) const]+0x2b): undefined reference to `void System::serialize<boost::archive::xml_oarchive>(boost::archive::xml_oarchive&, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [freeoriond] Error 1
make[1]: *** [server/CMakeFiles/freeoriond.dir/all] Error 2
make: *** [all] Error 2
root:~/src/freeorion/FreeOrion$
I have gcc 4.5.0 (gnu ld 2.20.1.20100318)
boost 1.43.0
linux 2.6.34 (64bit)
Geoff the Medio
Programming, Design, Admin
Posts: 13603 Joined: Wed Oct 08, 2003 1:33 am
Location: Munich
#2
Post
by Geoff the Medio » Sun May 23, 2010 5:45 pm
Could you try adding
To around line 12 of ServerApp.h ?
dwlg122
Space Krill
Posts: 9 Joined: Sun May 23, 2010 7:52 am
#3
Post
by dwlg122 » Sun May 23, 2010 6:16 pm
It's still the same
Code: Select all
root:~/src/freeorion/FreeOrion$ make
Scanning dependencies of target freeoriond
[ 1%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/CombatSystem.cpp.o
[ 1%] Building CXX object server/CMakeFiles/freeoriond.dir/SaveLoad.cpp.o
[ 2%] Building CXX object server/CMakeFiles/freeoriond.dir/ServerApp.cpp.o
[ 2%] Building CXX object server/CMakeFiles/freeoriond.dir/ServerFSM.cpp.o
[ 2%] Building CXX object server/CMakeFiles/freeoriond.dir/dmain.cpp.o
[ 3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Universe.cpp.o
[ 3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/AppInterface.cpp.o
Linking CXX executable ../freeoriond
CMakeFiles/freeoriond.dir/__/network/Message.cpp.o: In function `boost::archive::detail::iserializer<boost::archive::xml_iarchive, System>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const':
Message.cpp:(.text._ZNK5boost7archive6detail11iserializerINS0_12xml_iarchiveE6SystemE16load_object_dataERNS1_14basic_iarchiveEPvj[boost::archive::detail::iserializer<boost::archive::xml_iarchive, System>::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const]+0x70): undefined reference to `void System::serialize<boost::archive::xml_iarchive>(boost::archive::xml_iarchive&, unsigned int)'
CMakeFiles/freeoriond.dir/__/util/SerializeMultiplayerCommon.cpp.o: In function `boost::archive::detail::oserializer<boost::archive::xml_oarchive, System>::save_object_data(boost::archive::detail::basic_oarchive&, void const*) const':
SerializeMultiplayerCommon.cpp:(.text._ZNK5boost7archive6detail11oserializerINS0_12xml_oarchiveE6SystemE16save_object_dataERNS1_14basic_oarchiveEPKv[boost::archive::detail::oserializer<boost::archive::xml_oarchive, System>::save_object_data(boost::archive::detail::basic_oarchive&, void const*) const]+0x2b): undefined reference to `void System::serialize<boost::archive::xml_oarchive>(boost::archive::xml_oarchive&, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [freeoriond] Error 1
make[1]: *** [server/CMakeFiles/freeoriond.dir/all] Error 2
make: *** [all] Error 2
root:~/src/freeorion/FreeOrion$
Geoff the Medio
Programming, Design, Admin
Posts: 13603 Joined: Wed Oct 08, 2003 1:33 am
Location: Munich
#4
Post
by Geoff the Medio » Sun May 23, 2010 6:46 pm
I'm guessing there are issues with Boost 1.43 then. System::serialize is defined in SerializeUniverse.cpp, but there have been various issues with this code that have incompatible fixes between recent Boost versions. I'm not familiar enough with the details to fix it myself, so it'll have to wait until tzlaine has time to fix it, again.
dwlg122
Space Krill
Posts: 9 Joined: Sun May 23, 2010 7:52 am
#5
Post
by dwlg122 » Mon May 24, 2010 4:57 am
Switching from XML archives to binary archives helped (#define FREEORION_BINARY_SERIALIZATION 1)
It compiles without any error.
Geoff the Medio
Programming, Design, Admin
Posts: 13603 Joined: Wed Oct 08, 2003 1:33 am
Location: Munich
#6
Post
by Geoff the Medio » Mon May 24, 2010 6:50 am
Interesting / odd. Thanks for finding that out and posting.