Problems building from svn on linux

Hi guys,
I’m having trouble building svn version on linux machine (x86, gcc version 4.5.2, boost 1.53). The error is as follows

$ make
  1%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CBinaryReader.cpp.o
  2%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CFilesystemLoader.cpp.o                                                                                                                                                        
  2%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CMemoryStream.cpp.o                                                                                                                                                            
  3%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CFileInfo.cpp.o                                                                                                                                                                
  4%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CLodArchiveLoader.cpp.o                                                                                                                                                        
  4%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CResourceLoader.cpp.o                                                                                                                                                          
  5%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CFileInputStream.cpp.o                                                                                                                                                         
  6%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CCompressedStream.cpp.o                                                                                                                                                        
  7%] Building CXX object lib/CMakeFiles/vcmi.dir/filesystem/CMappedFileLoader.cpp.o                                                                                                                                                        
  7%] Building CXX object lib/CMakeFiles/vcmi.dir/logging/CBasicLogConfigurator.cpp.o                                                                                                                                                       
  8%] Building CXX object lib/CMakeFiles/vcmi.dir/logging/CLogger.cpp.o                                                                                                                                                                     
  9%] Building CXX object lib/CMakeFiles/vcmi.dir/mapping/CCampaignHandler.cpp.o                                                                                                                                                            
 10%] Building CXX object lib/CMakeFiles/vcmi.dir/mapping/CMap.cpp.o                                                                                                                                                                        
 10%] Building CXX object lib/CMakeFiles/vcmi.dir/mapping/CMapEditManager.cpp.o                                                                                                                                                             
/tmp/vcmi-s2/trunk/lib/mapping/CMapEditManager.cpp: In constructor 'CTerrainViewPatternConfig::CTerrainViewPatternConfig()':                                                                                                                 
/tmp/vcmi-s2/trunk/lib/mapping/CMapEditManager.cpp:359:7: warning: name lookup of 'i' changed
/tmp/vcmi-s2/trunk/lib/mapping/CMapEditManager.cpp:320:10: warning:   matches this 'i' under ISO standard rules
/tmp/vcmi-s2/trunk/lib/mapping/CMapEditManager.cpp:330:12: warning:   matches this 'i' under old rules
In file included from /usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/list:63:0,
                 from /usr/include/boost/algorithm/string/std/list_traits.hpp:15,
                 from /usr/include/boost/algorithm/string/std_containers_traits.hpp:20,
                 from /usr/include/boost/algorithm/string.hpp:18,
                 from /tmp/vcmi-s2/trunk/lib/../Global.h:98,
                 from /tmp/vcmi-s2/trunk/lib/StdInc.h:3,
                 from /tmp/vcmi-s2/trunk/lib/mapping/CMapEditManager.cpp:1:
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/unique_ptr.h: In constructor 'std::_List_node<_Tp>::_List_node(_Args&& ...) [with _Args = {const std::unique_ptr<CMapOperation>&}, _Tp = std::unique_ptr<CMapOperation>]':
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/ext/new_allocator.h:111:4:   instantiated from 'void __gnu_cxx::new_allocator<_Tp>::construct(_Tp*, _Args&& ...) [with _Args = {const std::unique_ptr<CMapOperation>&}, _Tp = std::_List_node<std::unique_ptr<CMapOperation> >, _Tp* = std::_List_node<std::unique_ptr<CMapOperation> >*]'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/stl_list.h:481:8:   instantiated from 'std::list<_Tp, _Alloc>::_Node* std::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const std::unique_ptr<CMapOperation>&}, _Tp = std::unique_ptr<CMapOperation>, _Alloc = std::allocator<std::unique_ptr<CMapOperation> >, std::list<_Tp, _Alloc>::_Node = std::_List_node<std::unique_ptr<CMapOperation> >]'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/stl_list.h:1442:63:   instantiated from 'void std::list<_Tp, _Alloc>::_M_insert(std::list<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const std::unique_ptr<CMapOperation>&}, _Tp = std::unique_ptr<CMapOperation>, _Alloc = std::allocator<std::unique_ptr<CMapOperation> >, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<std::unique_ptr<CMapOperation> >]'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/stl_list.h:921:9:   instantiated from 'void std::list<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::unique_ptr<CMapOperation>, _Alloc = std::allocator<std::unique_ptr<CMapOperation> >, value_type = std::unique_ptr<CMapOperation>]'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/stl_list.h:1397:4:   instantiated from 'void std::list<_Tp, _Alloc>::_M_fill_initialize(std::list::size_type, const value_type&) [with _Tp = std::unique_ptr<CMapOperation>, _Alloc = std::allocator<std::unique_ptr<CMapOperation> >, std::list::size_type = unsigned int, value_type = std::unique_ptr<CMapOperation>]'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/stl_list.h:522:9:   instantiated from 'std::list<_Tp, _Alloc>::list(std::list::size_type, const value_type&, const allocator_type&) [with _Tp = std::unique_ptr<CMapOperation>, _Alloc = std::allocator<std::unique_ptr<CMapOperation> >, std::list::size_type = unsigned int, value_type = std::unique_ptr<CMapOperation>, allocator_type = std::allocator<std::unique_ptr<CMapOperation> >]'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/stl_list.h:1030:46:   instantiated from 'void std::list<_Tp, _Alloc>::insert(std::list<_Tp, _Alloc>::iterator, std::list::size_type, const value_type&) [with _Tp = std::unique_ptr<CMapOperation>, _Alloc = std::allocator<std::unique_ptr<CMapOperation> >, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<std::unique_ptr<CMapOperation> >, std::list::size_type = unsigned int, value_type = std::unique_ptr<CMapOperation>]'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/list.tcc:127:9:   instantiated from 'void std::list<_Tp, _Alloc>::resize(std::list::size_type, value_type) [with _Tp = std::unique_ptr<CMapOperation>, _Alloc = std::allocator<std::unique_ptr<CMapOperation> >, std::list::size_type = unsigned int, value_type = std::unique_ptr<CMapOperation>]'
/tmp/vcmi-s2/trunk/lib/mapping/CMapEditManager.cpp:156:84:   instantiated from here
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/unique_ptr.h:207:7: error: deleted function 'std::unique_ptr<_Tp, _Tp_Deleter>::unique_ptr(const std::unique_ptr<_Tp, _Tp_Deleter>&) [with _Tp = CMapOperation, _Tp_Deleter = std::default_delete<CMapOperation>, std::unique_ptr<_Tp, _Tp_Deleter> = std::unique_ptr<CMapOperation>]'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/bits/stl_list.h:103:61: error: used here
make[2]: *** [lib/CMakeFiles/vcmi.dir/mapping/CMapEditManager.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/vcmi.dir/all] Error 2
make: *** [all] Error 2

Any help will be appriciaded :slight_smile:

I wasn’t aware that someone still uses gcc-4.5. Can you tell me what distribution you’re using?

I’ll try to fix this tomorrow - last time I checked compilation was fine at least with 4.6 but I haven’t tested 4.5 for a while. Probably something got broken over time :frowning:

Thanks for quick answer! The distro is a quite old Slackware (13.37). It might be good moment to upgrade gcc on my machine though :wink:

Hi. I’ve got same problems on OpenBSD amd64 with gcc-4.6.3 and 1.53.:

  8%] Building CXX object lib/CMakeFiles/vcmi.dir/logging/CLogger.cpp.o
cd /tmp/pobj/vcmi-0.93/build-amd64/lib && /tmp/pobj/vcmi-0.93/bin/c++   -DM_BIN_DIR=\"/usr/local/bin\" -DM_DATA_DIR=\"/usr/local/share/vcmi\" -DM_LIB_DIR=\"/usr/local/lib/vcmi\" -Dvcmi_EXPORTS -pthread -std=c++0x -Wall -Wextra -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter -Wno-overloaded-virtual -DNDEBUG -fPIC -I/tmp/pobj/vcmi-0.93/vcmi-0.93 -I/tmp/pobj/vcmi-0.93/vcmi-0.93/lib -I/usr/local/include -I/usr/local/include/SDL    -o CMakeFiles/vcmi.dir/logging/CLogger.cpp.o -c /tmp/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp
In file included from /usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/list:64:0,
                 from /usr/local/include/boost/algorithm/string/std/list_traits.hpp:15,
                 from /usr/local/include/boost/algorithm/string/std_containers_traits.hpp:20,
                 from /usr/local/include/boost/algorithm/string.hpp:18,
                 from /tmp/pobj/vcmi-0.93/vcmi-0.93/lib/../Global.h:98,
                 from /tmp/pobj/vcmi-0.93/vcmi-0.93/lib/StdInc.h:3,
                 from /tmp/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp:1:
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h: In constructor 'std::_List_node<_Tp>::_List_node(_Args&& ...) [with _Args = {const std::unique_ptr<ILogTarget>&}, _Tp = std::unique_ptr<ILogTarget>]':
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/ext/new_allocator.h:114:4:   instantiated from 'void __gnu_cxx::new_allocator<_Tp>::construct(__gnu_cxx::new_allocator<_Tp>::pointer, _Args&& ...) [with _Args = {const std::unique_ptr<ILogTarget>&}, _Tp = std::_List_node<std::unique_ptr<ILogTarget> >, __gnu_cxx::new_allocator<_Tp>::pointer = std::_List_node<std::unique_ptr<ILogTarget> >*]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:494:8:   instantiated from 'std::list<_Tp, _Alloc>::_Node* std::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const std::unique_ptr<ILogTarget>&}, _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >, std::list<_Tp, _Alloc>::_Node = std::_List_node<std::unique_ptr<ILogTarget> >]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1523:63:   instantiated from 'void std::list<_Tp, _Alloc>::_M_insert(std::list<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const std::unique_ptr<ILogTarget>&}, _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<std::unique_ptr<ILogTarget> >]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:988:9:   instantiated from 'void std::list<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >, std::list<_Tp, _Alloc>::value_type = std::unique_ptr<ILogTarget>]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1456:6:   instantiated from 'void std::list<_Tp, _Alloc>::_M_initialize_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = std::_List_const_iterator<std::unique_ptr<ILogTarget> >, _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:573:9:   instantiated from 'std::list<_Tp, _Alloc>::list(const std::list<_Tp, _Alloc>&) [with _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >, std::list<_Tp, _Alloc> = std::list<std::unique_ptr<ILogTarget> >]'
/usr/local/include/boost/foreach.hpp:575:9:   instantiated from 'boost::foreach_detail_::simple_variant<T>::simple_variant(const T&) [with T = std::list<std::unique_ptr<ILogTarget> >]'
/usr/local/include/boost/foreach.hpp:652:95:   instantiated from 'boost::foreach_detail_::auto_any<boost::foreach_detail_::simple_variant<T> > boost::foreach_detail_::contain(const T&, bool*) [with T = std::list<std::unique_ptr<ILogTarget> >]'
/tmp/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp:200:3:   instantiated from here
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:113:71: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = ILogTarget, _Dp = std::default_delete<ILogTarget>, std::unique_ptr<_Tp, _Dp> = std::unique_ptr<ILogTarget>]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/unique_ptr.h:256:7: error: declared here
/tmp/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp: In member function 'EConsoleTextColor::EConsoleTextColor CColorMapping::getColorFor(const CLoggerDomain&, ELogLevel::ELogLevel) const':
/tmp/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp:379:1: warning: control reaches end of non-void function -Wreturn-type]

I’ve got errors on Gentoo AMD64 with gcc-4.6.4 and boost-1.49 at revision 3419.

They can be fixed with

static_cast<bool>

The next I’ve got error:

Visual Studio is way too permissive. :confused:

The issues you describe should be fixed in r3420, please let me know if there are more. There are likely to be, AFAIR there was a number of boost::bind to CCallback usages, that should be now similarly replaces with lambdas.

@kirby

This looks unusual, why would

BOOST_FOREACH(auto & target, logger->targets)

be dependent on being able to copy elements of “logger->targets”?
Issue with BOOST_FOREACH? (would range-for work there?)

The errors in client/CCastleInterface.cpp still exists.

Right, I got only the last one.
Please check if replacing boost::bind with std::bind in the offending lines fixes the issue.
Not sure about boost but std::bind should work with st::shared_ptr. stackoverflow.com/a/13273253

Yep, it works but also requires to change boost’s placeholders to std’s.

Index: client/CCastleInterface.cpp
===================================================================
--- client/CCastleInterface.cpp	(revision 3420)
+++ client/CCastleInterface.cpp	(working copy)
@@ -767,7 +767,7 @@
 void CCastleBuildings::enterDwelling(int level)
 {
 	assert(level >= 0 && level < town->creatures.size());
-	GH.pushInt(new CRecruitmentWindow(town, level, town, boost::bind(&CCallback::recruitCreatures,LOCPLINT->cb,town,_1,_2,level), -87));
+	GH.pushInt(new CRecruitmentWindow(town, level, town, std::bind(&CCallback::recruitCreatures,LOCPLINT->cb,town,std::placeholders::_1,std::placeholders::_2,level), -87));
 }
 
 void CCastleBuildings::enterFountain(BuildingID building)
@@ -805,7 +805,7 @@
 		{
 			CFunctionList<void()> onYes = boost::bind(&CCastleBuildings::openMagesGuild,this);
 			CFunctionList<void()> onNo = onYes;
-			onYes += boost::bind(&CCallback::buyArtifact,LOCPLINT->cb, hero,ArtifactID::SPELLBOOK);
+			onYes += std::bind(&CCallback::buyArtifact,LOCPLINT->cb, hero,ArtifactID::SPELLBOOK);
 			std::vector<CComponent*> components(1, new CComponent(CComponent::artifact,0,0));
 
 			LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[214], onYes, onNo, true, components);
@@ -1053,7 +1053,7 @@
 		int offset = LOCPLINT->castleInt? (-87) : 0;
 
 		GH.pushInt(new CRecruitmentWindow(town, level, town, 
-		           boost::bind(&CCallback::recruitCreatures, LOCPLINT->cb, town, _1, _2, level), offset));
+		           std::bind(&CCallback::recruitCreatures, LOCPLINT->cb, town, std::placeholders::_1, std::placeholders::_2, level), offset));
 	}
 }
 
@@ -1691,7 +1691,7 @@
 	cancel = new CAdventureMapButton(text,"",boost::bind(&CBlacksmithDialog::close, this), 224, 312,"ICANCEL.DEF",SDLK_ESCAPE);
 
 	if(possible)
-		buy->callback += boost::bind(&CCallback::buyArtifact,LOCPLINT->cb,LOCPLINT->cb->getHero(hid),aid);
+		buy->callback += std::bind(&CCallback::buyArtifact,LOCPLINT->cb,LOCPLINT->cb->getHero(hid),aid);
 	else
 		buy->block(true);

Thank you for the information. I replaced that boost::bind occurrences with lambdas. Core language feature > template trickery. :wink:

I get error:

I think that I’ve fixed all cases like this - please recheck.

And since we’re talking about boost -> std changes, Tow, what do you think about replacing all “boost::bind” with “std::bind” and “OVERRIDE” with c++11 “override”?

Should be straightforward search & replace but not sure if replacing such amount of code is a good idea.

I’m all for it.

Visual 2012 has complete C++11 standard library (except for parts related to missing language features), so everything that works with GCC should be fine with VS.

I also think that we should somewhere document [eg. in wiki.vcmi.eu/index.php?title=Coding_guidelines ] what features sohuld be taken from Boost and what from std.
Generally we should prefer std but there are several caveats:

  • libstdc++ does not have complete support for C++11 library and does not document what was added when. For example, I remember that replacing boost::begin with std::begin caused issues with GCC 4.5.
  • boost may provide features that were only partially adopted into C++11. Examples: boost::thread and interruption mechanism, or shared_mutex.
  • MinGW apparently has its own issues. AVS reported that to_string (one of my favourite library additions) was broken till 4.8. [In that case I guess we could just bump version requirement for MinGW as soon as AVS upgrades to 4.8.]

I tend to prefer boost because I don’t test my code with GCC and I’m afraid to accidentally break compilation. I do cause you enough trouble anyway. :blush:

I’ve found implementation status here. But far from perfect - starts only with 4.6 and not up-to-date:
24.6.5 range access N
Meaning that std::begin/end is not present. But I can use it with my 4.6 at least for some simple cases.

gcc.gnu.org/onlinedocs/
See Standard C++ Library Manual

From the other side - I think now we may drop 4.5 without problems. All Linux distros I know about already have at least 4.6 and we already use several workarounds just to make 4.5 work.

It’s not as bad as it looks like - most of my compile fixes are either for 4.5 compatibility (especially most recent ones) or warning fixes to keep warning-free build.
And frankly most problematic issues are those that come from boost template magic - these error messages are so readable :frowning:

And on std vs boost:

shared_ptr + weak_ptr - std version already in use
type_traits - std version already in use
random generators - seems OK in std.
thread - keep boost for reasons you mentioned

function + ref + placeholders:
IIRC works OK but unlike boost placeholders these are in separate namespace. Bring in scope by “using namespace”?

unordered containers:
Destructor bug in MSVC. Can be used but only with VS 2012?
Affects other containers and probably boost but emplace member present in some of those is not implemented in gcc. As result it is impossible to use unique_ptr in containers.

foreach:
can be used but only with gcc 4.6 and VS 2012.

regex:
not used in vcmi but I’d rather mention this anyway. Completely nonfunctional in gcc at this point :frowning:

Good find, thanks.

Ok.

With VS 2012 unordered container should work fine.

Uhm… I’m not sure what have you meant here.

Good. On the Windows side we can safely drop Visual 2010. All developers I know of use Visual 2012.

Unfortunately Microsoft failed to deliver more C++11 for VC11, so going for GCC 4.6 and VC 2012 gives us only:

  • nullptr
  • range-based for loop (we should run find&replace for all BOOST_FOREACH)
  • strongly typed enums and forward declarations for them

Still nice to have, should simplify some code.

Microsoft will release preview version of Visual 2013 (they say they expect it to be “production quality” but I’d take that declarations with a grain of salt) with more C++11 within a few days. I’m pretty eager to kill VS 2012 relatively soon, if that gets me uniform initialization, variadic templates and so on.

So to sum up:
Prefer Boost.Thread, Boost.Regex and boost::begin/boost::end. Otherwise std constructs should be prefered when available. Am I correct?

Just rechecked and it seems to work at least with my versions of gcc/stdlibc++. So it looks like this is not a problem anymore

What I’ve been talking about is code like this:

std::map<int, std::unique_ptr<int>> container;
container.insert(std::make_pair(3, std::unique_ptr<int>(new int(10))));

With C++03 this would create copy of pair to insert. But unique_ptr can’t be copy-constructed resulting in compile error.

With C++11 insert can move element into container and containers have “emplace” method for in-place construction. Previously neither of these two methods were available in gcc.

Looks to be so.
Not sure on begin/end. They’re available in gcc-4.6 but implementation status says that they should not be present. Outdated documentation?

BTW: found some differences between boost::bind and std::bind:

  1. Unlike boost::bind overloaded functions can’t be resolved - you need to specify full function signature in std::bind. Does not adds to readability but can be avoided by 1-line lambdas or by removing overload.

  2. std::bind does not have overloads for compatison operators. Something like this no longer works with std::bind:

std::bind(&CTradeableItem::serial, _1) == selected->serial

First part committed. Currently still compatible with gcc 4.5 and (presumably) VS 2010.

Unless there will be objections in a few days I’ll commit second part with stuff that will break older compilers:

  • switch to std::unordered containers
  • c++11 foreach
  • std::begin/end (if it will work correctly in gcc 4.6)

gcc-4.6

Looks like I forgot about disabled by default ERM. Will fix soon.

Hi. Still fails on OpenBSD (revision 3431) with the same error:

  8%] Building CXX object lib/CMakeFiles/vcmi.dir/logging/CLogger.cpp.o
cd /usr/ports/pobj/vcmi-0.93/build-amd64/lib && /usr/ports/pobj/vcmi-0.93/bin/c++   -DM_BIN_DIR=\"/usr/local/bin\" -DM_DATA_DIR=\"/usr/local/share/vcmi\" -DM_LIB_DIR=\"/usr/local/lib/vcmi\" -Dvcmi_EXPORTS -pthread -std=c++0x -Wall -Wextra -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter -Wno-overloaded-virtual -DNDEBUG -fPIC -I/usr/ports/pobj/vcmi-0.93/vcmi-0.93 -I/usr/ports/pobj/vcmi-0.93/vcmi-0.93/lib -I/usr/local/include -I/usr/local/include/SDL    -o CMakeFiles/vcmi.dir/logging/CLogger.cpp.o -c /usr/ports/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp
In file included from /usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/list:64:0,
                 from /usr/local/include/boost/algorithm/string/std/list_traits.hpp:15,
                 from /usr/local/include/boost/algorithm/string/std_containers_traits.hpp:20,
                 from /usr/local/include/boost/algorithm/string.hpp:18,
                 from /usr/ports/pobj/vcmi-0.93/vcmi-0.93/lib/../Global.h:98,
                 from /usr/ports/pobj/vcmi-0.93/vcmi-0.93/lib/StdInc.h:3,
                 from /usr/ports/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp:1:
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h: In constructor 'std::_List_node<_Tp>::_List_node(_Args&& ...) [with _Args = {const std::unique_ptr<ILogTarget>&}, _Tp = std::unique_ptr<ILogTarget>]':
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/ext/new_allocator.h:114:4:   instantiated from 'void __gnu_cxx::new_allocator<_Tp>::construct(__gnu_cxx::new_allocator<_Tp>::pointer, _Args&& ...) [with _Args = {const std::unique_ptr<ILogTarget>&}, _Tp = std::_List_node<std::unique_ptr<ILogTarget> >, __gnu_cxx::new_allocator<_Tp>::pointer = std::_List_node<std::unique_ptr<ILogTarget> >*]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:494:8:   instantiated from 'std::list<_Tp, _Alloc>::_Node* std::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const std::unique_ptr<ILogTarget>&}, _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >, std::list<_Tp, _Alloc>::_Node = std::_List_node<std::unique_ptr<ILogTarget> >]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1523:63:   instantiated from 'void std::list<_Tp, _Alloc>::_M_insert(std::list<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const std::unique_ptr<ILogTarget>&}, _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >, std::list<_Tp, _Alloc>::iterator = std::_List_iterator<std::unique_ptr<ILogTarget> >]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:988:9:   instantiated from 'void std::list<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >, std::list<_Tp, _Alloc>::value_type = std::unique_ptr<ILogTarget>]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:1456:6:   instantiated from 'void std::list<_Tp, _Alloc>::_M_initialize_dispatch(_InputIterator, _InputIterator, std::__false_type) [with _InputIterator = std::_List_const_iterator<std::unique_ptr<ILogTarget> >, _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:573:9:   instantiated from 'std::list<_Tp, _Alloc>::list(const std::list<_Tp, _Alloc>&) [with _Tp = std::unique_ptr<ILogTarget>, _Alloc = std::allocator<std::unique_ptr<ILogTarget> >, std::list<_Tp, _Alloc> = std::list<std::unique_ptr<ILogTarget> >]'
/usr/local/include/boost/foreach.hpp:575:9:   instantiated from 'boost::foreach_detail_::simple_variant<T>::simple_variant(const T&) [with T = std::list<std::unique_ptr<ILogTarget> >]'
/usr/local/include/boost/foreach.hpp:652:95:   instantiated from 'boost::foreach_detail_::auto_any<boost::foreach_detail_::simple_variant<T> > boost::foreach_detail_::contain(const T&, bool*) [with T = std::list<std::unique_ptr<ILogTarget> >]'
/usr/ports/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp:200:3:   instantiated from here
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/stl_list.h:113:71: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = ILogTarget, _Dp = std::default_delete<ILogTarget>, std::unique_ptr<_Tp, _Dp> = std::unique_ptr<ILogTarget>]'
/usr/local/lib/gcc/x86_64-unknown-openbsd5.3/4.6.3/../../../../include/c++/4.6.3/bits/unique_ptr.h:256:7: error: declared here
/usr/ports/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp: In member function 'EConsoleTextColor::EConsoleTextColor CColorMapping::getColorFor(const CLoggerDomain&, ELogLevel::ELogLevel) const':
/usr/ports/pobj/vcmi-0.93/vcmi-0.93/lib/logging/CLogger.cpp:379:1: warning: control reaches end of non-void function -Wreturn-type]
*** Error 1 in . (lib/CMakeFiles/vcmi.dir/build.make:289 'lib/CMakeFiles/vcmi.dir/logging/CLogger.cpp.o')
*** Error 1 in . (CMakeFiles/Makefile2:79 'lib/CMakeFiles/vcmi.dir/all')
*** Error 1 in /usr/ports/pobj/vcmi-0.93/build-amd64 (Makefile:137 'all')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2648 '/usr/ports/pobj/vcmi-0.93/build-amd64/.build_done')
*** Error 1 in /usr/home/kirby/mystuff/games/vcmi (/usr/ports/infrastructure/mk/bsd.port.mk:2372 'all')
d5.3/4.6.3/../../../../include/c++/4.6.3/bits/unique_ptr.h