Find the answer to your Linux question:
Results 1 to 9 of 9
Hi, I've compiled a program on ubuntu with python(make python) but the problem comes when I try to use it and exactly after the command line "from libpy import *", ...
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4

    undefined symbol

    Hi,

    I've compiled a program on ubuntu
    with python(make python) but the problem comes when I try to use it and exactly after the command line "from libpy import *", the message that appears is such

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "libpy/knit.py", line 28, in <module>
    import _knit
    ImportError: libpy/_knit.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE

    I don't know if it's a problem with the compilation or linking or other issues.
    I'll be thankful if someone could help me

  2. #2
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    623
    Looks like what you're compiling expects a different version of _knit.so than it's finding, I.E. one that exports the "undefined symbol".

  3. #3
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4
    thank you for your reply,
    the program I'm compiling is called Knit so that knit.so is part of that program, and I don't think it could have a problem of compatibility with that file. may be the version of some libraries doesn't match the version of knit ?
    in that case how do i proceed?

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Best guess (sorry to take so long to get to this) is that there is already a knit.so in your library paths that is getting linked before your local copy is. Can you post your Makefile here, and where your local copy of knit.so resides?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4
    thank you
    the makefile i've attached it below
    the location of the file is
    home/hamed/work/KNITrelease1.1/libpy/_knit.so
    Attached Files Attached Files

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    First, try the command make clean first, to be sure there are no remnants from an old build, and then the command make. However, assuming your build environment was clean, then the libpy/_knit.so is referencing a symbol that is implemented somewhere else, and that somewhere else is not available at the point when the linker needed it, which was apparently in the libpy/knit.py python module. Since I don't know whatelse is being included in that python component, I can't say any further. Unfortunately the output of the symbol name is in a mangled form, so without knowing the details of name mangling used, I don't know what the original source code symbol name is that is missing. If we knew that, then we could figure out where it is defined, or whether there is a bug in this code.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    623
    Rub, more info on this thread over here:
    error message undefined symbol when executing the command import from

    OP says he's copied a bunch of the libs and headers from different versions of things into /usr/include and /usr/lib.

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by greyhairweenie View Post
    Rub, more info on this thread over here:
    error message undefined symbol when executing the command import from

    OP says he's copied a bunch of the libs and headers from different versions of things into /usr/include and /usr/lib.
    Thanks GHW. That does change things a bit. You can't just mix-n-match this stuff... Thing about engineering problems is that you want the 9mm bolt to go with a 9mm nut, not the 10mm one.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #9
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4
    it's ok,
    I understand that but the problem here is how to correct that, how to avoid linking to different versions of libraries in one time?
    is there a solution?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...