FreeOrion

Forums for the FreeOrion project
It is currently Wed Dec 13, 2017 3:09 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Oct 06, 2017 10:59 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
For testing various versions, I use the following procedure
Building Boost - (example is for Boost version 1.63.0, with a root directory of /opt/projects/boost)
  • Download and extract to /opt/projects/boost/src. /opt/projects/boost/src/boost_1_63_0/bootstrap.sh should now exist
  • From /opt/projects/boost/src:
    • ./bootstrap.sh --prefix=/opt/projects/boost/1_63_0
    • mkdir build_1_63_0 && mkdir stage_1_63_0
    • ./b2 --build-dir=build_1_63_0 stage --stage-dir=stage_1_63_0
    • ./bjam install
For a first attempt, I recommend doing the above manually on the first run. Typically I use a custom build script for consistency (YMMV).
There should now exist /opt/projects/boost/1_63_0 with sub-directories for include and lib.

Building FreeOrion - From freeorion source dir:
  • mkdir build-x && cd build-x
  • cmake -DBOOST_ROOT=/opt/projects/boost/1_63_0 ..
  • make
If your systems FindBoost.cmake is outdated for the desired version, take note of the upstream version of this module.

I build from within KDevelop half the time: Project->Open Configuration->Configure build directory(+ sign)->
Alter build directory to something unique to version
Add Custom Argument: -DBOOST_ROOT=/opt/projects/boost/1_63_0
(remember to right click the new directory and "Exclude from project", else parser may choke during build)
For those on other IDEs, it may be useful to post how to adjust cmake flags.

Alternatively to downloading Boost, one could clone the super-project and checkout the desired version tag.
Can be useful to test fixes in some Boost pre-release, to see if a previous issue is addressed.
I've only done this with the posted script, creating a symlink for /opt/projects/boost/src/boost_$VERSION and passing $VERSION as the script arg

Do not recall if I successfully built FreeOrion with clang, I've at least built Boost by altering the boost build steps to:
  • ./bootstrap.sh --with-toolset=clang
  • mkdir build_1_63_0 && mkdir stage_1_63_0
  • ./b2 toolset=clang cxxflags="=std=c++11 -stdlib=libc++" linkflags="-lc++abi -stdlib=libc++" --build-dir=build_1_63_0 stage --stage-dir=stage_1_63_0
  • ./bjam install

_________________
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.


Top
 Profile  
 
PostPosted: Thu Nov 09, 2017 9:21 pm 
Offline
Space Squid

Joined: Mon Aug 27, 2012 7:24 pm
Posts: 57
Freeorion built fine with clang 3.9 before pull #1838 fix_parser_memory_leaks. I can't get it to compile at all with that commit.

_________________
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.


Top
 Profile  
 
PostPosted: Sat Nov 11, 2017 8:38 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 204
spikethehobbit, I almost missed this posted under the title compiling with different versions of Boost.

Could you open an issue and post the compiler logs?


Top
 Profile  
 
PostPosted: Thu Nov 30, 2017 5:16 am 
Offline
Space Squid

Joined: Mon Aug 27, 2012 7:24 pm
Posts: 57
Sorry for being (very!) slow responding. I've posted two new issues, one for gcc and one for clang.
gcc has a trivial workaround. I missed the real error before, and was trying to debug a bogus one that came later in the logs. Oops.
clang is proving more troublesome.

_________________
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group