[pkg-boost-devel] Bug#483977: Bug#483977: libboost1.35-dev: dependency problem with asio

Steve M. Robbins steve at sumost.ca
Mon Jun 9 01:51:07 UTC 2008


On Wed, Jun 04, 2008 at 02:30:05AM +0200, Simon Richter wrote:
> Hi,
> 
> > I'm not sure there's a bug here, but I'd like the asio maintainer to
> > comment.  Now that asio is released with Boost, will further
> > maintenance be done within boost or on the asio.sourceforge.net site?
> 
> Yes.
> 
> As long as Christopher ships an independent ASIO library that uses the
> asio namespace, we should provide something that follows this interface,
> simply because applications may depend on it.

Agreed.  I didn't realise it was in a different namespace.


> I am thinking about replacing all the public header files with stubs
> that include the ASIO headers from Boost, and use "using namespace" to
> forward all the names, but I'm not sure whether that will actually work.
> 
> > If the latter, the question becomes how to use libasio-dev together
> > with Boost's -dev package that also includes asio.  Building with two
> > asio libraries together seems fraught with danger, IMHO.
> 
> No, that is safe -- programs attempting to mix both in the same event
> loop will fail to compile, and programs using two event loops in
> different threads should work normally.

I was operating under the mistaken impression that the standalone asio
and the boost asio both used the same namespace.  I was thinking there
might be "one definition rule" violations.  Or that two compilation
units might use the "same" class, one from standalone asio and one
from boost asio.  This becomes a problem once these two asio
implementations diverge.

It's all moot if the two implementations are in different namespaces.
Or is it?  Maybe the same problems arise if people use "using"
statements.


> > This started with 1.35.0; the unversioned libboost-dev (Boost 1.34.1)
> > will vanish when it is no longer used as a build-dep.  Hopefully this
> > will happen around the time 1.36 hits the archive so that we don't
> > have to maintain more than 2 Boost versions.  :-)
> 
> Can we get a virtual package then?

The path forward is to always declare which major version a package
builds against.  We do not forsee introducing a virtual package that
means "an arbitrary boost development environment".

My advice from before:

    If you want to use Boost 1.35, then use the asio that ships with
    it.  In short: drop the libasio-dev dependency and just use
    libboost1.35-dev.

needs some modification.  It likely requires some code changes since
the classes are in a different namespace and the headers are in
a different place.  I have no idea how much change that implies.

I can imagine some cases where the change is too extensive and they
would prefer to keep using libasio-dev.  In that case, I'm now leaning
towards the view that libasio-dev should depend on "libboost-dev |
libboost1.35-dev".  Does that make sense?

Thanks,
-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-boost-devel/attachments/20080608/1b45b35f/attachment.pgp 


More information about the pkg-boost-devel mailing list