Apparently Python on some linux distros is being linked by g++ rather
than gcc, resulting in the C++ runtime library being linked into
Python; this has bad consequences for compatibility between C++
extension modules and Pythons that have been built with different
versions of GCC. Is this behavior intentional?
--- Begin Message ---
Topics:
Re: Regressions in your Boost libraries as of 2005-07-06
Re: Regressions in your Boost libraries as of 2005-07-06
--- End Message ---
--- Begin Message ---
On Jul 6, 2005, at 9:04 PM, Ralf W. Grosse-Kunstleve wrote:
> (Newer?) Python executables are linked with "g++" (instead of "gcc"),
> which
> brings in libstdc++.so. We had weird crashes when using a Python
> compiled on a
> machine with libstdc++.so.5 (Redhat 8.0) for building Boost.Python
> extensions
> on another machine which had libstdc++.so.6 (Gentoo 1.6.8 and Fedora
> core 3, I
> believe).
>
> To check for libstdc++ incompatibilities, run
>
> ldd <full-path-to>/python
On eddie (one of the trouble systems), this gives:
libstdc++.so.5 =>
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libstdc++.so.5
(0xb7dd8000)
for the Python installed on the system.
> and, e.g.,
>
> ldd <full-path-to>/minimal_ext.so
... and this gives (for eddie's GCC 4.0.0):
libstdc++.so.6 =>
/usr/lib/gcc/i686-pc-linux-gnu/4.0.0-alpha20050213/libstdc++.so.6
(0xb7f0d000)
It looks like that's the problem, then. We have two libstdc++ versions
around, hence the need to build Boost.Python with the same compiler
version as Python. Bummer.
I wonder... does Python even use C++? Should they just be linking with
gcc?
Doug
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
--- End Message ---
--- Begin Message ---
--- David Abrahams <[EMAIL PROTECTED]> wrote:
> >> Doug, I know you've drawn that conclusion, but it really surprises me.
> >> Generally speaking, I have been able to use any version of Python with
> >> any compiler, provided Python was compiled with something having a
> >> compatible 'C' ABI.
> >
> > I dunno what else to say. You're free to play around with things on our
> > Linux machine (eddie); we have various flavors of GCC 3.3 and 3.4
> > available, with Pythons compiled with those plus the system GCC 3.3.5.
> > GCC 2.95.3 (with or without STLport) works fine with the system Python
> > (compiled with the system's GCC 3.3.5), but Boost.Python tests fail to
> > run properly unless Python is recompiled with the same GCC 3.3.6 or
> > 3.4.4.
>
> Well, I've done this numerous times on numerous machines. I wonder
> what's up with eddie? Ralf, does this sound normal to you?
(Newer?) Python executables are linked with "g++" (instead of "gcc"), which
brings in libstdc++.so. We had weird crashes when using a Python compiled on a
machine with libstdc++.so.5 (Redhat 8.0) for building Boost.Python extensions
on another machine which had libstdc++.so.6 (Gentoo 1.6.8 and Fedora core 3, I
believe).
To check for libstdc++ incompatibilities, run
ldd <full-path-to>/python
and, e.g.,
ldd <full-path-to>/minimal_ext.so
Look for lines like
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000002a95689000)
HTH,
Ralf
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
--- End Message ---
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com