Building for Gentoo Linux [64-bit]

Questions, problems and discussion about compiling FreeOrion.
Message
Author
AndrewW
Juggernaut
Posts: 767
Joined: Mon Feb 04, 2013 10:15 pm

Building for Gentoo Linux [64-bit]

#1 Post by AndrewW » Fri Feb 08, 2013 9:45 pm

The Wiki entry is a bit out of date, so thought I would provide what worked for me with Gentoo.

You will need the following packages:

ogre
boost (needs the python use flag)
bullet
openal
freealut
libogg
libvorbis
zlib
libpng
ois
subversion

Some of these may already be installed and you may not need to emerge all of these.

Code: Select all

emerge ogre boost bullet openal freealut libogg libvorbis zlib libpng ois subversion -a
To set Python to a 2.x version use:

Code: Select all

eselect python list
eselect python set x (replace with the number from the above list)
Get the current build:

Code: Select all

svn co http://svn.code.sf.net/p/freeorion/code/trunk/FreeOrion/ freeorion
Switch to the freeorion directory:

Code: Select all

cd freeorion
Compile:

Code: Select all

cmake .
make
To run:

Code: Select all

./freeorion
Enjoy.

No guarantees, but it worked for me anyways thought it might help someone else out.
Last edited by AndrewW on Tue May 27, 2014 2:39 pm, edited 6 times in total.

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

Re: Building for Gentoo Linux

#2 Post by Geoff the Medio » Fri Feb 08, 2013 10:06 pm

I made you a wiki account, AndrewW, with your forum email address. Feel free to edit the wiki with this info.

AndrewW
Juggernaut
Posts: 767
Joined: Mon Feb 04, 2013 10:15 pm

Re: Building for Gentoo Linux

#3 Post by AndrewW » Fri Feb 08, 2013 10:15 pm

Geoff the Medio wrote:I made you a wiki account, AndrewW, with your forum email address. Feel free to edit the wiki with this info.
I was guessing that when I got the Wike account email confirmation.

Probably a seperate page I would think, to keep the old information around as well.

Toksyuryel
Space Krill
Posts: 7
Joined: Wed Feb 13, 2013 8:14 pm

Re: Building for Gentoo Linux

#4 Post by Toksyuryel » Thu Feb 14, 2013 4:12 pm

Just to add on to this, lndir is a fantastic utility to use if you want to compile without polluting the source directory. On gentoo you can acquire it with just `emerge lndir`. On Debian/Ubuntu I am told it can be found in the xutils-dev package.

o01eg
Space Kraken
Posts: 140
Joined: Sat Dec 10, 2011 5:46 am

Re: Building for Gentoo Linux

#5 Post by o01eg » Thu Mar 21, 2013 3:11 pm

How do you compile OIS from freeorion?

I get bug with keyboard freezing so I cann't enter anything some minutes after launching the game.
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-08-13.770ca38 0.4.8 pre-RC3
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

User avatar
Dilvish
AI Lead, Programmer
Posts: 4685
Joined: Sat Sep 22, 2012 6:25 pm

Re: Building for Gentoo Linux

#6 Post by Dilvish » Thu Mar 21, 2013 3:35 pm

o01eg wrote:How do you compile OIS from freeorion?I get bug with keyboard freezing so I cann't enter anything some minutes after launching the game.
compiling OIS gets handled automatically when running 'make' in AndrewW's instructions. there is an OIS config file "OISInput.cfg" in the top level FreeOrion directory, I'd recommend you first look at adjusting it before recompiling.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

o01eg
Space Kraken
Posts: 140
Joined: Sat Dec 10, 2011 5:46 am

Re: Building for Gentoo Linux

#7 Post by o01eg » Thu Mar 21, 2013 3:49 pm

Dilvish wrote:compiling OIS gets handled automatically when running 'make' in AndrewW's instructions. there is an OIS config file "OISInput.cfg" in the top level FreeOrion directory, I'd recommend you first look at adjusting it before recompiling.
I don't see anything about compiling OIS in CMakeLists.txt.
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-08-13.770ca38 0.4.8 pre-RC3
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

User avatar
Dilvish
AI Lead, Programmer
Posts: 4685
Joined: Sat Sep 22, 2012 6:25 pm

Re: Building for Gentoo Linux

#8 Post by Dilvish » Thu Mar 21, 2013 4:15 pm

ah sorry, I hadn't looked quite closely enough at his instructions, I see now he's using a standard version of GG, rather than the FO one. So perhaps that might cause trouble for you or other people. OIS gets compiled as part of the FO GG compile process. The FO version can be compiled by going into the GG directory and running "cmake ." and "make" -- if you've already installed the standard GG into the regular library locations, you might want to search here on the forums a little, I think someone recently posted a patch to the CMake files so that for FO it could look for a local FO version of GG rather than the standard library location.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

o01eg
Space Kraken
Posts: 140
Joined: Sat Dec 10, 2011 5:46 am

Re: Building for Gentoo Linux

#9 Post by o01eg » Thu Mar 21, 2013 4:28 pm

Dilvish wrote:ah sorry, I hadn't looked quite closely enough at his instructions, I see now he's using a standard version of GG, rather than the FO one. So perhaps that might cause trouble for you or other people. OIS gets compiled as part of the FO GG compile process. The FO version can be compiled by going into the GG directory and running "cmake ." and "make" -- if you've already installed the standard GG into the regular library locations, you might want to search here on the forums a little, I think someone recently posted a patch to the CMake files so that for FO it could look for a local FO version of GG rather than the standard library location.
I wrote ebuild for gigi from FO that download it from https://freeorion.svn.sourceforge.net/s ... eeOrion/GG and install into system. Also I've built it successfully today without any error about missed OIS.
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 2018-08-13.770ca38 0.4.8 pre-RC3
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

pheldens
Pupating Mass
Posts: 96
Joined: Fri Mar 15, 2013 12:54 pm

Re: Building for Gentoo Linux

#10 Post by pheldens » Thu Mar 21, 2013 4:37 pm

AndrewW wrote: gigi - (includes ogre when emerging, so ogre doesn't need to be specified)
You must use the forked gigi lib with the same file naming from the FO repository (./GG/)

AndrewW
Juggernaut
Posts: 767
Joined: Mon Feb 04, 2013 10:15 pm

Re: Building for Gentoo Linux

#11 Post by AndrewW » Thu Mar 21, 2013 4:59 pm

pheldens wrote:
AndrewW wrote: gigi - (includes ogre when emerging, so ogre doesn't need to be specified)
You must use the forked gigi lib with the same file naming from the FO repository (./GG/)
Didn't need to in my case...

Could add alternate instructions though if others are having trouble with it.

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

Re: Building for Gentoo Linux

#12 Post by Geoff the Medio » Thu Mar 21, 2013 6:19 pm

AndrewW wrote:
You must use the forked gigi lib with the same file naming from the FO repository (./GG/)
Didn't need to in my case...
Then something strange is going on, because the GG in the FO repository has header changes and makes use of new added functions. And even if it somehow compiles and doesn't crash, the are functional changes that are needed for FO to work properly and fully.

AndrewW
Juggernaut
Posts: 767
Joined: Mon Feb 04, 2013 10:15 pm

Re: Building for Gentoo Linux

#13 Post by AndrewW » Thu Mar 21, 2013 7:07 pm

Geoff the Medio wrote:
AndrewW wrote:
You must use the forked gigi lib with the same file naming from the FO repository (./GG/)
Didn't need to in my case...
Then something strange is going on, because the GG in the FO repository has header changes and makes use of new added functions. And even if it somehow compiles and doesn't crash, the are functional changes that are needed for FO to work properly and fully.
Hmmm, did that change at one point? Did compile the one that it comes with at one point with that other compile problem, but was working fine before then.

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

Re: Building for Gentoo Linux

#14 Post by Geoff the Medio » Thu Mar 21, 2013 7:17 pm

AndrewW wrote:
Geoff the Medio wrote:...the GG in the FO repository has header changes and makes use of new added functions. And even if it somehow compiles and doesn't crash, the are functional changes that are needed for FO to work properly and fully.
Hmmm, did that change at one point?
Not sure what you mean by that... Did the changes happen at some point in time? Yes. Are those changes needed now? Yes.

AndrewW
Juggernaut
Posts: 767
Joined: Mon Feb 04, 2013 10:15 pm

Re: Building for Gentoo Linux

#15 Post by AndrewW » Thu Mar 21, 2013 8:19 pm

Geoff the Medio wrote:
AndrewW wrote:
Geoff the Medio wrote:...the GG in the FO repository has header changes and makes use of new added functions. And even if it somehow compiles and doesn't crash, the are functional changes that are needed for FO to work properly and fully.
Hmmm, did that change at one point?
Not sure what you mean by that... Did the changes happen at some point in time? Yes. Are those changes needed now? Yes.
Just wondering what build they changed at.

Post Reply