Boost logo

Boost Users :

Subject: [Boost-users] 1.57.0 link errors (missing ctor/dtor for boost::archive::detail::shared_ptr_helper)
From: David Abdurachmanov (david.abdurachmanov_at_[hidden])
Date: 2014-11-13 04:07:07


Hi,

I am moving to Boost 1.57.0 and having issues with some code related to serialization.

https://github.com/cms-sw/cmssw/blob/CMSSW_7_3_X/CondFormats/Serialization/interface/eos/portable_oarchive.hpp
https://github.com/cms-sw/cmssw/blob/CMSSW_7_3_X/CondFormats/Serialization/interface/eos/portable_iarchive.hpp

In both cases the problem is here:

#if BOOST_VERSION >= 103500
#include <boost/archive/shared_ptr_helper.hpp>
#endif

[snip]

#if BOOST_VERSION >= 103500
// mix-in helper class for serializing shared_ptr
, public boost::archive::detail::shared_ptr_helper
#endif

A similar (or the same) problem is reported here: http://boost.2283326.n4.nabble.com/Serialization-link-error-in-1-56-td4666838.html#a4666853

It seems that ctor/dtor are not exported anymore:

/testSerializationDQMObjects.o: In function `eos::portable_oarchive::portable_oarchive(std::ostream&
, unsigned int)':
testSerializationDQMObjects.cpp:(.text._ZN3eos17portable_oarchiveC2ERSoj[_ZN3eos17portable_oarchiveC5ERSoj]+0x54): undefined reference to `boost::archive::detail::shared_ptr_helper:
:shared_ptr_helper()'
testSerializationDQMObjects.cpp:(.text._ZN3eos17portable_oarchiveC2ERSoj[_ZN3eos17portable_oarchiveC5ERSoj]+0x1c1): undefined reference to `boost::archive::detail::shared_ptr_helper
::~shared_ptr_helper()'

boost::serialization::shared_ptr_helper does not seem to be a drop-in replacement at first look.

There is also 'shared_ptr_helper_base', but is only available in the implementation file.

Is such mix-in class still available in a new Boost version?

Thanks,
david




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net