error: 'virtual Ship::~Ship()' is protected within...context

Questions, problems and discussion about compiling FreeOrion.
Post Reply
Message
Author
Ophiuchus
Vacuum Dragon
Posts: 506
Joined: Tue Sep 30, 2014 10:01 am

error: 'virtual Ship::~Ship()' is protected within...context

#1 Post by Ophiuchus » Mon Aug 22, 2016 1:58 pm

I'm trying to build 0.4.5+, the git master HEAD, on a current debian stretch (actually inside a docker container) . Dependencies and build environment I got from the debian repos (using "apt-get build-dep -y freeorion").

Build starts fine, but gets killed by multiple errors for destructors like the following.

Code: Select all

[ 22%] Building CXX object CMakeFiles/freeorioncommon.dir/util/SerializeUniverse.cpp.o
In file included from /usr/include/boost/archive/detail/interface_iarchive.hpp:22:0,
                 from /usr/include/boost/archive/detail/common_iarchive.hpp:23,
                 from /usr/include/boost/archive/basic_binary_iarchive.hpp:30,
                 from /usr/include/boost/archive/binary_iarchive_impl.hpp:21,
                 from /usr/include/boost/archive/binary_iarchive.hpp:20,
                 from /freeorion_sources/util/Serialize.h:4,
                 from /freeorion_sources/util/SerializeUniverse.cpp:1:
/usr/include/boost/archive/detail/iserializer.hpp: In instantiation of 'static void boost::archive::detail::heap_allocation<T>::doesnt_have_new_operator::invoke_delete(T*) [with T = Ship]':
/usr/include/boost/archive/detail/iserializer.hpp:265:33:   required from 'static void boost::archive::detail::heap_allocation<T>::invoke_delete(T*) [with T = Ship]'
/usr/include/boost/archive/detail/iserializer.hpp:273:26:   required from 'boost::archive::detail::heap_allocation<T>::~heap_allocation() [with T = Ship]'
/usr/include/boost/archive/detail/iserializer.hpp:294:36:   required from 'void* boost::archive::detail::pointer_iserializer<Archive, T>::heap_allocation() const [with Archive = boost::archive::binary_iarchive; T = Ship]'
/freeorion_sources/util/SerializeUniverse.cpp:351:133:   required from here
/usr/include/boost/archive/detail/iserializer.hpp:246:17: error: 'virtual Ship::~Ship()' is protected within this context
Any ideas? Help appreciated!
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
adrian_broher
Programmer
Posts: 1072
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: error: 'virtual Ship::~Ship()' is protected within...con

#2 Post by adrian_broher » Mon Aug 22, 2016 2:03 pm

I'm trying to build 0.4.5+, the git master HEAD, on a current debian stretch (actually inside a docker container) . Dependencies and build environment I got from the debian repos (using "apt-get build-dep -y freeorion").
HEAD is a relative term. The issue was just fixed a few hours ago when with #887. Please try again after fetching commit 5a3c309 or a later commit.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

Post Reply