Boost logo

Boost :

From: Gottfried.Ganssauge_at_[hidden]
Date: 2004-09-30 09:34:35


David Abrahams wrote:
> Martin Wille <mw8329_at_[hidden]> writes:
>
> > David Abrahams wrote:
> >> Martin Wille writes:
> >>
> >>>Trying: assert abs(rewrap_value_complex_float(4+.2j) -
> (4+.2j)) < .000001
> >>>Expecting: nothing
> >>>Segmentation fault
> >> Wild guess: This is an ODR violation. The Boost.Python library and
> >> the test shared library were compiled with a different
> definition of
> >> std::complex.
> >
> > How could that have happened?
>
> Weird INCLUDE picked up from the environment? Sorry, after that I'm
> fresh out of wild guesses ;-)
>
> GDB should be able to show you what's going wrong, though.
>
> > Note, this is not the intel compiler,
> > so flags like "-cxxlib-gcc" shouldn't be a problem here. Could the
> > build system use so different flags that the resulting libraries
> > wouldn't be interoperable? (I know this can happen rather easily
> > on other systems. However, I haven't seen that with gcc on Linux
> > as long as you stick to the same compiler version).
> >
> > Python was compiled using gcc 3.3.4. Could this cause the problem?
> > (I don't think so.)
It probably can if python was linked using the C++-Compiler.
Gcc-3.3 uses libstdc++.so.5 for it's standard library whereas gcc-3.4 uses
libstdc++.so.6.
Probably both are dynamically linked to your extension (ldd will reveal if
that's the case).

Cheers,

Gottfried


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