#10348 closed Bugs (fixed)
Compilation failure in shared_ptr_helper.hpp
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | Boost 1.57.0 | Component: | serialization |
Version: | Boost 1.56.0 | Severity: | Problem |
Keywords: | Cc: |
Description
As part of the Chaste simulator (https://chaste.cs.ox.ac.uk/trac) we use boost serialization, and test compatibility with multiple versions of Boost (1.40-1.55 inclusive).
We tested it out with the new boost 1.56, but got the following compiler error:
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<SPT>::non_polymorphic::get_object_type(U&)': /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 '>' 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<SPT>::polymorphic::get_object_type(U&)': /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 '>' 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<SPT>::reset(SPT<T>&, 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
I fixed this with two new boost #includes in boost/serialization/shared_ptr_helper.hpp
, to include files in the serialization library that are mentioned in this file, but not #included.
So I've submitted a pull request on github to fix it.
(sorry, trac wouldn't let me create a ticket with links to the pull request)
Change History (6)
comment:1 by , 8 years ago
comment:3 by , 8 years ago
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.
comment:4 by , 8 years ago
it is my practice to merge serialization library develop branch into the master branch before shipping of the next release.
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.
comment:5 by , 8 years ago
For me as a freeorion contributor, yes. I did try that and it works.
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?
comment:6 by , 8 years ago
this has been checked into the develop branch - will appear in the next boost release
Link to github request: https://github.com/boostorg/serialization/pull/3