Boost 1.56 Compile Issues

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
User avatar
asm64
Space Floater
Posts: 27
Joined: Fri Jan 31, 2014 6:57 am

Boost 1.56 Compile Issues

#1 Post by asm64 »

Geoff the Medio wrote:
Mitten.O wrote:...I decided to try boost 1.56 instead.

The stable 1.56 serialization has a bug, which apparently is fixed in development. I fixed it manually as described here https://chaste.cs.ox.ac.uk/trac/ticket/2585. Then it eventually worked. To use a custom boost you need to set the environment variable BOOST_ROOT when running cmake.
If "stable" boost 1.56 can't compile without building a patched version from source, it can't be the required / expected version for FreeOrion. I think Boost 1.55 has Phoenix 3... and I'm not sure why you'd even need Phoenix 3, as most of the changes required for it were within boost version check preprocessor if clauses... So what were the problems with Boost 1.54?
Good day. I have problem with building git version together with boost-1.56. Last now in the portage tree in Gentoo. I don't know create or not a new thread about it with build log and other things. Anyway I ready for edit and testing sources together with boost-1.56. Last time we solved with freetype-2.5.4 so fast ) may be now repeat with boost? How can I help now?
Attachments
freeorion-boost-1.56-build.log
build log file
(333.02 KiB) Downloaded 166 times

Mitten.O
Programmer
Posts: 255
Joined: Sun Apr 06, 2014 4:15 pm

Re: Boost 1.56 Compile Issues

#2 Post by Mitten.O »

Using boost 1.56 requires some adjustments in FreeOrion. The adjustments are present in the sdl branch. There are related patches in this thread: viewtopic.php?f=9&t=9130&p=72977&hilit=boost#p72977. They may or may not work to make also trunk tolerate boost 1.56.
Any code by me in this post is released under GPL 2.0 or later.

User avatar
asm64
Space Floater
Posts: 27
Joined: Fri Jan 31, 2014 6:57 am

Re: Boost 1.56 Compile Issues

#3 Post by asm64 »

Mitten.O wrote:Using boost 1.56 requires some adjustments in FreeOrion. The adjustments are present in the sdl branch. There are related patches in this thread: viewtopic.php?f=9&t=9130&p=72977&hilit=boost#p72977. They may or may not work to make also trunk tolerate boost 1.56.
Why it is not in the main tree? And what we need to do for that?

Mitten.O
Programmer
Posts: 255
Joined: Sun Apr 06, 2014 4:15 pm

Re: Boost 1.56 Compile Issues

#4 Post by Mitten.O »

The main tree is meant to be compatible with the pre-packaged SDK for windows, which has older versions of various libraries, boost among them. Actually, the version of the 1.56 fixes in that patch should be compatible with the older boost, but since the sdl branch is the future, nobody has bothered to port it there. There is always a risk of complications, since especially the parser library is quite fiddly.
Any code by me in this post is released under GPL 2.0 or later.

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

Re: Boost 1.56 Compile Issues

#5 Post by Chriss »

More Info should be here:
viewtopic.php?f=24&t=9094

and here:
viewtopic.php?f=24&t=9111

The latter also has some Infos on how to compile the SDL branch, which should work for you. You should be able to change your ebuild to get the source from the sdl branch quite easily.
Attached patches are released under GPL 2.0 or later.

User avatar
asm64
Space Floater
Posts: 27
Joined: Fri Jan 31, 2014 6:57 am

Re: Boost 1.56 Compile Issues

#6 Post by asm64 »

Thanks, guys.
Make boosts happy. There is I saw that Committed the 1.56 workaround, but I understand nothing. I can't compile GIT version. Is this patch for stable version? I simple use shell script for updates and testing:

Code: Select all

#!/bin/sh
#git clone https://github.com/freeorion/freeorion.git
cd ./freeorion
git pull
cd ./FreeOrion
make clean
cmake .
make -j7 CFLAGS="-march=amdfam10 -O2 -msse -msse4a -mfpmath=sse -ftree-loop-if-convert -fsched-pressure -pipe"
What I must to do for apply patches and compile GIT with boost 1.56? Copy patches after `git pull` into the folder and apply it? How to apply patches correctly?

Thanks for help.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Boost 1.56 Compile Issues

#7 Post by Geoff the Medio »

asm64 wrote:Is this patch for stable version? [...] How to apply patches correctly?
I'm not sure what you mean by "stable version", but the linked-to boost 1.56 workaround patch is simple enough that it should work the same on the trunk version as it did for the SDL branch, and it's small enough that you can manually add the same lines to the modified files by copy and pasting them, and removing the extra + from the start of the lines in the patch file.

Please test and report if doing so resolves the boost 1.56 issues in trunk.

User avatar
asm64
Space Floater
Posts: 27
Joined: Fri Jan 31, 2014 6:57 am

Re: Boost 1.56 Compile Issues

#8 Post by asm64 »

Geoff the Medio wrote:I'm not sure what you mean by "stable version", but the linked-to boost 1.56 workaround patch is simple enough that it should work the same on the trunk version as it did for the SDL branch... Please test and report if doing so resolves the boost 1.56 issues in trunk.
Excuse me, I am sorry that I have no clue.. I thought that the release - a stable branch, and GIT - is current develop.
It was a long time ago. I do not remember exactly, but for some instructions from the official website, it seems wiki, I got the following command to download the current version:

Code: Select all

git clone https://github.com/freeorion/freeorion.git
I did it, and then simple did `git pull` for updates.
That's why I do not understand what means `trunk` and `branches`. Today I went to the link, and then clicked the link "Browse code at this revision" and found that in addition to the GIT version has SVN with some branches :shock:. It appeared around two hundred from an experimentor outpost :? . I'll go look about the trunks and branches, and then try to test.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Boost 1.56 Compile Issues

#9 Post by Geoff the Medio »

asm64 wrote:...found that in addition to the GIT version has SVN with some branches :shock:
It does say "freeorion svn mirror"...

And the compile page only refers to SVN...

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Boost 1.56 Compile Issues

#10 Post by MatGB »

Asm, theofficial repository is on SVN, the Git mirror was set up by persons unknown and the team has no control over it. SVN has the most recent stable release (marked as a separate branch), the main trunk Test area plus two additional branches, one that's been in development for awhile in which the core backend is being switched from/to different graphics packages, the other more recent testing a few mechanics that we want to implement but that needed collaboration before it could be put into the main branch.

We don't know what stage the Git mirror gets to nor have any control of it, far better to go direct to SVN.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
asm64
Space Floater
Posts: 27
Joined: Fri Jan 31, 2014 6:57 am

Re: Boost 1.56 Compile Issues

#11 Post by asm64 »

2 Geoff the Medio. Ouch.. It's all the difficulties of translation :oops:

Thanks, today I rewrote my build script:

Code: Select all

#!/bin/sh
if [ ! -d "./freeorion" ] ; then
    mkdir freeorion
    cd ./freeorion
    svn co https://svn.code.sf.net/p/freeorion/code/trunk/FreeOrion
    svn co https://svn.code.sf.net/p/freeorion/code/branches/SDL_Migration_And_Dependencies_Updates

else
    cd ./freeorion
fi
cd ./FreeOrion
svn update
if [ -f "./CMakeCache.txt" ]; then rm -f CMakeCache.txt; fi
make clean
cmake .
make -j7 CFLAGS="-march=amdfam10 -O2 -msse -msse4a -mfpmath=sse -ftree-loop-if-convert -fsched-pressure -pipe"
It remains to understand what to do with the second folder (SDL_Migration_And_Dependencies_Updates). Apparently it does not contain all the files to build.
Nevertheless, I tried to apply patches of Mitten.O to the trunk posted in another thread. One has applied successfully, the other does not. Apparently it is just for a branch about boost. Accordingly, the build was not successful. I could not find information about the branches and how to connect them to the main trunk on the page for developers. I still have to think about.

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

Re: Boost 1.56 Compile Issues

#12 Post by Dilvish »

Your script seems to stack the freeorion trunk and the sdl branch rather oddly to me-- I'd keep them distinct and not handle them in the same script. If' you're wanting to try the sdl branch I'd recommend trying the following (untested, just editing your script):

Code: Select all

#!/bin/sh
if [ ! -d "./freeorion_sdl" ] ; then
    svn co https://svn.code.sf.net/p/freeorion/code/branches/SDL_Migration_And_Dependencies_Updates  freeorion_sdl
fi
cd ./freeorion_sdl
svn update
if [ -f "./CMakeCache.txt" ]; then rm -f CMakeCache.txt; fi
make clean
cmake .
make -j7 CFLAGS="-march=amdfam10 -O2 -msse -msse4a -mfpmath=sse -ftree-loop-if-convert -fsched-pressure -pipe"
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
asm64
Space Floater
Posts: 27
Joined: Fri Jan 31, 2014 6:57 am

Re: Boost 1.56 Compile Issues

#13 Post by asm64 »

asm64 wrote:Apparently it is just for a branch about boost. Accordingly, the build was not successful.
It's my fault :oops: I just had to do `cmake .` instead of comparing two directories.
Today I will test..

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Boost 1.56 Compile Issues

#14 Post by Geoff the Medio »

asm64 wrote:...I tried to apply patches of Mitten.O to the trunk posted in another thread. One has applied successfully, the other does not.
Please just add the new lines manually, as above, the boost 1.56 adjustment patch is trivially small and easily applied by hand.

Code: Select all

Index: util/Process.h
===================================================================
--- util/Process.h	(revision 7849)
+++ util/Process.h	(working copy)
@@ -2,6 +2,14 @@
 #ifndef _Process_h_
 #define _Process_h_
 
+// HACK: The following two includes work around a bug in boost 1.56,
+// which uses them without including. They can be removed once the bug is gone.
+#include <boost/version.hpp>
+#if BOOST_VERSION == 105600
+#include <boost/serialization/singleton.hpp> // This
+#include <boost/serialization/extended_type_info.hpp> //This
+#endif
+
 #include <boost/serialization/shared_ptr.hpp>
 
 #include <vector>
Index: util/Serialize.ipp
===================================================================
--- util/Serialize.ipp	(revision 7849)
+++ util/Serialize.ipp	(working copy)
@@ -4,6 +4,14 @@
 
 #include <boost/static_assert.hpp>
 #include <boost/detail/endian.hpp>
+
+#if BOOST_VERSION == 105600
+// HACK: The following two includes work around a bug in boost 1.56,
+// which uses them without including. They can be removed once the bug is gone.
+#include <boost/serialization/singleton.hpp> // This
+#include <boost/serialization/extended_type_info.hpp> //This
+#endif
+
 #include <boost/serialization/export.hpp>
 #include <boost/serialization/deque.hpp>
 #include <boost/serialization/list.hpp>

User avatar
asm64
Space Floater
Posts: 27
Joined: Fri Jan 31, 2014 6:57 am

Re: Boost 1.56 Compile Issues

#15 Post by asm64 »

So I wrote two different script for build, this is one of:

Code: Select all

#!/bin/sh
if [ ! -d "./freeorion" ] ; then mkdir freeorion; fi
cd ./freeorion
if [ ! -d "./SDL_Migration_And_Dependencies_Updates" ] ; then
    svn co https://svn.code.sf.net/p/freeorion/code/branches/SDL_Migration_And_Dependencies_Updates
    cd ./SDL_Migration_And_Dependencies_Updates
else
    cd ./SDL_Migration_And_Dependencies_Updates
    svn update
fi
if [ -f "./CMakeCache.txt" ]; then rm -f CMakeCache.txt; fi
make clean
cmake .
make -j7 CFLAGS="-march=amdfam10 -O2 -msse -msse4a -mfpmath=sse -ftree-loop-if-convert -fsched-pressure -pipe"
I cannot to compile this branch because it contains old `GG/src/Font.cpp`, that not work with new FreeType library.
Geoff the Medio wrote:Please just add the new lines manually, as above, the boost 1.56 adjustment patch is trivially small and easily applied by hand.
I applied it onto newly downloaded trunk and it did not help..

Post Reply