Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3580 closed Bugs (wontfix)

Boost.MultiIndex depends on Boost.Serialization

Reported by: Leandro Lucarella <llucax@…> Owned by: Joaquín M López Muñoz
Milestone: Boost 1.41.0 Component: multi_index
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc: llucarella@…

Description

This is a problem very similar to #1027, but with Boost.MultiIndex instead of PtrContainer.

If I include this file:

#include <boost/multi_index/ordered_index.hpp>

I get a compiler error because some headers of Boost.Serialization can't be found (I use the Debian packages and I didn't installed the libboost-serialization package because I don't use serialization).

I think the fix should be the same for #1027, force the user to add an extra include if he/she wants to use MultiIndex serialization.

Thanks!

Change History (4)

comment:1 by Joaquín M López Muñoz, 13 years ago

Resolution: wontfix
Status: newclosed

I'm not keen to change this as suggested because it'll break backwards compatibility. If this is useful to you, you can disable dependencies from Boost.Serialization by globally defining the BOOST_MULTI_INDEX_DISABLE_SERIALIZATION macro.

Seemingly this Debian problem is already reported and fixed according to

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480948

Maybe you're not using the latest Debian packages?

Closing this, if you feel otherwise please reopen.

in reply to:  1 ; comment:2 by Leandro Lucarella <llucax@…>, 13 years ago

Replying to joaquin:

I'm not keen to change this as suggested because it'll break backwards compatibility.

I understand. I think hidden dependencies are bad though, so changing this can be good in the long term, even when a little break in backwards compatibility is introduced. But I can understand your point.

If this is useful to you, you can disable dependencies from Boost.Serialization by globally defining the BOOST_MULTI_INDEX_DISABLE_SERIALIZATION macro.

OK, I think I can live with that.

Seemingly this Debian problem is already reported and fixed according to

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480948

Thanks, I missed that. Looking at the Debian changelog for the package I found that was "reverted" (the dependency was moved from "Depends" to "Recommends") to avoid a circular dependency problem. So the problem is still there unless you install recommended packages by default.

Maybe you're not using the latest Debian packages?

Yes, I am. But as I said before, I think it will be nice to get this fixed in Boost instead. It's really weird to see Serialization stuff included when you don't use it.

Closing this, if you feel otherwise please reopen.

I think I can live with the workarround. Thanks for your time.

in reply to:  2 ; comment:3 by Joaquín M López Muñoz, 13 years ago

Replying to Leandro Lucarella <llucax@…>:

I understand. I think hidden dependencies are bad though[...]


Well, this dependency is as hidden as the dozens of other Boost headers implcitly included by Boost.MultiIndex. In my opinion, the problem is not here, but in the way that libboost-serialization-dev has been packaged. More on this below.

Seemingly this Debian problem is already reported and fixed according to

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480948

Thanks, I missed that. Looking at the Debian changelog for the package I found that was "reverted" (the dependency was moved from "Depends" to "Recommends") to avoid a circular dependency problem. So the problem is still there unless you install recommended packages by default.


I think this reveals a problem with the way libboost-serialization-dev is packaged: Boost.Serialization consists of:

  • Serialization headers (boost/serialization)
  • Archive headers (boost/archive)
  • Binaries to link against when using serialization


All circular problems would be solved if the headers (or at least the boost/serialization headers) were included in libboost-dev, leaving the rest for libboost-serialization-dev proper.

I'm not familiar with the Debian community. Do you feel in the mood for moving this there?

in reply to:  3 comment:4 by anonymous, 13 years ago

Replying to joaquin:

Replying to Leandro Lucarella <llucax@…>:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480948

Thanks, I missed that. Looking at the Debian changelog for the package I found that was "reverted" (the dependency was moved from "Depends" to "Recommends") to avoid a circular dependency problem. So the problem is still there unless you install recommended packages by default.


I think this reveals a problem with the way libboost-serialization-dev is packaged: Boost.Serialization consists of:

  • Serialization headers (boost/serialization)
  • Archive headers (boost/archive)
  • Binaries to link against when using serialization


All circular problems would be solved if the headers (or at least the boost/serialization headers) were included in libboost-dev, leaving the rest for libboost-serialization-dev proper.

I'm not familiar with the Debian community. Do you feel in the mood for moving this there?

I already reported a bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=553281

The option of putting serialization headers inside the libboost-dev package was mentioned in the bug 524612 but it didn't progressed.

I did a search for closed bugs and it seems like this is a very recurring bug report, I can count 7 duplicates just in the libboost-dev and libboost1.40-dev packages (I didn't even search in previous libboost1.xx-dev packages) :(

Note: See TracTickets for help on using tickets.