working revision for (l)ubuntu 15.04?

Questions, problems and discussion about compiling FreeOrion.
Post Reply
Message
Author
bigeagle
Krill Swarm
Posts: 10
Joined: Mon May 11, 2015 12:10 pm

working revision for (l)ubuntu 15.04?

#1 Post by bigeagle » Wed May 13, 2015 4:00 pm

I spend some hours trying to build freeorion but it's more like rolling stones up a hill in hades :/
At least the prerequisites from the ubuntu 15.04 repository seem to work, but there are still errors in the code and/or the generated makefile.
(set up a lubuntu 15.04 64bit VM for that, hoping that the packages are sufficient up-to-date)

I'm trying to build 0.4.4 to continue my game (slowdown because of recalculation of the production points) for which i want to edit the code.

Is there a compatible revision that builds without errors?

for the 0.4.4 release (loaded here: https://github.com/freeorion/freeorion/ ... -0.4.4.zip ) i get
several ambiguous overload in /GG/src/Font.cpp like
/home/test/freeorionsrc/freeorion-0.4.4/GG/src/Font.cpp:1289:41: error: ambiguous overload for ‘operator>’ (operand types are ‘const unsigned int’ and ‘const GG::X’)
and "make[2]: *** No rule to make target 'libGiGi.so', needed by 'freeorion'. Schluss." (Schluss (german) = end)

as far as i understand make the two are independent, please correct me if i'm wrong

am i missing something? how did you managed to release 0.4.4 while there are still build errors? or is it just the wrong revision?
i may be able to fix the operator errors by casting this 'GG::X' to unsigned int, but i have no clue how to add a target for libGiGi.so.

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

Re: working revision for (l)ubuntu 15.04?

#2 Post by Dilvish » Wed May 13, 2015 4:42 pm

bigeagle wrote:I'm trying to build 0.4.4 to continue my game (slowdown because of recalculation of the production points)...am i missing something? how did you managed to release 0.4.4 while there are still build errors? or is it just the wrong revision?
Later versions of boost (a library we rely on) have some bugs in them (missing includes) which we are able to deal with in our code by adding in the missing includes in certain places, but 0.4.4 did not have all of those in it, so that is probably part of what you are running into. It also relied on some other libraries which you would probably have a difficult time getting compatible versions of for ubuntu 15.04.

Just use the totally current source from git; I don't think it (at the moment at least) has any bugs that wouldn't also have been in 0.4.4.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

wheals
Space Squid
Posts: 88
Joined: Sun Mar 24, 2013 3:56 pm

Re: working revision for (l)ubuntu 15.04?

#3 Post by wheals » Wed May 13, 2015 4:44 pm

Looks like the patch at viewtopic.php?p=73789#p73789 is what you need. Some sort of issue with some versions of FreeType.
All my code and content provided herein or on GitHub is released under the GPL 2.0 and/or CC-BY-SA 3.0, as appropriate.

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

Re: working revision for (l)ubuntu 15.04?

#4 Post by Dilvish » Wed May 13, 2015 5:44 pm

wheals wrote:Looks like the patch at viewtopic.php?p=73789#p73789 is what you need. Some sort of issue with some versions of FreeType.
That patch is already in the current code, so if he just switches from the 0.4.4 code to the current, which I think he'll need to for the boost related reasons anyways (and which might not show up until link time, is why he hasn't seen them yet), then he'll also be ok on the fonts.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

bigeagle
Krill Swarm
Posts: 10
Joined: Mon May 11, 2015 12:10 pm

Re: working revision for (l)ubuntu 15.04?

#5 Post by bigeagle » Thu May 14, 2015 3:23 pm

there seems to be just one strange error using the current git master
some undefined references to FreeOrionVersionString()
but as far as i can see all files using this include the version.h which defines the function.
here is the log

Chriss
Dyson Forest
Posts: 231
Joined: Sun May 11, 2008 10:50 am

Re: working revision for (l)ubuntu 15.04?

#6 Post by Chriss » Thu May 14, 2015 3:34 pm

Try to move the build directory away from the source. As in: change to the git source directory
cd git-srcdir
mkdir build
cd build
cmake ..
make (-j4 or whatever)
Attached patches are released under GPL 2.0 or later.

bigeagle
Krill Swarm
Posts: 10
Joined: Mon May 11, 2015 12:10 pm

Re: working revision for (l)ubuntu 15.04?

#7 Post by bigeagle » Thu May 14, 2015 3:49 pm

i did that already
i assume that the build directory may be in the same dir as the CMakeLists.txt

it looks like there is a problem adding FreeOrionVersionString() to the std namespace
i changed the call to std::FreeOrionVersionString(), but it is still unknown (i didn't see any 'using namespace std;') but it is just unknown
/home/eagle/freeorion/gitv/freeorion/util/Logger.cpp:67:22: error: ‘FreeOrionVersionString’ is not a member of ‘std’

sadly i have no clue what may be wrong there

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

Re: working revision for (l)ubuntu 15.04?

#8 Post by Dilvish » Thu May 14, 2015 5:00 pm

Some other folks recently had similar trouble with VersionString; please try the small change to CMakeLists.txt as described here, and let us know if that solves the problem for you. There are some other potential solutions in that thread, but the post I link to has the simplest.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

bigeagle
Krill Swarm
Posts: 10
Joined: Mon May 11, 2015 12:10 pm

Re: working revision for (l)ubuntu 15.04?

#9 Post by bigeagle » Thu May 14, 2015 5:53 pm

Thanks, that solved the problem, but after it built i still can't run freeorion :/

[2015-05-14 19:44:21.086143] [0x000007f28c088c7c] [debug] Resources directory from config.xml missing or does not contain expected files. Resetting to default.
[2015-05-14 19:44:21.086287] [0x000007f28c088c7c] [debug] Default Resources directory missing or does not contain expected files. Cannot start game.
main() caught exception(std::runtime_error): Unable to load game resources at default location: /home/eagle/freeorion/gitv/freeorion/build/default : Install may be broken.
main() failed config.

According to this wiki page it should be generated if not existant. The directory .freeorion in the home was created. I will try to feed the files from the windows version ...

edit: does not work, obviously all those paths are invalid. the error message is the same, so without a working config one cannot create a config at the moment?

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

Re: working revision for (l)ubuntu 15.04?

#10 Post by Dilvish » Thu May 14, 2015 6:34 pm

the program is looking for the default content directory to be located relative to it. So for the build directory that you set up I think the following should work: go to your build directory and then

Code: Select all

ln -s ../default
and then try running freeorion again
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

bigeagle
Krill Swarm
Posts: 10
Joined: Mon May 11, 2015 12:10 pm

Re: working revision for (l)ubuntu 15.04?

#11 Post by bigeagle » Thu May 14, 2015 6:40 pm

thank you, finally it's running

Apo
Space Squid
Posts: 89
Joined: Fri Apr 19, 2013 4:10 pm

Re: working revision for (l)ubuntu 15.04?

#12 Post by Apo » Sun May 17, 2015 7:43 pm

This issue was filed in Debian's bug tracker two weeks ago.

https://bugs.debian.org/783839

Here is my patch based on the information I had found in this forum.

https://anonscm.debian.org/cgit/pkg-gam ... df3d5e20d9

It should cleanly apply with 0.4.4-2, the Ubuntu version of FreeOrion in 15.04. You can also download the most recent sources from here

https://launchpad.net/ubuntu/+source/fr ... 20150327-2

And try using

Code: Select all

apt-get source freeorion
That will probably save some time.

Post Reply