Linux compile error

Questions, problems and discussion about compiling FreeOrion.

Moderators: Oberlus, Oberlus

Post Reply
Message
Author
User avatar
TheGrackle
Space Krill
Posts: 8
Joined: Fri Jul 15, 2011 4:52 pm
Location: Minnesota, USA

Linux compile error

#1 Post by TheGrackle » Sat Aug 27, 2011 2:04 pm

I get this when trying to compile 'svn 4197' under Linux Mint 11 using g++ 4.5.2, Boost 1.46.1, and Ogre 1.7. It stops at 12% complete. Has anyone else tried to compile a binary for Linux lately? I'm kind of newbie at this so maybe I'm doing something obviously wrong.

[email protected] ~/Documents/freeorion/FreeOrion $ cmake .
-- Build platform: linux
-- Configuring freeoriond
-- Configuring freeorionca
-- Configuring freeorion
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dan/Documents/freeorion/FreeOrion
[email protected] ~/Documents/freeorion/FreeOrion $ make
Scanning dependencies of target freeoriond
[ 1%] Building CXX object server/CMakeFiles/freeoriond.dir/__/Empire/Empire.cpp.o
/home/dan/Documents/freeorion/FreeOrion/Empire/Empire.cpp: In member function ‘void Empire::UpdateFoodDistribution()’:
/home/dan/Documents/freeorion/FreeOrion/Empire/Empire.cpp:2966:29: warning: unused variable ‘pop_centers’
/home/dan/Documents/freeorion/FreeOrion/Empire/Empire.cpp:2967:29: warning: unused variable ‘res_pool_objects’
[ 1%] Building CXX object server/CMakeFiles/freeoriond.dir/__/Empire/EmpireManager.cpp.o
[ 1%] Building CXX object server/CMakeFiles/freeoriond.dir/__/Empire/ResourcePool.cpp.o
[ 2%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Building.cpp.o
[ 2%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Condition.cpp.o
/home/dan/Documents/freeorion/FreeOrion/universe/Condition.cpp: In function ‘bool<unnamed>::BuildingSimpleMatch(const UniverseObject*, const std::vector<std::basic_string<char> >&)’:
/home/dan/Documents/freeorion/FreeOrion/universe/Condition.cpp:1221:26: warning: unused variable ‘objects’
[ 2%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ConditionParser1.cpp.o
[ 3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ConditionParser2.cpp.o
[ 3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ConditionParser.cpp.o
[ 3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Effect.cpp.o
[ 4%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/EffectParser.cpp.o
[ 4%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Fleet.cpp.o
[ 4%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ParserUtil.cpp.o
[ 4%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Planet.cpp.o
[ 4%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/PopCenter.cpp.o
[ 5%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Predicates.cpp.o
[ 5%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ResourceCenter.cpp.o
[ 5%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Ship.cpp.o
[ 6%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ShipDesign.cpp.o
/home/dan/Documents/freeorion/FreeOrion/universe/ShipDesign.h: In constructor ‘ShipDesign::ShipDesign()’:
/home/dan/Documents/freeorion/FreeOrion/universe/ShipDesign.h:508:13: warning: ‘ShipDesign::m_is_armed’ will be initialized after
/home/dan/Documents/freeorion/FreeOrion/universe/ShipDesign.h:499:33: warning: ‘bool ShipDesign::m_is_monster’
/home/dan/Documents/freeorion/FreeOrion/universe/ShipDesign.cpp:848:1: warning: when initialized here
/home/dan/Documents/freeorion/FreeOrion/universe/ShipDesign.h: In constructor ‘ShipDesign::ShipDesign(const std::string&, const std::string&, int, int, const std::string&, const std::vector<std::basic_string<char> >&, const std::string&, const std::string&, bool, bool)’:
/home/dan/Documents/freeorion/FreeOrion/universe/ShipDesign.h:508:13: warning: ‘ShipDesign::m_is_armed’ will be initialized after
/home/dan/Documents/freeorion/FreeOrion/universe/ShipDesign.h:499:33: warning: ‘bool ShipDesign::m_is_monster’
/home/dan/Documents/freeorion/FreeOrion/universe/ShipDesign.cpp:882:1: warning: when initialized here
[ 6%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Special.cpp.o
[ 6%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Species.cpp.o
[ 7%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/System.cpp.o
[ 7%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Tech.cpp.o
[ 7%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/TopLevelParsers.cpp.o
[ 8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/UniverseObject.cpp.o
/home/dan/Documents/freeorion/FreeOrion/universe/UniverseObject.cpp: In member function ‘virtual void UniverseObject::SetOwner(int)’:
/home/dan/Documents/freeorion/FreeOrion/universe/UniverseObject.cpp:340:27: warning: statement has no effect
[ 8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ValueRef.cpp.o
[ 8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ValueRefParser.cpp.o
[ 8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/MultiplayerCommon.cpp.o
[ 8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/Order.cpp.o
[ 8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/SerializeEmpire.cpp.o
[ 9%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/SerializeUniverse.cpp.o
[ 9%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/SitRepEntry.cpp.o
/home/dan/Documents/freeorion/FreeOrion/util/SitRepEntry.cpp: In function ‘SitRepEntry* CreateCombatDestroyedObjectSitRep(int, int, int)’:
/home/dan/Documents/freeorion/FreeOrion/util/SitRepEntry.cpp:85:30: warning: unused variable ‘planet’
/home/dan/Documents/freeorion/FreeOrion/util/SitRepEntry.cpp:81:29: warning: unused variable ‘fleet’
/home/dan/Documents/freeorion/FreeOrion/util/SitRepEntry.cpp:77:21: warning: unused variable ‘ship’
[ 9%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/VarText.cpp.o
[ 10%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/CombatSystem.cpp.o
[ 10%] Building CXX object server/CMakeFiles/freeoriond.dir/SaveLoad.cpp.o
[ 11%] Building CXX object server/CMakeFiles/freeoriond.dir/ServerApp.cpp.o
/home/dan/Documents/freeorion/FreeOrion/server/ServerApp.cpp: In function ‘void<unnamed>::CreateCombatSitReps(const std::map<int, CombatInfo>&)’:
/home/dan/Documents/freeorion/FreeOrion/server/ServerApp.cpp:1206:25: warning: unused variable ‘destroyed_object_id’
/home/dan/Documents/freeorion/FreeOrion/server/ServerApp.cpp: In function ‘void<unnamed>::HandleInvasion(ObjectMap&, EmpireManager&)’:
/home/dan/Documents/freeorion/FreeOrion/server/ServerApp.cpp:1553:25: warning: unused variable ‘original_owner_id’
[ 11%] Building CXX object server/CMakeFiles/freeoriond.dir/ServerFSM.cpp.o
[ 12%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Universe.cpp.o
[ 12%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/AppInterface.cpp.o
[ 12%] Building CXX object server/CMakeFiles/freeoriond.dir/__/util/Version.cpp.o
Linking CXX executable ../freeoriond
CMakeFiles/freeoriond.dir/__/universe/ConditionParser.cpp.o: In function `(anonymous namespace)::Init()':
ConditionParser.cpp:(.text+0xb2): undefined reference to `condition3_p'
ConditionParser.cpp:(.text+0xf9): undefined reference to `condition3_p'
collect2: ld returned 1 exit status
make[2]: *** [freeoriond] Error 1
make[1]: *** [server/CMakeFiles/freeoriond.dir/all] Error 2
make: *** [all] Error 2

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

Re: Linux compile error

#2 Post by Geoff the Medio » Sat Aug 27, 2011 4:18 pm

Looks like I added ConditionParser3.cpp in the wrong CMakeLists.txt. Try adding it after ConditionParser1.cpp and ConditionParser2.cpp in the CMakeLists.txt files in client/human/ , client/AI/ , and server/

User avatar
TheGrackle
Space Krill
Posts: 8
Joined: Fri Jul 15, 2011 4:52 pm
Location: Minnesota, USA

Re: Linux compile error

#3 Post by TheGrackle » Sat Aug 27, 2011 6:47 pm

That got it to work. Thanks!

Post Reply