Page 1 of 1

working revision for (l)ubuntu 15.04?

Posted: Wed May 13, 2015 4:00 pm
by bigeagle
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.

Re: working revision for (l)ubuntu 15.04?

Posted: Wed May 13, 2015 4:42 pm
by Dilvish
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.

Re: working revision for (l)ubuntu 15.04?

Posted: Wed May 13, 2015 4:44 pm
by wheals
Looks like the patch at viewtopic.php?p=73789#p73789 is what you need. Some sort of issue with some versions of FreeType.

Re: working revision for (l)ubuntu 15.04?

Posted: Wed May 13, 2015 5:44 pm
by Dilvish
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.

Re: working revision for (l)ubuntu 15.04?

Posted: Thu May 14, 2015 3:23 pm
by bigeagle
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

Re: working revision for (l)ubuntu 15.04?

Posted: Thu May 14, 2015 3:34 pm
by Chriss
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)

Re: working revision for (l)ubuntu 15.04?

Posted: Thu May 14, 2015 3:49 pm
by bigeagle
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

Re: working revision for (l)ubuntu 15.04?

Posted: Thu May 14, 2015 5:00 pm
by Dilvish
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.

Re: working revision for (l)ubuntu 15.04?

Posted: Thu May 14, 2015 5:53 pm
by bigeagle
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?

Re: working revision for (l)ubuntu 15.04?

Posted: Thu May 14, 2015 6:34 pm
by Dilvish
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

Re: working revision for (l)ubuntu 15.04?

Posted: Thu May 14, 2015 6:40 pm
by bigeagle
thank you, finally it's running

Re: working revision for (l)ubuntu 15.04?

Posted: Sun May 17, 2015 7:43 pm
by Apo
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.