Re: [Boost-bugs] [Boost C++ Libraries] #10310: serialization/smart_cast.hpp uses dynamic_cast and breaks non-RTTI builds

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10310: serialization/smart_cast.hpp uses dynamic_cast and breaks non-RTTI builds
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-05 08:00:05


#10310: serialization/smart_cast.hpp uses dynamic_cast and breaks non-RTTI builds
--------------------------------------------+---------------------------
  Reporter: Mika Fischer <mika.fischer@…> | Owner: ramey
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------------------+---------------------------

Comment (by Mika Fischer <mika.fischer@…>):

 Well, with 1.55.0, the existing test case (test_no_rtti.cpp) already
 triggers this bug (and #8400) ''if it is compiled without RTTI''. So
 getting the existing test case to work when RTTI is disabled in the
 compiler would probably go a long way towards fixing the existing issues
 with RTTI.

 I'm pretty sure #10280 is also triggered by the test case, but with
 1.56.0, it does not compile for me
 {{{
 % g++ test_no_rtti.cpp polymorphic_{base.cpp,derived1.cpp,derived2.cpp}
 /shared/distlibs/dists/arch-
 glibc2.19-gcc4.9.1-x86_64/boost_1_56_0/lib/libboost_{serialization.a,system.a,filesystem.a}
 /tmp/cc15E2ee.o: In function
 `boost::archive::text_iarchive::text_iarchive(std::istream&, unsigned
 int)':
 test_no_rtti.cpp:(.text._ZN5boost7archive13text_iarchiveC2ERSij[_ZN5boost7archive13text_iarchiveC5ERSij]+0x36):
 undefined reference to
 `boost::archive::detail::shared_ptr_helper::shared_ptr_helper()'
 /tmp/cc15E2ee.o: In function
 `boost::archive::text_iarchive::~text_iarchive()':
 test_no_rtti.cpp:(.text._ZN5boost7archive13text_iarchiveD2Ev[_ZN5boost7archive13text_iarchiveD5Ev]+0x24):
 undefined reference to
 `boost::archive::detail::shared_ptr_helper::~shared_ptr_helper()'
 collect2: error: ld returned 1 exit status
 }}}

 We have decided not to pursue boost serialization without RTTI any further
 at this time. Buf if you have specific questions or requests, I'll see
 what I can do to help.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10310#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC