Discussion in 'Python' started by gianluca, Aug 29, 2008.

  1. gianluca

    gianluca Guest

    hy list,
    I've built _libfoo.so and libfoo.py library with swig and I've copied
    in /usr/lib/python2.5/lib-dynload/ but when import the module

    I've that message

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: /usr/lib/python2.5/lib-dynload/_libfoo.so: undefined
    symbol: __stack_chk_fail_local

    Could anybody help me?

    gianluca, Aug 29, 2008
    1. Advertisements

  2. Have you tried to use ldd against the _libfoo.so to check if it is
    able to get all the libraries it needs?

    Marco Bizzarri, Aug 30, 2008
    1. Advertisements

  3. gianluca

    gianluca Guest

    I've tried with ldd and the library aren't loaded. I don't use my *.i
    interface so is quite difficult modify it (realy, the libraru is
    supplied with make).

    Any suggests?
    gianluca, Aug 30, 2008
  4. The ldd should point you to the library which is not loaded.

    Maybe the library you need is not in one of the normal locations in
    your Linux/Unix path.

    Normally, the linker looks for library under /lib and /usr/lib, and
    maybe other paths specified in /etc/ld.so.conf

    If you know the library is installed in your system, you can force the
    linker to look for it, either modifying your /etc/ld.so.conf (better
    if you know what you're doing, however) or, just setting the
    LD_LIBRARY_PATH variable:

    export LD_LIBRARY_PATH=/some/non/standard/lib/dir/

    python -c "import foo"

    Another possibility, which you can check googling a little, is that
    you've two different versions of the libarary around your system, and
    that you're loading the wrong one (i.e., python is looking at the
    wrong one)

    again, setting the LD_LIBRARY_PATH should help

    Marco Bizzarri, Aug 30, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.