[cctbxbb] Using iotbx.pdb as C++ only dynamic (shared) library

vanv0059 at umn.edu vanv0059 at umn.edu
Mon Dec 12 15:01:25 PST 2011


I've been thinking about the issue I raised. Is it possible that the cause 
of my problem is including two different copies of boost::shared_ptr? That 
is, iotbx has its own copy of boost::shared_ptr and I have been including 
boost::shared_ptr from a recent download of boost 1.48.0.

Here is gdb output -- notice that the non-cctbx copy of boost is trying to 
manage a smart_ptr.
Program received signal SIGSEGV, Segmentation fault.
0x000000000040cc17 in std::vector<iotbx::pdb::hierarchy::model, 
std::allocator<iotbx::pdb::hierarchy::model> >::~vector (this=0x12, 
__in_chrg=<optimized out>)
    at /usr/include/c++/4.3/bits/stl_vector.h:300
300 { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
(gdb) where
#0 0x000000000040cc17 in std::vector<iotbx::pdb::hierarchy::model, 
std::allocator<iotbx::pdb::hierarchy::model> >::~vector (this=0x12,
    __in_chrg=<optimized out>) at /usr/include/c++/4.3/bits/stl_vector.h:300
#1  0x0000000000414d32 in iotbx::pdb::hierarchy::root_data::~root_data (
    this=0x2, __in_chrg=<optimized out>)
    at 
/website/drugsite-test.msi.umn.edu/local/src/cctbx_sources/iotbx/pdb/hierarchy.h:99
#2 0x0000000000414de2 in 
boost::checked_delete<iotbx::pdb::hierarchy::root_data> (x=0x2)
    at 
/website/drugsite-test.msi.umn.edu/local/boost/boost/checked_delete.hpp:34
#3 0x0000000000414f39 in 
boost::detail::sp_counted_impl_p<iotbx::pdb::hierarchy::root_data>::dispose 
(this=0x7ec840)
    at 
/website/drugsite-test.msi.umn.edu/local/boost/boost/smart_ptr/detail/sp_counted_impl.hpp:78
#4  0x0000000000404cae in boost::detail::sp_counted_base::release (
    this=0x7ec840)
    at 
/website/drugsite-test.msi.umn.edu/local/boost/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:145
#5  0x0000000000404cf4 in boost::detail::shared_count::~shared_count (
    this=0x7fffffffd978, __in_chrg=<optimized out>)
    at 
/website/drugsite-test.msi.umn.edu/local/boost/boost/smart_ptr/detail/shared_count.hpp:305
#6 0x0000000000404e1d in 
boost::shared_ptr<iotbx::pdb::hierarchy::root_data>::~shared_ptr 
(this=0x7fffffffd970, __in_chrg=<optimized out>)
    at 
/website/drugsite-test.msi.umn.edu/local/boost/boost/smart_ptr/shared_ptr.hpp:165
#7  0x000000000040507b in iotbx::pdb::hierarchy::root::~root (
    this=0x7fffffffd970, __in_chrg=<optimized out>)
    at 
/website/drugsite-test.msi.umn.edu/local/src/cctbx_sources/iotbx/pdb/hierarchy.h:1298
#8  0x000000000040d2ed in FooBar::~FooBar (this=0x7fffffffd960, 
    __in_chrg=<optimized out>) at test_iotbx.C:98
#9  0x00000000004046a2 in main (argc=1, argv=0x7fffffffdce8)
    at test_iotbx.C:375


Are there any local edits to the copy of boost used by cctbx? In short, if 
I get the same revision as the listed for cctbx_sources/boost/TAG, can I 
substitute/overwrite the cctbx_sources/boost directory?

--Jeff



More information about the cctbxbb mailing list