Re: g++ libstdc++ linker question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On 30 April 2012 13:39, F. Heitkamp wrote:
> People will tell me to ask on matplotlib list but I believe this a more
> generic GNU C++ question.
> I have been trying to run matplotlib that I built from source on my linux
> from scratch like box.
> When I try to run an example I get:
> bash-4.2$ python2.6
> Traceback (most recent call last):
>  File "", line 13, in <module>
>    import matplotlib.pyplot as plt
>  File "/usr/lib/python2.6/site-packages/matplotlib/", line 23, in
> <module>
>    from matplotlib.figure import Figure, figaspect
>  File "/usr/lib/python2.6/site-packages/matplotlib/", line 16, in
> <module>
>    import artist
>  File "/usr/lib/python2.6/site-packages/matplotlib/", line 6, in
> <module>
>    from transforms import Bbox, IdentityTransform, TransformedBbox,
> TransformedPath
>  File "/usr/lib/python2.6/site-packages/matplotlib/", line 34,
> in <module>
>    from matplotlib._path import affine_transform
> ImportError: /usr/lib/python2.6/site-packages/matplotlib/ undefined
> symbol:
> _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_i
> I see this symbol is in 32 bits libstdc++ library, but does not seem to
> appear in 64 bits versions.

Right, the equivalent symbol in the 64-bit lib ends in _l instead of _i

> bash-4.2$ ldd /usr/lib/python2.6/site-packages/matplotlib/
> =>  (0xffffe000)
> => /usr/lib/ (0xf74f7000)
> => /lib/ (0xf74de000)
> => /lib/ (0xf74c4000)
> => /lib/ (0xf7367000)
> => /lib/ (0xf7362000)
> => /lib/ (0xf735e000)
> => /lib/ (0xf7338000)
>    /lib/ (0xf77d1000)
> libstdc++ is not shown as being linked with
> Any thoughts?

Is a 32-bit or 64-bit library?  From the missing symbol I'm
asuming 32-bit.

It would appear it wasn't correctly linked, so its dependency on isn't recorded in the library by a DT_NEEDED entry.

Does it help if you tell the dynamic linker to preload

LD_PRELOAD=/usr/lib/ python2.6

[Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

Add to Google