Boost C++ Libraries: Ticket #7558: MPI missing symbols using serialization's static library design https://svn.boost.org/trac10/ticket/7558 <p> 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. </p> <p> 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: </p> <blockquote> <p> CXXLD sst.x </p> </blockquote> <p> Undefined symbols for architecture x86_64: </p> <blockquote> <p> "void SST::Introspector::serialize&lt;boost::mpi::packed_iarchive&gt;(boost::mpi::packed_iarchive&amp;, unsigned int)", referenced from: </p> <blockquote> <p> boost::archive::detail::iserializer&lt;boost::mpi::packed_iarchive, </p> </blockquote> </blockquote> <p> SST::Introspector&gt;::load_object_data(boost::archive::detail::basic_iarchive &amp;, void*, unsigned int) const in introspectedComponent.o </p> <blockquote> <p> boost::archive::detail::iserializer&lt;boost::mpi::packed_iarchive, </p> </blockquote> <p> SST::Introspector&gt;::load_object_data(boost::archive::detail::basic_iarchive &amp;, void*, unsigned int) consti n simulation.o </p> <p> While I could simply explicitly instantiate 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. The mailing list suggested that this sounded like a bug and that I should file a bug report. </p> <p> I've attached a test case that shows the problem. It's essentially the Boost.Serialization demo_pimpl example, but using MPI instead of a text archiver. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7558 Trac 1.4.3 Brian Barrett <bwbarre@…> Tue, 23 Oct 2012 16:02:09 GMT attachment set https://svn.boost.org/trac10/ticket/7558 https://svn.boost.org/trac10/ticket/7558 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">mpi_serialization_test.tar.gz</span> </li> </ul> Ticket Matthias Troyer Tue, 01 Jan 2013 11:26:28 GMT owner changed https://svn.boost.org/trac10/ticket/7558#comment:1 https://svn.boost.org/trac10/ticket/7558#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Douglas Gregor</span> to <span class="trac-author">Matthias Troyer</span> </li> </ul> <p> What do you mean by "we followed the Boost.Serialization advice on static libraries?" Did you explicitly instantiate the serialization function for some of the archives in Boost.Serialization? If so then this is expected since Boost.MPI provides additional archive types. </p> Ticket