|
Boost Users : |
Subject: [Boost-users] [MPI] missing symbols using serialization's static library design
From: Barrett, Brian W (bwbarre_at_[hidden])
Date: 2012-10-12 16:28:54
Hello all -
On Mac OS X Lion, we're seeing errors when linking our application using
Boost.MPI. The application is rather large and uses Boost.Serialization
for both checkpoint/restart and MPI communication. The checkpoint/restart
bits made serialization a bit of a disaster in terms of compile times (due
to headers including basically every other header in the project). To
solve that problem, we followed the Boost.Serialization advice on static
libraries, and all is good.
Except that on Lion (and possibly elsewhere, but definitely on Lion) using
the gcc front-end (i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on
Apple Inc. build 5658) (LLVM build 2336.11.00)), we're seeing link
failures due to serialization calls for MPI archivers not being found when
compiling with -O2 or higher on Boost 1.50.0 and 1.51.0:
CXXLD sst.x
Undefined symbols for architecture x86_64:
"void
SST::Introspector::serialize<boost::mpi::packed_iarchive>(boost::mpi::packe
d_iarchive&, unsigned int)", referenced from:
boost::archive::detail::iserializer<boost::mpi::packed_iarchive,
SST::Introspector>::load_object_data(boost::archive::detail::basic_iarchive
&, void*, unsigned int) const in introspectedComponent.o
boost::archive::detail::iserializer<boost::mpi::packed_iarchive,
SST::Introspector>::load_object_data(boost::archive::detail::basic_iarchive
&, void*, unsigned int) consti n simulation.o
While I could simply explicitly insatiate the missing archivers, that
seems like a bad idea for something in the detail namespace and it appears
that the list of archivers I'd need to instantiate has changed over time.
Is there a better solution to the problem?
There's a test case the exhibits the problem available here on our Google
code project bug tracker. It's essentially the Boost.Serialization
demo_pimpl example, but using MPI instead of a text archiver. The code is
at:
http://sst-simulator.googlecode.com/issues/attachment?aid=280000000&name=mp
i_serialization_test.tar.gz&token=1MTkBuFrhrfUUAZRZYH3kZrElIg%3A13500682075
60
Thanks,
Brian
-- Brian W. Barrett Scalable System Software Group Sandia National Laboratories
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