Compile SDL Branch in Arch Linux

Questions, problems and discussion about compiling FreeOrion.
Message
Author
pheldens
Pupating Mass
Posts: 96
Joined: Fri Mar 15, 2013 12:54 pm

Re: Compile SDL Branch in Arch Linux

#16 Post by pheldens » Sat Dec 20, 2014 10:50 am

Yes, I'm trying to give feedback with these debugs, and tell you how I build it because it's nowhere documented how this should be done for the SDL tree.

SDL tree is still crashing in the parser.

Code: Select all

SDL_Migration_And_Dependencies_Updates > svn up
Updating '.':
U    python/PythonUniverseWrapper.cpp
U    default/ship_parts.txt
U    universe/ShipDesign.h
U    universe/Ship.cpp
U    universe/ShipDesign.cpp
U    universe/Ship.h
U    universe/Effect.cpp
U    parse/ShipPartStatsParser.cpp
U    parse/ShipPartsParser.cpp
U    parse/ShipPartStatsParser.h
U    parse/BuildingsParser.cpp
U    UI/EncyclopediaDetailPanel.cpp
U    UI/DesignWnd.cpp
U    util/SerializeUniverse.cpp
Updated to revision 7794.

cd build
make -j3

./freeorion
Segmentation fault

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff72370b8 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so

#0  0x00007ffff72370b8 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#1  0x00007ffff722f885 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#2  0x00007ffff7235731 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#3  0x00007ffff7232db9 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#4  0x00007ffff7224a74 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#5  0x00007ffff7233b0e in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#6  0x00007ffff7224a74 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#7  0x00007ffff72336fb in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#8  0x00007ffff7233fcc in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#9  0x00007ffff722d5fd in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#10 0x00007ffff722f9a9 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#11 0x00007ffff7235731 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#12 0x00007ffff7232db9 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#13 0x00007ffff7224a74 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#14 0x00007ffff72336fb in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#15 0x00007ffff7224a74 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#16 0x00007ffff7233b0e in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#17 0x00007ffff7233fcc in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#18 0x00007ffff722d5fd in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#19 0x00007ffff739dcdb in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#20 0x00007ffff73956ec in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#21 0x00007ffff7399c8e in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#22 0x00007ffff739877e in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#23 0x00007ffff7394284 in ?? ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorionparse.so
#24 0x00007ffff789200b in TechManager::TechManager() ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorioncommon.so
#25 0x00007ffff78930c4 in TechManager::GetTechManager() ()
   from /home/user/games/SDL_Migration_And_Dependencies_Updates/build/libfreeorioncommon.so
#26 0x00000000006ee6d7 in ?? ()
#27 0x00000000006eed91 in ?? ()
#28 0x000000000069df6a in ?? ()
#29 0x00000000006059f9 in ?? ()
#30 0x00000000004d9bc4 in ?? ()
#31 0x000000000045457d in _start ()


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

Re: Compile SDL Branch in Arch Linux

#17 Post by Geoff the Medio » Sat Dec 20, 2014 11:21 am

pheldens wrote:SDL tree is still crashing in the parser.
I have no idea what to change then to resolve this issue. It runs fine for me on Windows with Boost 1.56. If there's no log files at all, then there's probably some more fundamental problem with log file generation or program startup that I can't do anything about.

pheldens
Pupating Mass
Posts: 96
Joined: Fri Mar 15, 2013 12:54 pm

Re: Compile SDL Branch in Arch Linux

#18 Post by pheldens » Sat Dec 20, 2014 12:56 pm

are you on a pure 64 bit machine?

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

Re: Compile SDL Branch in Arch Linux

#19 Post by Geoff the Medio » Sat Dec 20, 2014 1:13 pm

I don't know how to answer that, other than to say Windows 7 64 bit with MS Visual C++ 2010 building 32 bit code.

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

Re: Compile SDL Branch in Arch Linux

#20 Post by Vezzra » Mon Dec 22, 2014 1:55 pm

I'm happy to announce that r7794 of the SDL/SDK branch at least on OSX seems to have solved (almost) all remaining issues (particularly the parser related ones). Buildings, ship parts etc. are all back, everything seems to work as before. Also no more error messages in the logs. There is one noteable (but expected) exception to that:

Code: Select all

2014-12-22 14:18:35,965 DEBUG AI : AI_Error: AI script error in "generateOrders": "'shipDesign' object has no attribute 'directFireStats'"
2014-12-22 14:18:35,965 DEBUG AI : 
2014-12-22 14:18:35,965 ERROR AI : Traceback (most recent call last):
2014-12-22 14:18:35,965 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/debug_tools.py", line 30, in wrapper
2014-12-22 14:18:35,965 ERROR AI :     return function(*args, **kw)
2014-12-22 14:18:35,965 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/FreeOrionAI.py", line 189, in generateOrders
2014-12-22 14:18:35,965 ERROR AI :     foAIstate.refresh() #checks exploration border & clears roles/missions of missing fleets & updates fleet locs & threats
2014-12-22 14:18:35,965 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIstate.py", line 172, in refresh
2014-12-22 14:18:35,965 ERROR AI :     self.update_system_status()
2014-12-22 14:18:35,965 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIstate.py", line 417, in update_system_status
2014-12-22 14:18:35,965 ERROR AI :     thisRating = self.get_rating(fid, True, self.fleet_sum_tups_to_estat_dicts([(1, self.empire_standard_enemy)]))
2014-12-22 14:18:35,965 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIstate.py", line 637, in get_rating
2014-12-22 14:18:35,966 ERROR AI :     status = {'rating':self.rate_fleet(fleetID, enemy_stats), 'sysID':fleet.systemID, 'nships':len(fleet.shipIDs)}
2014-12-22 14:18:35,966 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIstate.py", line 588, in rate_fleet
2014-12-22 14:18:35,966 ERROR AI :     stats = dict(self.get_weighted_design_stats(designID, species_name))
2014-12-22 14:18:35,966 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIstate.py", line 689, in get_weighted_design_stats
2014-12-22 14:18:35,966 ERROR AI :     design_stats = dict( self.get_design_id_stats(design_id) ) #new dict so we don't modify our original data
2014-12-22 14:18:35,966 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIstate.py", line 773, in get_design_id_stats
2014-12-22 14:18:35,966 ERROR AI :     for attack in list(design.directFireStats):
2014-12-22 14:18:35,966 ERROR AI : AttributeError: 'shipDesign' object has no attribute 'directFireStats'
The AI scripts apparently need to be adjusted to the removed stats/attributes. Unless that's done, the AI is still broken.
Geoff the Medio wrote:I think most of the actual Boost update issues have been resolved?
They are now. When you wrote that post, your fixes for the broken parsers haven't been committed.

Well, the SDK/SDL branch looks very usable now. What remains to be done to finally merge to trunk?

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

Re: Compile SDL Branch in Arch Linux

#21 Post by MatGB » Mon Dec 22, 2014 2:01 pm

If it's working, is it worth doing a test release of it instead of trunk just to get more eyeballs on it?
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
Vezzra
Release Manager, Design
Posts: 4674
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Compile SDL Branch in Arch Linux

#22 Post by Vezzra » Mon Dec 22, 2014 2:34 pm

MatGB wrote:If it's working, is it worth doing a test release of it instead of trunk just to get more eyeballs on it?
Well, the AI is still broken (see my post above). Once Dilvish gets around to fix the AI scripts in the SDL branch, I guess that's worth considering.

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

Re: Compile SDL Branch in Arch Linux

#23 Post by Dilvish » Mon Dec 22, 2014 8:52 pm

Vezzra wrote:Well, the AI is still broken (see my post above). Once Dilvish gets around to fix the AI scripts in the SDL branch, I guess that's worth considering.
Some of the ShipDesign attack info that the AI relied on had been ripped out without being replaced. I've updated it now in a way that seems to work. Geoff, does the reliance on ship PartType->Capacity() in r7797 comport with how you plan to use Capacity for part damage going forward?
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
Geoff the Medio
Programming, Design, Admin
Posts: 12280
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Compile SDL Branch in Arch Linux

#24 Post by Geoff the Medio » Mon Dec 22, 2014 10:49 pm

Dilvish wrote:Geoff, does the reliance on ship PartType->Capacity() in r7797 comport with how you plan to use Capacity for part damage going forward?
I removed all the complicated stats that didn't do anything for ship parts, and each now just has a single main stat. That can be called "damage" or "capacity" in any part definition, and is usually "capacity" for stuff that isn't a weapon. The single stat doesn't need to be Capacity() but that's presently the function that returns the value. That value is either the effectiveness of the part directly, or in some cases (eg. weapons) is the value used when generating an effectsgroup that actually sets the part strength.

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

Re: Compile SDL Branch in Arch Linux

#25 Post by Vezzra » Tue Dec 23, 2014 7:17 pm

MatGB wrote:If it's working, is it worth doing a test release of it instead of trunk just to get more eyeballs on it?
I just uploaded special test builds of the SDL/SDK branch.

https://sourceforge.net/projects/freeor ... rion/Test/

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

Re: Compile SDL Branch in Arch Linux

#26 Post by Chriss » Mon Jan 12, 2015 7:13 pm

Edit: Ah, that's another missing include in shared_pointer.hpp new in boost 1.57. What's up with them and their includes??
https://svn.boost.org/trac/boost/ticket/10749

Compiling the SDL branch in Arch with Boost 1.57 (include bug fixed) gives me this:
Ideas?

Code: Select all

[  9%] Building CXX object CMakeFiles/freeorioncommon.dir/util/Process.cpp.o
In file included from /usr/include/boost/serialization/shared_ptr.hpp:29:0,
                 from /home/chris/abs/freeorion-svn/src/SDL_Migration_And_Dependencies_Updates/util/Process.h:13,
                 from /home/chris/abs/freeorion-svn/src/SDL_Migration_And_Dependencies_Updates/util/Process.cpp:1:
/usr/include/boost/serialization/shared_ptr_helper.hpp: In static member function ‘static const boost::serialization::extended_type_info* boost::serialization::shared_ptr_helper<SPT>::non_polymorphic::get_object_type(U&)’:
/usr/include/boost/serialization/shared_ptr_helper.hpp:108:39: error: ‘type_info_implementation’ in namespace ‘boost::serialization’ does not name a template type
                 boost::serialization::type_info_implementation< U >::type
                                       ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:108:63: error: expected template-argument before ‘<’ token
                 boost::serialization::type_info_implementation< U >::type
                                                               ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:108:63: error: expected ‘>’ before ‘<’ token
/usr/include/boost/serialization/shared_ptr_helper.hpp:109:13: error: template argument 1 is invalid
             >::get_const_instance();
             ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:109:16: error: expected ‘(’ before ‘get_const_instance’
             >::get_const_instance();
                ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:109:16: error: expected ‘;’ before ‘get_const_instance’
/usr/include/boost/serialization/shared_ptr_helper.hpp:109:35: error: there are no arguments to ‘get_const_instance’ that depend on a template parameter, so a declaration of ‘get_const_instance’ must be available [-fpermissive]
             >::get_const_instance();
                                   ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:109:35: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/boost/serialization/shared_ptr_helper.hpp: In static member function ‘static const boost::serialization::extended_type_info* boost::serialization::shared_ptr_helper<SPT>::polymorphic::get_object_type(U&)’:
/usr/include/boost/serialization/shared_ptr_helper.hpp:118:39: error: ‘type_info_implementation’ in namespace ‘boost::serialization’ does not name a template type
                 boost::serialization::type_info_implementation< U >::type
                                       ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:118:63: error: expected template-argument before ‘<’ token
                 boost::serialization::type_info_implementation< U >::type
                                                               ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:118:63: error: expected ‘>’ before ‘<’ token
/usr/include/boost/serialization/shared_ptr_helper.hpp:119:13: error: template argument 1 is invalid
             >::get_const_instance().get_derived_extended_type_info(u);
             ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:119:16: error: expected ‘(’ before ‘get_const_instance’
             >::get_const_instance().get_derived_extended_type_info(u);
                ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:119:16: error: expected ‘;’ before ‘get_const_instance’
/usr/include/boost/serialization/shared_ptr_helper.hpp:119:35: error: there are no arguments to ‘get_const_instance’ that depend on a template parameter, so a declaration of ‘get_const_instance’ must be available [-fpermissive]
             >::get_const_instance().get_derived_extended_type_info(u);
                                   ^
/usr/include/boost/serialization/shared_ptr_helper.hpp: In member function ‘void boost::serialization::shared_ptr_helper<SPT>::reset(SPT<T>&, T*)’:
/usr/include/boost/serialization/shared_ptr_helper.hpp:131:17: error: ‘type_info_implementation’ is not a member of ‘boost::serialization’
             = & boost::serialization::type_info_implementation< T >::type
                 ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:131:67: error: expected primary-expression before ‘>’ token
             = & boost::serialization::type_info_implementation< T >::type
                                                                   ^
/usr/include/boost/serialization/shared_ptr_helper.hpp:131:70: error: ‘::type’ has not been declared
             = & boost::serialization::type_info_implementation< T >::type
                                                                      ^
CMakeFiles/freeorioncommon.dir/build.make:1066: recipe for target 'CMakeFiles/freeorioncommon.dir/util/Process.cpp.o' failed
make[2]: *** [CMakeFiles/freeorioncommon.dir/util/Process.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/freeorioncommon.dir/all' failed
make[1]: *** [CMakeFiles/freeorioncommon.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
SVN Info:

Code: Select all

Path: SDL_Migration_And_Dependencies_Updates
Working Copy Root Path: /home/chris/abs/freeorion-svn/src/SDL_Migration_And_Dependencies_Updates
URL: https://svn.code.sf.net/p/freeorion/code/branches/SDL_Migration_And_Dependencies_Updates
Relative URL: ^/branches/SDL_Migration_And_Dependencies_Updates
Repository Root: https://svn.code.sf.net/p/freeorion/code
Repository UUID: dbd5520b-6a0a-0410-a553-f54834df5b05
Revision: 7831
Node Kind: directory
Schedule: normal
Last Changed Author: geoffthemedio
Last Changed Rev: 7818
Last Changed Date: 2015-01-06 16:55:34 +0100 (Di, 06 Jan 2015)
Attached patches are released under GPL 2.0 or later.

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

Re: Compile SDL Branch in Arch Linux

#27 Post by Vezzra » Mon Jan 12, 2015 9:30 pm

Chriss wrote:Edit: Ah, that's another missing include in shared_pointer.hpp new in boost 1.57. What's up with them and their includes??
Argh, not again... that's getting particularly annoying since they apparently don't do bugfix releases anymore. Whenever I stumbled over issues like that in the last releases, I found remarks/forum entries/whatever stating that "a fix is already in trunk, will be included in the next release". So I think, oh well, wait for the next release. Unfortunately, the next release has some other issues, which, guess what, have already a fix in trunk which will be included in the next release.

Ad infinitum... :roll:

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

Re: Compile SDL Branch in Arch Linux

#28 Post by Chriss » Mon Jan 12, 2015 9:37 pm

@Vezzra: Yeah, I dunno. I'd be a bit embarrassed by now. ;) I've asked the arch guys to fix it again.

There is a reference to a missing OISInput.cfg - should that be removed?

Code: Select all

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 7831)
+++ CMakeLists.txt	(working copy)
@@ -384,12 +384,12 @@
         COMPONENT COMPONENT_FREEORION
     )
 
-    install(
-        FILES
-        ${CMAKE_SOURCE_DIR}/OISInput.cfg
-        DESTINATION share/freeorion/default
-        COMPONENT COMPONENT_FREEORION
-    )
+    #install(
+        #FILES
+        #${CMAKE_SOURCE_DIR}/OISInput.cfg
+        #DESTINATION share/freeorion/default
+        #COMPONENT COMPONENT_FREEORION
+    #)
 
     install(
         FILES
Otherwise, it compiles and runs on arch again. I've just played about 100 Turns, it's looking good. I'll updated the Aur Package. And add a comment about the missing include...
Attached patches are released under GPL 2.0 or later.

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

Re: Compile SDL Branch in Arch Linux

#29 Post by Geoff the Medio » Tue Jan 13, 2015 12:36 am

Chriss wrote:There is a reference to a missing OISInput.cfg - should that be removed?
Yes.
Otherwise, it compiles and runs on arch again.
With what Boost version? Did you do something in FreeOrion code to fix the Boost include problem? Expecting a patched version of Boost 1.57 is impractical in general.

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

Re: Compile SDL Branch in Arch Linux

#30 Post by Chriss » Tue Jan 13, 2015 8:27 am

Geoff the Medio wrote:
Chriss wrote:There is a reference to a missing OISInput.cfg - should that be removed?
Yes.
Could you please make that change?
Otherwise, it compiles and runs on arch again.
With what Boost version? Did you do something in FreeOrion code to fix the Boost include problem? Expecting a patched version of Boost 1.57 is impractical in general.
With 1.57. Yes, it is impractical and not good style to expect someone to patch the system boost to remove the bug. But I guess that the arch package will have that include soon, so it's a temporary thing. And it works. ;)
For an Arch user, it should be easier to use the Aur package and add the include rather than to compile the SDL branch by hand.
Attached patches are released under GPL 2.0 or later.

Post Reply