FreeOrion

Forums for the FreeOrion project
It is currently Tue May 21, 2013 7:42 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: GG SVN1040 compile error, boost 1.46, debian sid, gcc 4.5.2
PostPosted: Tue Mar 08, 2011 10:30 pm 
Offline
Space Floater

Joined: Tue Mar 08, 2011 9:55 pm
Posts: 20
GiGi SVN 1040, FreeOrion SVN 3989
Linux Mint, Debian Edition, pulling from sid repositories

I have compiled & installed the following prerequisites on my own, from source, using gcc 4.5.2-5:

boost 1.46
bullet 2.77
ogre 1.7.2

I was previously successfully able to compile against boost 1.45 using the above sources and gcc 4.4.something.

GiGi compilation now fails:

Code:
[snip...]
[ 22%] Building CXX object src/CMakeFiles/GiGi.dir/Timer.cpp.o
[ 23%] Building CXX object src/CMakeFiles/GiGi.dir/UnicodeCharsets.cpp.o
/root/freeorion-gcc4.5/FreeOrion/GG/src/Texture.cpp: In member function ‘void GG::Texture::Load(const std::string&, bool)’:
/root/freeorion-gcc4.5/FreeOrion/GG/src/Texture.cpp:296:77: error: conversion from ‘boost::filesystem3::path’ to non-scalar type ‘std::string’ requested
In file included from /usr/local/include/boost/filesystem/v3/operations.hpp:25:0,
                 from /usr/local/include/boost/filesystem/operations.hpp:31,
                 from /root/freeorion-gcc4.5/FreeOrion/GG/src/Texture.cpp:35:
/usr/local/include/boost/filesystem/v3/path.hpp: In constructor ‘boost::filesystem3::path::path(InputIterator, InputIterator) [with InputIterator = boost::transform_iterator<boost::algorithm::detail::to_lowerF<boost::filesystem3::path>, boost::filesystem3::path::iterator, boost::use_default, boost::use_default>]’:
/usr/local/include/boost/algorithm/string/detail/case_conv.hpp:113:33:   instantiated from ‘SequenceT boost::algorithm::detail::transform_range_copy(const RangeT&, FunctorT) [with SequenceT = boost::filesystem3::path, RangeT = boost::filesystem3::path, FunctorT = boost::algorithm::detail::to_lowerF<boost::filesystem3::path>]’
/usr/local/include/boost/algorithm/string/case_conv.hpp:79:65:   instantiated from ‘SequenceT boost::algorithm::to_lower_copy(const SequenceT&, const std::locale&) [with SequenceT = boost::filesystem3::path]’
/root/freeorion-gcc4.5/FreeOrion/GG/src/Texture.cpp:296:77:   instantiated from here
/usr/local/include/boost/filesystem/v3/path.hpp:151:9: error: no matching function for call to ‘convert(const boost::filesystem3::path*, const boost::filesystem3::path*, boost::filesystem3::path::string_type&, const boost::filesystem3::path::codecvt_type&)’
/usr/local/include/boost/filesystem/v3/path_traits.hpp:96:8: note: candidates are: void boost::filesystem3::path_traits::convert(const char*, const char*, std::wstring&, const boost::filesystem3::path_traits::codecvt_type&)
/usr/local/include/boost/filesystem/v3/path_traits.hpp:102:8: note:                 void boost::filesystem3::path_traits::convert(const wchar_t*, const wchar_t*, std::string&, const boost::filesystem3::path_traits::codecvt_type&)
/usr/local/include/boost/filesystem/v3/path_traits.hpp:108:8: note:                 void boost::filesystem3::path_traits::convert(const char*, std::wstring&, const boost::filesystem3::path_traits::codecvt_type&)
/usr/local/include/boost/filesystem/v3/path_traits.hpp:117:8: note:                 void boost::filesystem3::path_traits::convert(const wchar_t*, std::string&, const boost::filesystem3::path_traits::codecvt_type&)
/usr/local/include/boost/filesystem/v3/path_traits.hpp:130:8: note:                 void boost::filesystem3::path_traits::convert(const char*, const char*, std::string&, const boost::filesystem3::path_traits::codecvt_type&)
/usr/local/include/boost/filesystem/v3/path_traits.hpp:139:8: note:                 void boost::filesystem3::path_traits::convert(const char*, std::string&, const boost::filesystem3::path_traits::codecvt_type&)
/usr/local/include/boost/filesystem/v3/path_traits.hpp:150:8: note:                 void boost::filesystem3::path_traits::convert(const wchar_t*, const wchar_t*, std::wstring&, const boost::filesystem3::path_traits::codecvt_type&)
/usr/local/include/boost/filesystem/v3/path_traits.hpp:159:8: note:                 void boost::filesystem3::path_traits::convert(const wchar_t*, std::wstring&, const boost::filesystem3::path_traits::codecvt_type&)
make[2]: *** [src/CMakeFiles/GiGi.dir/Texture.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/GiGi.dir/all] Error 2
make: *** [all] Error 2


I believe that the root of this originates with a recent change to boost from a default of filesystem v2 to a default of filesystem v3, whereby some of the calling conventions changed.

A temporary fix of
Quote:
#define BOOST_FILESYSTEM_VERSION 2
is a suggested remedy, but I haven't looked at where the best place to put that would be.

I also suggest a note be added here: http://www.freeorion.org/index.php/Compile_In_Linux, mentioning that GiGi SVN 853->1040 is incompatible with boost 1.46.


Top
 Profile  
 
 Post subject: Re: GG SVN1040 compile error, boost 1.46, debian sid, gcc 4.5.2
PostPosted: Wed Mar 09, 2011 11:07 pm 
Offline
Space Floater

Joined: Tue Mar 08, 2011 9:55 pm
Posts: 20
Reported as a bug in GiGi's sourceforge bugtracker.


Top
 Profile  
 
 Post subject: Re: GG SVN1040 compile error, boost 1.46, debian sid, gcc 4.5.2
PostPosted: Thu Mar 10, 2011 5:13 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7888
Location: Vancouver, BC
I suspect the response will be "use boost 1.45" (or 1.44), but thanks.


Top
 Profile  
 
 Post subject: Re: GG SVN1040 compile error, boost 1.46, debian sid, gcc 4.5.2
PostPosted: Thu Mar 10, 2011 6:39 am 
Offline
Space Floater

Joined: Tue Mar 08, 2011 9:55 pm
Posts: 20
Geoff the Medio wrote:
I suspect the response will be "use boost 1.45" (or 1.44), but thanks.
Thanks for the response here, and you're welcome. While I elected to compile these dependencies on my own, it looks as though debian intends to go straight from boost 1.42 to 1.46. 1.42 is what is in the mainline repositories, and 1.46 just hit sid (as the first boost upgrade since 1.42) within the last week or so. So I'd personally say that GiGi is going to need to work with 1.46 at some point soon, to take advantage of debian's prebuilt boost. But things are also a bit wacked right now, debian-wise. Even debian sid's ogre3d is presently still compiled against boost 1.42.

Even if y'all don't choose to fix the underlying issue right now, it would be good to note the dependency on 1.44 <= boost <= 1.45 in the compile instructions.


Top
 Profile  
 
 Post subject: Re: GG SVN1040 compile error, boost 1.46, debian sid, gcc 4.5.2
PostPosted: Thu Mar 10, 2011 4:11 pm 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
Fixed in SVN.


Top
 Profile  
 
 Post subject: Re: GG SVN1040 compile error, boost 1.46, debian sid, gcc 4.5.2
PostPosted: Sat Mar 12, 2011 12:12 am 
Offline
Space Krill

Joined: Fri Mar 11, 2011 11:46 pm
Posts: 1
FO itself doesn't seem to compile with Boost.Filesystem v3 either.

Also, "Compile In Linux" explicitly says to install Boost 1.42 on Maverick/Squeeze/Sid while current dev has 1.44 in CMakeLists.txt. That's a bit confusing.


Top
 Profile  
 
 Post subject: Re: GG SVN1040 compile error, boost 1.46, debian sid, gcc 4.
PostPosted: Thu Jun 02, 2011 3:13 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7888
Location: Vancouver, BC
vkuzkokov wrote:
Also, "Compile In Linux" explicitly says to install Boost 1.42 on Maverick/Squeeze/Sid while current dev has 1.44 in CMakeLists.txt. That's a bit confusing.

The distro-specific instructions are probably out of date. There no-one actively maintaining them...


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


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 © 2000, 2002, 2005, 2007 phpBB Group