FreeOrion

Forums for the FreeOrion project
It is currently Fri Nov 17, 2017 7:37 pm

All times are UTC




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Jan 07, 2015 8:21 pm 
Offline
Space Floater
User avatar

Joined: Fri Jan 31, 2014 6:57 am
Posts: 27
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:
File comment: build log file
freeorion-boost-1.56-build.log [333.02 KiB]
Downloaded 66 times
Top
 Profile  
 
PostPosted: Thu Jan 08, 2015 8:21 pm 
Offline
Programmer

Joined: Sun Apr 06, 2014 4:15 pm
Posts: 255
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.


Top
 Profile  
 
PostPosted: Fri Jan 09, 2015 5:53 am 
Offline
Space Floater
User avatar

Joined: Fri Jan 31, 2014 6:57 am
Posts: 27
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?


Top
 Profile  
 
PostPosted: Fri Jan 09, 2015 6:39 pm 
Offline
Programmer

Joined: Sun Apr 06, 2014 4:15 pm
Posts: 255
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.


Top
 Profile  
 
PostPosted: Mon Jan 12, 2015 6:24 pm 
Offline
Dyson Forest

Joined: Sun May 11, 2008 10:50 am
Posts: 231
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.


Top
 Profile  
 
PostPosted: Fri Jan 16, 2015 11:57 am 
Offline
Space Floater
User avatar

Joined: Fri Jan 31, 2014 6:57 am
Posts: 27
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:
#!/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.


Top
 Profile  
 
PostPosted: Fri Jan 16, 2015 3:08 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12012
Location: Munich
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.


Top
 Profile  
 
PostPosted: Fri Jan 16, 2015 8:59 pm 
Offline
Space Floater
User avatar

Joined: Fri Jan 31, 2014 6:57 am
Posts: 27
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:
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.


Top
 Profile  
 
PostPosted: Sat Jan 17, 2015 9:38 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12012
Location: Munich
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...


Top
 Profile  
 
PostPosted: Sat Jan 17, 2015 2:32 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3257
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.


Top
 Profile  
 
PostPosted: Sat Jan 17, 2015 3:28 pm 
Offline
Space Floater
User avatar

Joined: Fri Jan 31, 2014 6:57 am
Posts: 27
2 Geoff the Medio. Ouch.. It's all the difficulties of translation :oops:

Thanks, today I rewrote my build script:
Code:
#!/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.


Top
 Profile  
 
PostPosted: Sat Jan 17, 2015 7:55 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4374
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:
#!/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


Top
 Profile  
 
PostPosted: Sun Jan 18, 2015 5:23 am 
Offline
Space Floater
User avatar

Joined: Fri Jan 31, 2014 6:57 am
Posts: 27
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..


Top
 Profile  
 
PostPosted: Sun Jan 18, 2015 9:41 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12012
Location: Munich
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:
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>


Top
 Profile  
 
PostPosted: Sun Jan 18, 2015 10:23 am 
Offline
Space Floater
User avatar

Joined: Fri Jan 31, 2014 6:57 am
Posts: 27
So I wrote two different script for build, this is one of:
Code:
#!/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..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

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