Linux GiGi compile problem

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
muuus
Space Krill
Posts: 9
Joined: Sat Dec 03, 2011 5:34 pm
Location: Russia, Moscow

Linux GiGi compile problem

#1 Post by muuus »

Hi everybody!

After two days of updating libboost in my Ubuntu 11.10 from 1.46 to 1.47 i`m able to cmake GiGi lib:

Code: Select all

FreeOrion/GG$ cmake -DBUILD_TUTORIALS=off .
-- Build platform: linux
-- Configuring GiGi
-- Configuring GiGiSDL
-- Configuring GiGiOgre
--   libraries : OgreMain;pthread from /usr/lib
--   includes  : /usr/include/OGRE
-- Configuring Ogre OIS Input Plugin
-- Configuring Tests
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
   Warning: Doxygen could not be found.  Disabling the documentation build.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/Storage/Games/freeorion/FreeOrion/GG
But when i try to make problem appear:

Code: Select all

FreeOrion/GG$ make
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/AdamParser.cpp.o
In file included from /home/Storage/Games/freeorion/FreeOrion/GG/GG/LexerFwd.h:35:0,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/Lexer.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/ExpressionParser.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/src/AdamParser.cpp:27:
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:700:12: error: ‘assign_to_container_from_value’ is not a template
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:876:81: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:908:86: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
    
make[2]: *** [src/CMakeFiles/GiGi.dir/AdamParser.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/GiGi.dir/all] Error 2
make: *** [all] Error 2
Can someone help me?
I hate play Freeorion in wine...

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

Re: Linux GiGi compile problem

#2 Post by Geoff the Medio »

I don't know why you're getting errors deep in the boost headers, but I don't think AdamParser.cpp is needed to build FreeOrion, so you can probably just remove it from the GiGi build.

muuus
Space Krill
Posts: 9
Joined: Sat Dec 03, 2011 5:34 pm
Location: Russia, Moscow

Re: Linux GiGi compile problem

#3 Post by muuus »

Thanks for reply!

I think these errors can appear because i have two versions of some boost libs in my system.

For example:
I have libboost filesystem 1.46.1 and libboost filesystem 1.47... But i can't delete 1.46.1 because lots of system services depend it.

Also i have these pair of libs:
iostreams 1.46.1 and 1.47
regex 1.46.1 and 1.47
serialization 1.46.1 and 1.47
signals 1.46.1 and 1.47
system 1.46.1 and 1.47

All other libboost 1.47

OS: ubuntu 11.10
GiGi svn - 1072
Freeorion svn - 4510

Any suggestions?

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

Re: Linux GiGi compile problem

#4 Post by Geoff the Medio »

muuus wrote:I think these errors can appear because i have two versions of some boost libs in my system.
Did you point CMake towards the 1.47 include directories? I would expect it to take the appropriate headers that you pointed it to...

You're getting these errors during compiling, so if all else fails, you could temporarily rename the 1.46.1 include directory to something else. Presumably these system process don't depend on header files to function.

muuus
Space Krill
Posts: 9
Joined: Sat Dec 03, 2011 5:34 pm
Location: Russia, Moscow

Re: Linux GiGi compile problem

#5 Post by muuus »

Geoff the Medio wrote:Did you point CMake towards the 1.47 include directories?
- Yes. Point to "/usr/include/boost" and "/usr/libs" for libs.

And i delete all libboost 1.46.1 in my system.

And i still get the same error:

Code: Select all

FreeOrion/GG$ make
Scanning dependencies of target GiGi
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/AdamDlg.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/AdamGlue.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/AdamParser.cpp.o
In file included from /home/Storage/Games/freeorion/FreeOrion/GG/GG/LexerFwd.h:35:0,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/Lexer.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/ExpressionParser.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/src/AdamParser.cpp:27:
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:700:12: error: ‘assign_to_container_from_value’ is not a template
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:876:81: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:908:86: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
make[2]: *** [src/CMakeFiles/GiGi.dir/AdamParser.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/GiGi.dir/all] Error 2
make: *** [all] Error 2

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

Re: Linux GiGi compile problem

#6 Post by Geoff the Medio »

It's presumably not an issue with boost 1.46.1 being around then.

It might help to post what compiler version you're using.

muuus
Space Krill
Posts: 9
Joined: Sat Dec 03, 2011 5:34 pm
Location: Russia, Moscow

Re: Linux GiGi compile problem

#7 Post by muuus »

Geoff the Medio wrote:It's presumably not an issue with boost 1.46.1 being around then.
It might help to post what compiler version you're using.
cmake version 2.8.5
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1

Anything else you need to know?

btw, how can i remove "AdamParser.cpp" from the GiGi build?

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

Re: Linux GiGi compile problem

#8 Post by Geoff the Medio »

muuus wrote:btw, how can i remove "AdamParser.cpp" from the GiGi build?
Edit GG/src/CMakeLists.txt and remove the file from the list of .cpp files. Then regenerate the build files with CMake.

muuus
Space Krill
Posts: 9
Joined: Sat Dec 03, 2011 5:34 pm
Location: Russia, Moscow

Re: Linux GiGi compile problem

#9 Post by muuus »

After removing AdamParser.cpp

Code: Select all

freeorion/FreeOrion/GG$ make
Scanning dependencies of target GiGi
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/AlignmentFlags.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/Base.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/BrowseInfoWnd.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/Button.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/ClrConstants.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/Control.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/Cursor.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/DrawUtil.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/DropDownList.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/DynamicGraphic.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/Edit.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/EventPump.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/EveParser.cpp.o
In file included from /home/Storage/Games/freeorion/FreeOrion/GG/GG/LexerFwd.h:35:0,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/Lexer.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/ExpressionParser.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/src/EveParser.cpp:27:
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:700:12: error: ‘assign_to_container_from_value’ is not a template
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:876:81: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:908:86: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
make[2]: *** [src/CMakeFiles/GiGi.dir/EveParser.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/GiGi.dir/all] Error 2
make: *** [all] Error 2
Still no luck here(((
Any thoughts?

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

Re: Linux GiGi compile problem

#10 Post by Geoff the Medio »

The same header is being included from a different source file. Try removing that (EveParser.cpp) as well.

muuus
Space Krill
Posts: 9
Joined: Sat Dec 03, 2011 5:34 pm
Location: Russia, Moscow

Re: Linux GiGi compile problem

#11 Post by muuus »

Geoff the Medio wrote:The same header is being included from a different source file. Try removing that (EveParser.cpp) as well.
Already... no luck here too, another parser:

Code: Select all

FreeOrion/GG$ make
Scanning dependencies of target GiGi
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/ExpressionParser.cpp.o
In file included from /home/Storage/Games/freeorion/FreeOrion/GG/GG/LexerFwd.h:35:0,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/Lexer.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/ExpressionParser.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/src/ExpressionParser.cpp:26:
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:700:12: error: ‘assign_to_container_from_value’ is not a template
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:876:81: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:908:86: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
make[2]: *** [src/CMakeFiles/GiGi.dir/ExpressionParser.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/GiGi.dir/all] Error 2
make: *** [all] Error 2
And if i remove it:

Code: Select all

FreeOrion/GG$ make
Scanning dependencies of target GiGi
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/ExpressionWriter.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/Font.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/GroupBox.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/GUI.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/Layout.cpp.o
[  1%] Building CXX object src/CMakeFiles/GiGi.dir/Lexer.cpp.o
In file included from /home/Storage/Games/freeorion/FreeOrion/GG/GG/LexerFwd.h:35:0,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/GG/Lexer.h:31,
                 from /home/Storage/Games/freeorion/FreeOrion/GG/src/Lexer.cpp:25:
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:700:12: error: ‘assign_to_container_from_value’ is not a template
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:876:81: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:908:86: error: wrong number of template arguments (2, should be 5)
/usr/include/boost/spirit/home/lex/lexer/lexertl/position_token.hpp:701:86: error: provided for ‘template<class Attribute, class Iterator, class AttributeTypes, class HasState, class Idtype> struct boost::spirit::traits::assign_to_container_from_value’
make[2]: *** [src/CMakeFiles/GiGi.dir/Lexer.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/GiGi.dir/all] Error 2
make: *** [all] Error 2
I think Lexer.cpp is pretty important and i can't remove it... What do you think?

muuus
Space Krill
Posts: 9
Joined: Sat Dec 03, 2011 5:34 pm
Location: Russia, Moscow

Re: Linux GiGi compile problem

#12 Post by muuus »

Closed. Change my linux distr to Arch Linux.

guini
Space Krill
Posts: 5
Joined: Tue Oct 18, 2011 2:08 am

Re: Linux GiGi compile problem

#13 Post by guini »

Hi, i get errors compiling GiGi with Boost 1.48.0 (on Arch Linux).
I think there is some problem with the move() function from Boost Thread or Boost Move.
(see http://thread.gmane.org/gmane.comp.lib.boost.user/71653
and https://svn.boost.org/trac/boost/ticket/6141 for some info)

The code compiles, when I replace move() with adobe::move() and
uninitialized_move() with adobe::uninitialized_move() in some places.

The patch is attached. Maybe someone can use it.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]


muuus
Space Krill
Posts: 9
Joined: Sat Dec 03, 2011 5:34 pm
Location: Russia, Moscow

Re: Linux GiGi compile problem

#14 Post by muuus »

Same here.
Downgrading boost 1.48 to 1.47 helped me out.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: Linux GiGi compile problem

#15 Post by tzlaine »

This is fixed in SVN now. Feel free to use Boost 1.47 or 1.48 as you like now.

Post Reply