Boost C++ Libraries: Ticket #10348: Compilation failure in shared_ptr_helper.hpp https://svn.boost.org/trac10/ticket/10348 <p> As part of the Chaste simulator (<a class="ext-link" href="https://chaste.cs.ox.ac.uk/trac"><span class="icon">​</span>https://chaste.cs.ox.ac.uk/trac</a>) we use boost serialization, and test compatibility with multiple versions of Boost (1.40-1.55 inclusive). </p> <p> We tested it out with the new boost 1.56, but got the following compiler error: </p> <pre class="wiki">In file included from /home/lofty/boost_1_56/include/boost/serialization/shared_ptr.hpp:28, from linalg/src/LinearSystem.hpp:50, from ./linalg/test/TestChebyshevIteration.hpp:40, from linalg/build/debug_hostconfig,boost=1-56/TestChebyshevIterationRunner.cpp:21: /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp: In static member function static const boost::serialization::extended_type_info* boost::serialization::shared_ptr_helper&lt;SPT&gt;::non_polymorphic::get_object_type(U&amp;)': /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:107: error: 'singleton' is not a member of 'boost::serialization' /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:110: error: expected '(' before '&gt;' token /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:110: error: '::get_const_instance' has not been declared /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp: In static member function 'static const boost::serialization::extended_type_info* boost::serialization::shared_ptr_helper&lt;SPT&gt;::polymorphic::get_object_type(U&amp;)': /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:117: error: 'singleton' is not a member of 'boost::serialization' /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:120: error: expected '(' before '&gt;' token /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:120: error: '::get_const_instance' has not been declared /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp: In member function 'void boost::serialization::shared_ptr_helper&lt;SPT&gt;::reset(SPT&lt;T&gt;&amp;, T*)': /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:152: error: invalid use of incomplete type 'const struct boost::serialization::extended_type_info' /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:42: error: forward declaration of 'const struct boost::serialization::extended_type_info' /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:167: error: invalid use of incomplete type 'const struct boost::serialization::extended_type_info' /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:42: error: forward declaration of 'const struct boost::serialization::extended_type_info' /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:168: error: invalid use of incomplete type 'const struct boost::serialization::extended_type_info' /home/lofty/boost_1_56/include/boost/serialization/shared_ptr_helper.hpp:42: error: forward declaration of 'const struct boost::serialization::extended_type_info' scons: *** [linalg/build/debug_hostconfig,boost=1-56/TestChebyshevIterationRunner.o] Error 1 </pre><p> I fixed this with two new boost #includes in <code>boost/serialization/shared_ptr_helper.hpp</code>, to include files in the serialization library that are mentioned in this file, but not #included. </p> <p> So I've submitted a pull request on github to fix it. </p> <p> (sorry, trac wouldn't let me create a ticket with links to the pull request) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10348 Trac 1.4.3 Gary Mirams <gary.mirams@…> Tue, 12 Aug 2014 13:15:54 GMT <link>https://svn.boost.org/trac10/ticket/10348#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10348#comment:1</guid> <description> <p> Link to github request: <a class="ext-link" href="https://github.com/boostorg/serialization/pull/3"><span class="icon">​</span>https://github.com/boostorg/serialization/pull/3</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Tue, 12 Aug 2014 16:06:59 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10348#comment:2 https://svn.boost.org/trac10/ticket/10348#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> fixed in develop branch </p> Ticket cassfalg Sat, 13 Sep 2014 21:33:32 GMT <link>https://svn.boost.org/trac10/ticket/10348#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10348#comment:3</guid> <description> <p> Could this fix be included in boost 1.56? I am not sure what your release cycles are, but I am trying to compile freeorion on arch linux, which currently does not work. Arch ships boost 1.56, but freeorion does not compile with boost 1.56. This is one of the issues, and one which the freeorion devs can't really fix. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Sat, 13 Sep 2014 21:37:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10348#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10348#comment:4</guid> <description> <p> it is my practice to merge serialization library develop branch into the master branch before shipping of the next release. </p> <p> If this is not soon enough for you, it's easy to update your own copy of boost by hand, it's only adding of couple of include statements. Look at the history of the develop branch on github. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>cassfalg</dc:creator> <pubDate>Sun, 28 Sep 2014 21:27:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10348#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10348#comment:5</guid> <description> <p> For me as a freeorion contributor, yes. I did try that and it works. </p> <p> For me providing a package for Arch Linux, not so much. I can hardly patch a system library within a unofficial, community provided AUR Package for a Game. Even if it's just to add 2 missing includes. What's the time frame for the next release which fixes this? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 28 Sep 2014 21:29:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10348#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10348#comment:6</guid> <description> <p> this has been checked into the develop branch - will appear in the next boost release </p> </description> <category>Ticket</category> </item> </channel> </rss>