Binary package hint: libboost-dev
Boost.MultiIndex, which is packaged in libboost-dev, depends on Boost.Serialization, which is packaged separately as libboost-serialization-dev, but the latter is only recommended by the former. This means that installing most of the Boost development libraries using the --without-recommends switch opens the user up to encountering this problem.
I came across this bug compiling Battle for Wesnoth, but that is not really important. I installed libboost-iostreams-dev without the recommends, which pulls in libboost-dev and libboost-regex-dev. I'm on Jaunty 64-bit, but a brief look on packages.ubuntu.com shows this problem is present in all Ubuntu versions. Here are the main errors (I exclude the various errors that follow as a result of these):
In file included from /usr/include/boost/multi_index/detail/node_type.hpp:23,
from /usr/include/boost/multi_index/detail/index_base.hpp:21,
from /usr/include/boost/multi_index/detail/base_type.hpp:21,
from /usr/include/boost/multi_index_container.hpp:33,
from src/ai/../shared_object.hpp:19,
from src/ai/../tstring.hpp:18,
from src/ai/../config.hpp:41,
from src/ai/configuration.hpp:25,
from src/game.cpp:25:
/usr/include/boost/multi_index/detail/index_node_base.hpp:22:42: error: boost/serialization/access.hpp: No such file or directory
In file included from /usr/include/boost/multi_index/detail/index_base.hpp:27,
from /usr/include/boost/multi_index/detail/base_type.hpp:21,
from /usr/include/boost/multi_index_container.hpp:33,
from src/ai/../shared_object.hpp:19,
from src/ai/../tstring.hpp:18,
from src/ai/../config.hpp:41,
from src/ai/configuration.hpp:25,
from src/game.cpp:25:
/usr/include/boost/multi_index/detail/index_loader.hpp:21:39: error: boost/serialization/nvp.hpp: No such file or directory
In file included from /usr/include/boost/multi_index_container.hpp:46,
from src/ai/../shared_object.hpp:19,
from src/ai/../tstring.hpp:18,
from src/ai/../config.hpp:41,
from src/ai/configuration.hpp:25,
from src/game.cpp:25:
/usr/include/boost/multi_index/detail/archive_constructed.hpp:19:49: error: boost/serialization/serialization.hpp: No such file or directory
In file included from src/ai/../shared_object.hpp:19,
from src/ai/../tstring.hpp:18,
from src/ai/../config.hpp:41,
from src/ai/configuration.hpp:25,
from src/game.cpp:25:
/usr/include/boost/multi_index_container.hpp:48:48: error: boost/serialization/split_member.hpp: No such file or directory
Now, upon searching, I found a similar bug marked as invalid as not enough information (the submitter incorrectly identified the problem anyway):
https://bugs.launchpad.net/ubuntu/+source/boost/+bug/159983
But a more relevant bug report is present in Debian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553281
As discussed in the Debian report, there is no easy fix for this. Making libboost-dev depend on libboost-serialization-dev causes a circular dependency. The best solution, in my opinion, is collapsing Boost.Serialization into the main libboost-dev package. The Debian maintainer that responded to the report rejected this on grounds that "there is some utility to keep the shared lib packages separate" though he doesn't elaborate.
Of course the workarounds for this are extremely simple - don't use --without-recommends being one of them. There is a closed bug report in Boost about this (even though how it is packaged is not up to them), and the workaround for developers is to invoke the BOOST_MULTI_INDEX_DISABLE_SERIALIZATION macro:
https://svn.boost.org/trac/boost/ticket/3580
This is my first bug report so please let me know if there is anything amiss. Thanks.
Status changed to 'Confirmed' because the bug affects multiple users.