Arch AUR unable to compile

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
Gazedo
Space Krill
Posts: 3
Joined: Mon Nov 10, 2014 7:54 am

Arch AUR unable to compile

#1 Post by Gazedo »

Hi all,
I just discovered freeorion and I really wanted to try it out, however I'm unable to install on my Arch system with the freeorion on the AUR using yaourt.

At first I tried with a fully updated system which failed to compile, then I went searching. I then tried downgrading my boost-libs and boost to version 1.55.0-6. I then get what seems to be a gcc error:

Code: Select all

[100%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/UI/TechTreeWnd.cpp.o
Linking CXX executable ../../freeorion
/usr/bin/ld: warning: libicuuc.so.53, needed by /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicui18n.so.53, needed by /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libicudata.so.53, needed by /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_thread.so.1.57.0, needed by /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libOgreMain.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_system.so.1.57.0, needed by /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libOgreMain.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `u_charType_53'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `u_tolower_53'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `u_isblank_53'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `icu_53::Collator::createInstance(icu_53::Locale const&, UErrorCode&)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `u_charFromName_53'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `icu_53::Locale::Locale()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `icu_53::Locale::~Locale()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `u_isspace_53'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `u_digit_53'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../lib/libboost_regex.so: undefined reference to `icu_53::Locale::Locale(icu_53::Locale const&)'
collect2: error: ld returned 1 exit status
client/human/CMakeFiles/freeorion.dir/build.make:1383: recipe for target 'freeorion' failed
make[2]: *** [freeorion] Error 1
CMakeFiles/Makefile2:540: recipe for target 'client/human/CMakeFiles/freeorion.dir/all' failed
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build freeorion.


In summary I'm unable to get freeorion to compile with versions 1.55.0-2, 1.55.0-6, 1.56.0-3, 1.57.0-1, or the latest 1.57.0-2. The posted was with version 1.55.0-6.

Any tips on how to get this to compile correctly?

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

Re: Arch AUR unable to compile

#2 Post by Dilvish »

Gazedo wrote:Hi all, I just discovered freeorion and I really wanted to try it out, however I'm unable to install on my Arch system with the freeorion on the AUR using yaourt.
It's not one of the regular devs here who maintains that, I don't recall any of us having particular familiarity with the Arch system, though I do work with Linux (Ubuntu). I do vaguely recall someone posting about setting up that repository, hopefully they'll notice this post and chime in. In the meantime, I do have a couple suggestions.
At first I tried with a fully updated system which failed to compile, then I went searching. I then tried downgrading my boost-libs and boost to version 1.55.0-6. I then get what seems to be a gcc error:
The gcc linker is reporting the errors, but more particularly, they appear to be library mismatch errors. It looks like your Boost downgrade was incomplete or otherwise just didn't work out quite right-- boost-1.55 is missing some icu library (or at least missing the version it needs), and your current Ogre is looking for boost 1.57 not 1.55.

Since Ogre is still looking for 1.57 one possibility would be to just to start over with a clean/current system and tell us the errors you get, but I have a little uncertainty about Boost 1.57-- Boost 1.56 had a couple bugs with missing includes that were known and slated to get fixed but I don't know if that happened in time for 1.57. We did have a workaround for those missing includes, you could probably find it by searching our forums for "1.56" but I don't recall just what thread it was in. So if you'd prefer to carry on from here I can at least tell you some possibilities to try. Still it might be helpful to explain what you can recall about the initial errors you got.

I gather that you downgraded boost by asking your system to install a prepackaged older version of boost (1.55 instead of 1.57), but it appears the 1.55 version had been built referencing some other libraries that have now also been upgraded and boost 1.55 is unfortunately tripping over that. It's looking to me like the next step to try would be to compile the boost 1.55 source yourself, so it can use the right versions of the icu library, etc., on your system. Then you'd also need either to downgrade Ogre to one that's looking for boost 1.55 or to build Ogre yourself so that it will know to expect boost 1.55. Based on what you've shown so far it looks like that might do that job...



Any tips on how to get this to compile correctly?[/quote]
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Arch AUR unable to compile

#3 Post by Vezzra »

Someone pls correct me if I'm wrong, but AFAIK trunk does not compile with boost 1.55 - for that to work you might need to downgrade to at least 1.53 or even 1.51. The upgrade to the more recent boost versions has been done on the SDK/SDL branch, which hasn't been merged to trunk yet (and is not playable anyway, because the new spirit/phoenix libs broke the parsers - Geoff is still working on that).

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

Re: Arch AUR unable to compile

#4 Post by Dilvish »

Vezzra wrote:Someone pls correct me if I'm wrong, but AFAIK trunk does not compile with boost 1.55 - for that to work you might need to downgrade to at least 1.53 or even 1.51.
Ah, my recollection had been that the problem was with 1.56, but I may be wrong and should have indicated that uncertainty. I'm compiled with boost 1.53, so no need to go all the way back to 1.51, at least. Also, I thought that the workaround that had been put into the SDL branch had been fairly minor, basically just adding a few missing includes to my recollection, so it seemed it should be readily usable by anyone needing it even if not using the SDL branch.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Gazedo
Space Krill
Posts: 3
Joined: Mon Nov 10, 2014 7:54 am

Re: Arch AUR unable to compile

#5 Post by Gazedo »

Rather than rebuilding several packages on my system which has the possibility of breaking other stuff, would it be possible to modify the freeorion files to include the missing includes? I've seen mentions of some patch on the forums but I don't really understand what would be involved. I haven't had much experience with troubleshooting compiling.

And yes all I did was download previous versions of boost-lib and boost. Unfortunately I can't try anything before 2013 when boost 1.54 was released without compiling.

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

Re: Arch AUR unable to compile

#6 Post by Dilvish »

Gazedo wrote:Rather than rebuilding several packages on my system which has the possibility of breaking other stuff
You should be able to do it without risking that, by simply doing some local builds and not installing into the main system folders, and then telling cmake to look for these libraries at this personal location. Boost and Ogre should be the only packages you need to do that for. To tell cmake to use those versions I would use a cmake graphical front end like ccmake from package cmake-curses-gui (in which case you'll need to go into its advanced mode via hitting 't' in order to specify the boost and ogre locations), or you could figure out the right directives to pass to cmake on the command line. You might possibly also need to run ccmake separately for the GG subdirectory.
would it be possible to modify the freeorion files to include the missing includes?
that was my understanding of the workaround for boost 1.56, but on looking into it more it's seeming that the missing includes were just to remedy the boost bug, and that other changes to FO were also necessary to be compatible with the later versions of boost-- here's a link to a post about using boost 1.54, but it doesn't look to me like a patch has been posted for the necessary FO changes. Sorry about the mixup.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Arch AUR unable to compile

#7 Post by Dilvish »

to clarify a little-- you would need to build boost first, and then make sure that your Ogre build process was pointed to that freshly built version of boost, and then have your FO build process use both of those newly built libraries.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Gazedo
Space Krill
Posts: 3
Joined: Mon Nov 10, 2014 7:54 am

Re: Arch AUR unable to compile

#8 Post by Gazedo »

Ok i'll try that this weekend, I've got exams in a couple days that I should study for. Thanks for the help, I'll let you guys know how it goes.

If it works, would it be possible to modify the AUR package to do a similar process? It would make it take much longer but it would work at least until FO is done being updated to work with the new boost. I'll use the command line to do everything and keep track of steps.

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

Re: Arch AUR unable to compile

#9 Post by Chriss »

Boost 1.55 worked fine with trunc. Arch has fixed the include bugs in 1.56, and I suppose in 1.57 they should be fixed upstream, though I did not test (haven't had the time / motivation to dig deeper). But, as you mentioned, that include bug is not the problem, the real issues with boost 1.56 (and further I guess) is with spirit and the parsers - the stuff that Geoff is apparently working on in the sdl branch, among other things.

Yes, I did make the Aur Packages for svn and the last stable, but then came along boost 1.56 and all was for nought ;)

But yes, If a working solution can be found, the Aur Packages can be changed. I simply don't see myself investing much time into this until January at least... I'm kinda still hoping for Geoff and others to finish the SDL branch and everyone lives happily ever after ;)
Attached patches are released under GPL 2.0 or later.

Post Reply