boost serialisation, just including shared_ptr.hpp causes compile error on Linux/gcc 4.5
I did not see boost serialisation in the list of lib that had changed. So its surprising that it now broken ? It appears simply including it cause problems #include <boost/serialization/shared_ptr.hpp> cause gcc.compile.c++ bin/gcc-4.5/debug/test/TestStr.o In file included from /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr.hpp:28:0, from test/TestStr.cpp:27: /var/tmp/ma0/boost/boost_1_56_0/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&)’: /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:107:22: error: ‘singleton’ is not a member of ‘boost::serialization’ /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:110:13: error: expected ‘(’ before ‘>’ token /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:110:14: error: ‘::get_const_instance’ has not been declared /var/tmp/ma0/boost/boost_1_56_0/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&)’: /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:117:20: error: ‘singleton’ is not a member of ‘boost::serialization’ /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:120:13: error: expected ‘(’ before ‘>’ token /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:120:14: error: ‘::get_const_instance’ has not been declared /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp: In member function ‘void boost::serialization::shared_ptr_helper<SPT>::reset(SPT<T>&, T*)’: /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:152:30: error: invalid use of incomplete type ‘const struct boost::serialization::extended_type_info’ /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:42:7: error: forward declaration of ‘const struct boost::serialization::extended_type_info’ /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:167:30: error: invalid use of incomplete type ‘const struct boost::serialization::extended_type_info’ /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:42:7: error: forward declaration of ‘const struct boost::serialization::extended_type_info’ /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:168:30: error: invalid use of incomplete type ‘const struct boost::serialization::extended_type_info’ /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:42:7: error: forward declaration of ‘const struct boost::serialization::extended_type_info’ "g++" -ftemplate-depth-128 -fPIC -O0 -fno-inline -Wall -g -fPIC -DDEBUG -I"../ACore/src" -I"/var/tmp/ma0/boost/boost_1_56_0" -c -o "bin/gcc-4.5/debug/test/TestStr.o" "test/TestStr.cpp" Are there any workarounds ? Ta, Avi
Hi Avi, as this is a users question, I do not answer on Boost.Build. Am Montag, 18. August 2014, 15:59:12 schrieb avib369 .:
I did not see boost serialisation in the list of lib that had changed. So its surprising that it now broken ?
A glitch that the unit tests did not catch.
It appears simply including it cause problems
#include <boost/serialization/shared_ptr.hpp>
Are there any workarounds ?
Get this commit from GitHub: ---------------- commit c13b89c8f9528a15ff3bbb5ccc039493e7e0155e Author: Robert Ramey <ramey@rrsd.com> Date: Tue Aug 12 09:05:54 2014 -0700 added missing headers to shared_ptr_helper. note - failed to show up in tests. probably included superfluously in other headers. ------ https://github.com/boostorg/serialization/commit/c13b89c8f9528a15ff3bbb5ccc0... Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany
On 08/18/2014 06:59 PM, avib369 . wrote:
I did not see boost serialisation in the list of lib that had changed. So its surprising that it now broken ?
It appears simply including it cause problems
#include <boost/serialization/shared_ptr.hpp>
cause
gcc.compile.c++ bin/gcc-4.5/debug/test/TestStr.o In file included from /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr.hpp:28:0, from test/TestStr.cpp:27: /var/tmp/ma0/boost/boost_1_56_0/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&)’: /var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:107:22: error: ‘singleton’ is not a member of ‘boost::serialization’
Hi Avi, this question is probably more on-topic for boost-users or boost-devel mailing list, as opposed to boost-build. HTH, Volodya
It looks like a missing header. Does this address it? https://svn.boost.org/trac/boost/ticket/10348 If not- can you post the code? Robert Ramey -- View this message in context: http://boost.2283326.n4.nabble.com/boost-serialisation-just-including-shared... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (4)
-
avib369 .
-
Jürgen Hunold
-
Robert Ramey
-
Vladimir Prus