Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-12-08 04:45:41


On Tue, Dec 07, 2004 at 04:56:02PM +0000, Oliver Kullmann wrote:

> Hi Jeff,
>
> > > 3) I'm using g++ version 3.4.3, and I compiled Boost with this
> > > compiler, but to whatever library from Boost I link, I get warning
> > > messages like the above; another example
> > >
> > > > g++ calender.o -lboost_date_time-gcc
> > > /usr/bin/ld: warning: libstdc++.so.5, needed by
> > > /usr/local/lib/gcc/i686-pc-linux-
> > > gnu/3.4.3/../../../libboost_date_time-gcc.so, may conflict with libstdc++.so.6
> >
> > Looks to me that there is a mismatch in the environment -- you are compiling
> > boost with one version of libstdc++ and then linking against another.
> >
> > > What's the problem here?! (Linking in general seems in Boost not so
> > > easy, and thus it would be good to have a bit more documentation on
> > > this. For example in program_options I couldn't find any hint how to
> > > compile it.)
> > >
> > > Hope someone can shed light on these issues (as I said, for all what
> > > I can see, there seems to be a serious problem with program_options).
> >
> > Have you read this?
> >
> > http://www.boost.org/more/getting_started.html#Build_Install
> >
>
> yes, I read it, but the main question seems to me:
>
> What happens if Boost was already installed on the system?
> Is some form of "uninstall" necessary? (seems not to be the case?!)
>
> Could this be the problem here?!
>
> To be on the safe side, I've built Boost again, but exactly the same problem:
> Always the linker warnings, and every program crashes (so it had nothing to do
> with the program_options library; fortunately it always crashes immediately, so
> the problem is always visible). Below I've copied the relevant build commands and
> other information.
[snip]
> The linking warning:
>
> g++ -c -o TimeHandling_Applications_DaysDifference.o TimeHandling_Applications_DaysDifference.cpp
> g++ -o TimeHandling_Applications_DaysDifference TimeHandling_Applications_DaysDifference.o -lboost_date_time-gcc
> /usr/bin/ld: warning: libstdc++.so.5, needed by /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libboost_date_time-gcc.so, may conflict with libstdc++.so.6

The warning clearly says that libboost_date_time-gcc.so requires
libstdc++.so.5 - that means you compiled Boost with GCC 3.3

Try running "ldd /usr/local/lib/libboost_date_time-gcc.so" and see which
version of libstdc++ it requires (it will say libstdc++.so.5)

Did you build Boost before upgrading your compiler? If so, when you
re-ran "bjam install" it won't have rebuilt the libraries, it will just
have copied the libraries you had already built (with GCC 3.3) into
/usr/local/lib. If this is the case, you should delete the compiled
binaries and rebuild.

jon

-- 
"I have had my results for a long time, but I do not yet know how I am
 to arrive at them."
	- Karl Friedrich Gauss

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk