Update Linux Compile instructions

Questions, problems and discussion about compiling FreeOrion.

Moderators: Oberlus, Oberlus

Post Reply
Message
Author
ShneekeyTheLost
Space Floater
Posts: 15
Joined: Thu Sep 08, 2011 1:32 am

Update Linux Compile instructions

#1 Post by ShneekeyTheLost » Mon Sep 12, 2011 11:38 pm

A couple of things you may wish to change on your Compile in Linux page:

* Note that using an earlier rev of GiGi no longer works, and they will need to obtain Boost 1.44.0 or later from their website

* Note that you can obtain Bullet 2.77 here, since the link provided on that page apparently no longer works

Working on the compile now. If it works, I'll be posting it, otherwise I'll be posting the error logs.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Update Linux Compile instructions

#2 Post by eleazar » Tue Sep 13, 2011 1:36 pm

It's a wiki. feel free to get an account and edit.

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

Re: Update Linux Compile instructions

#3 Post by Geoff the Medio » Tue Sep 13, 2011 3:22 pm

Actually, wiki account registration has been disabled due to excessive spam account registrations. I can make an account for someone on request, though.

ShneekeyTheLost
Space Floater
Posts: 15
Joined: Thu Sep 08, 2011 1:32 am

Re: Update Linux Compile instructions

#4 Post by ShneekeyTheLost » Sat Oct 15, 2011 2:51 pm

Well, I have the inevitable good news/bad news.

Good news: Boost 1.46.1.1 now ships with Ubuntu 11.10. So I thought I'd try my hand at compiling again. I got GiGi to compile and install no problem. CMake went off without a hitch. Then... well... I got this:

Code: Select all

~/freeorion/FreeOrion$ make
[  0%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/CombatOrder.cpp.o
[  0%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/AsteroidBeltObstacle.cpp.o
[  1%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/CombatFighter.cpp.o
[  1%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/CombatObject.cpp.o
[  1%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/CombatShip.cpp.o
[  2%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/Missile.cpp.o
[  2%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/Obstacle.cpp.o
[  2%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/PathingEngine.cpp.o
[  3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/SimpleVehicle.cpp.o
[  3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/Vec3.cpp.o
[  3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/combat/OpenSteer/Vec3Utilities.cpp.o
[  3%] Building CXX object server/CMakeFiles/freeoriond.dir/__/Empire/Empire.cpp.o
~freeorion/FreeOrion/Empire/Empire.cpp: In member function ‘void Empire::UpdateFoodDistribution()’:
~freeorion/FreeOrion/Empire/Empire.cpp:2834:29: warning: unused variable ‘pop_centers’ [-Wunused-variable]
~freeorion/FreeOrion/Empire/Empire.cpp:2835:29: warning: unused variable ‘res_pool_objects’ [-Wunused-variable]
[  4%] Building CXX object server/CMakeFiles/freeoriond.dir/__/Empire/EmpireManager.cpp.o
[  4%] Building CXX object server/CMakeFiles/freeoriond.dir/__/Empire/ResourcePool.cpp.o
[  4%] Building CXX object server/CMakeFiles/freeoriond.dir/__/network/Message.cpp.o
[  5%] Building CXX object server/CMakeFiles/freeoriond.dir/__/network/MessageQueue.cpp.o
[  5%] Building CXX object server/CMakeFiles/freeoriond.dir/__/network/Networking.cpp.o
[  5%] Building CXX object server/CMakeFiles/freeoriond.dir/__/UI/StringTable.cpp.o
[  6%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Building.cpp.o
[  6%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Condition.cpp.o
~freeorion/FreeOrion/universe/Condition.cpp: In function ‘bool {anonymous}::BuildingSimpleMatch(const UniverseObject*, const std::vector<std::basic_string<char> >&)’:
~freeorion/FreeOrion/universe/Condition.cpp:1360:26: warning: unused variable ‘objects’ [-Wunused-variable]
[  6%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ConditionParser1.cpp.o
[  6%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ConditionParser2.cpp.o
[  7%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ConditionParser3.cpp.o
[  7%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ConditionParser.cpp.o
[  7%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Effect.cpp.o
In file included from ~freeorion/FreeOrion/universe/Effect.cpp:7:0:
~freeorion/FreeOrion/universe/ValueRef.h: In member function ‘std::string ValueRef::Variable<T>::Description() const [with T = int, std::string = std::basic_string<char>]’:
~freeorion/FreeOrion/universe/Effect.cpp:2036:1:   instantiated from here
~freeorion/FreeOrion/universe/ValueRef.h:404:5: warning: enumeration value ‘INVALID_REFERENCE_TYPE’ not handled in switch [-Wswitch]
~freeorion/FreeOrion/universe/ValueRef.h:404:5: warning: enumeration value ‘NON_OBJECT_REFERENCE’ not handled in switch [-Wswitch]
~freeorion/FreeOrion/universe/ValueRef.h: In member function ‘std::string ValueRef::Variable<T>::Dump() const [with T = int, std::string = std::basic_string<char>]’:
~freeorion/FreeOrion/universe/Effect.cpp:2036:1:   instantiated from here
~freeorion/FreeOrion/universe/ValueRef.h:421:5: warning: enumeration value ‘INVALID_REFERENCE_TYPE’ not handled in switch [-Wswitch]
~freeorion/FreeOrion/universe/ValueRef.h:421:5: warning: enumeration value ‘NON_OBJECT_REFERENCE’ not handled in switch [-Wswitch]
[  8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/EffectParser.cpp.o
In file included from ~freeorion/FreeOrion/universe/EffectParser.cpp:5:0:
~freeorion/FreeOrion/universe/ValueRef.h: In member function ‘std::string ValueRef::Variable<T>::Description() const [with T = int, std::string = std::basic_string<char>]’:
~freeorion/FreeOrion/universe/EffectParser.cpp:560:1:   instantiated from here
~freeorion/FreeOrion/universe/ValueRef.h:404:5: warning: enumeration value ‘INVALID_REFERENCE_TYPE’ not handled in switch [-Wswitch]
~freeorion/FreeOrion/universe/ValueRef.h:404:5: warning: enumeration value ‘NON_OBJECT_REFERENCE’ not handled in switch [-Wswitch]
~freeorion/FreeOrion/universe/ValueRef.h: In member function ‘std::string ValueRef::Variable<T>::Dump() const [with T = int, std::string = std::basic_string<char>]’:
~freeorion/FreeOrion/universe/EffectParser.cpp:560:1:   instantiated from here
~freeorion/FreeOrion/universe/ValueRef.h:421:5: warning: enumeration value ‘INVALID_REFERENCE_TYPE’ not handled in switch [-Wswitch]
~freeorion/FreeOrion/universe/ValueRef.h:421:5: warning: enumeration value ‘NON_OBJECT_REFERENCE’ not handled in switch [-Wswitch]
[  8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Enums.cpp.o
[  8%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Fleet.cpp.o
[  9%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/Meter.cpp.o
[  9%] Building CXX object server/CMakeFiles/freeoriond.dir/__/universe/ObjectMap.cpp.o
In file included from ~freeorion/FreeOrion/universe/ObjectMap.cpp:1:0:
~freeorion/FreeOrion/universe/ObjectMap.h:95:5: error: ‘string’ in namespace ‘std’ does not name a type
~freeorion/FreeOrion/universe/ObjectMap.cpp:242:31: error: no ‘std::string ObjectMap::Dump() const’ member function declared in class ‘ObjectMap’
make[2]: *** [server/CMakeFiles/freeoriond.dir/__/universe/ObjectMap.cpp.o] Error 1
make[1]: *** [server/CMakeFiles/freeoriond.dir/all] Error 2
make: *** [all] Error 2
So, what did I do wrong this time?

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

Re: Update Linux Compile instructions

#5 Post by Geoff the Medio » Sat Oct 15, 2011 4:26 pm

You used a version after I made a change that breaks the GCC compile but not the MSVC compile. Try one revision less, or wait a bit for me to try to fix it, or add "#include <string>" after the include <vector> line at the top of ObjectMap.h.

ShneekeyTheLost
Space Floater
Posts: 15
Joined: Thu Sep 08, 2011 1:32 am

Re: Update Linux Compile instructions

#6 Post by ShneekeyTheLost » Sat Oct 15, 2011 7:09 pm

Geoff the Medio wrote:You used a version after I made a change that breaks the GCC compile but not the MSVC compile. Try one revision less, or wait a bit for me to try to fix it, or add "#include <string>" after the include <vector> line at the top of ObjectMap.h.
Dropped back to rev 4279 as the latest stable windows release listed. Got further this time, but ended up with this:

Code: Select all

[ 57%] Building CXX object client/human/CMakeFiles/freeorion.dir/HumanClientFSM.cpp.o
In file included from ~freeorion/FreeOrion/client/human/../../UI/ChatWnd.h:6:0,
                 from ~freeorion/FreeOrion/client/human/HumanClientFSM.cpp:9:
~freeorion/FreeOrion/client/human/../../UI/CUIControls.h:355:1: error: expected class-name before ‘{’ token
In file included from ~freeorion/FreeOrion/client/human/HumanClientFSM.cpp:14:0:
~freeorion/FreeOrion/client/human/../../UI/MapWnd.h:39:11: error: template argument required for ‘class Slider’
In file included from ~freeorion/FreeOrion/client/human/HumanClientFSM.cpp:14:0:
~freeorion/FreeOrion/client/human/../../UI/MapWnd.h:402:5: error: invalid use of template-name ‘GG::Slider’ without an argument list
~freeorion/FreeOrion/client/human/../../UI/MapWnd.h:404:5: error: invalid use of template-name ‘GG::Slider’ without an argument list
~freeorion/FreeOrion/client/human/HumanClientFSM.cpp: In member function ‘boost::statechart::result MPLobby::react(const HostID&)’:
~freeorion/FreeOrion/client/human/HumanClientFSM.cpp:255:15: warning: unused variable ‘initial_host_id’ [-Wunused-variable]
make[2]: *** [client/human/CMakeFiles/freeorion.dir/HumanClientFSM.cpp.o] Error 1
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Error 2
make: *** [all] Error 2

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

Re: Update Linux Compile instructions

#7 Post by Geoff the Medio » Sat Oct 15, 2011 7:21 pm

Now you're mixing incompatible versions of GG and FreeOrion. You can't do that. Use the latest SVN of both. The missing include has been added.

cazfi
Space Floater
Posts: 42
Joined: Thu May 28, 2009 10:08 pm

Re: Update Linux Compile instructions

#8 Post by cazfi » Sun Oct 16, 2011 8:20 pm

Just for the record: I just successfully compiled latest GiGi (r1061) & FreeOrion (r4400) on Debian Wheezy (= "Testing" = development version of next Debian release) using Fullmoon ( http://www.cazfi.net/fullmoon/ ) development version. There's number of "unused but set variable" -warnings (these warnings are new in gcc 4.6) but there's no errors. I use my own debian packet of Bullet and all other dependencies are official Debian packets. Once I have time to update my Ubuntu system I'll see if everything works as smoothly there (as Ubuntu is derivative of Debian, Ubuntu 11.10 should be quite similar to current Debian Testing)

Post Reply