Building for Gentoo Linux [64-bit]

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Building for Gentoo Linux [64-bit]

#1 Post by AndrewW »

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: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Building for Gentoo Linux

#2 Post by Geoff the Medio »

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

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

Re: Building for Gentoo Linux

#3 Post by AndrewW »

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 »

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
Programmer
Posts: 2004
Joined: Sat Dec 10, 2011 5:46 am

Re: Building for Gentoo Linux

#5 Post by o01eg »

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-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

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

Re: Building for Gentoo Linux

#6 Post by Dilvish »

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
Programmer
Posts: 2004
Joined: Sat Dec 10, 2011 5:46 am

Re: Building for Gentoo Linux

#7 Post by o01eg »

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-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

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

Re: Building for Gentoo Linux

#8 Post by Dilvish »

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
Programmer
Posts: 2004
Joined: Sat Dec 10, 2011 5:46 am

Re: Building for Gentoo Linux

#9 Post by o01eg »

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-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-03-15.b3de094.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm

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

Re: Building for Gentoo Linux

#10 Post by pheldens »

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: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Building for Gentoo Linux

#11 Post by AndrewW »

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: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Building for Gentoo Linux

#12 Post by Geoff the Medio »

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: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Building for Gentoo Linux

#13 Post by AndrewW »

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: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Building for Gentoo Linux

#14 Post by Geoff the Medio »

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: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Building for Gentoo Linux

#15 Post by AndrewW »

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