dowinlee / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 0 forks source link

Import pyopencv fails, cxcore_hpp_vec_ext.so: undefined symbol: _ZN2cv8fastFreeEPv #43

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. import pyopencv

I'm getting:

Python 2.7.1 (r271:86832, Apr 15 2011, 12:09:10) 
[GCC 4.5.2 20110127 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyopencv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/pyopencv/__init__.py", line 1, in <module>
    from info import __doc__
  File "/usr/lib/python2.7/site-packages/pyopencv/info.py", line 42, in <module>
    import config as _cfg
  File "/usr/lib/python2.7/site-packages/pyopencv/config.py", line 9, in <module>
    from cxcore_hpp_vec import *
  File "/usr/lib/python2.7/site-packages/pyopencv/cxcore_hpp_vec.py", line 19, in <module>
    import cxcore_hpp_vec_ext as _ext
ImportError: /usr/lib/python2.7/site-packages/pyopencv/cxcore_hpp_vec_ext.so: 
undefined symbol: _ZN2cv8fastFreeEPv

For some reason this .so does not get linked correctly (no cxcore):

ldd /usr/lib/python2.7/site-packages/pyopencv/cxcore_hpp_vec_ext.so

    linux-vdso.so.1 =>  (0x00007fffc2521000)
    libboost_python.so.1.46.0 => /usr/lib/libboost_python.so.1.46.0 (0x00007f7aa4cb8000)
    libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007f7aa48fb000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f7aa45f0000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f7aa43da000)
    libc.so.6 => /lib/libc.so.6 (0x00007f7aa407c000)
    libutil.so.1 => /lib/libutil.so.1 (0x00007f7aa3e78000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00007f7aa3c5b000)
    libdl.so.2 => /lib/libdl.so.2 (0x00007f7aa3a57000)
    librt.so.1 => /lib/librt.so.1 (0x00007f7aa384e000)
    libm.so.6 => /lib/libm.so.6 (0x00007f7aa35cc000)
    /lib/ld-linux-x86-64.so.2 (0x00007f7aa57ed000)

while other shared libraries does:

ldd /usr/lib/python2.7/site-packages/pyopencv/cxcore_h_ext.so  | grep cxcore
    libcxcore.so.2.1 => /opt/opencv-old/lib/libcxcore.so.2.1 (0x00007ff8d9566000)

The symbol in question comes exactly from this library:

nm -D /opt/opencv-old/lib/libcxcore.so.2.1 | grep _ZN2cv8fastFreeEPv
000000000015c6c0 T _ZN2cv8fastFreeEPv

so it sounds like build script or configure script error. Anyone else 
experiencing this?

Original issue reported on code.google.com by ggi...@gmail.com on 21 May 2011 at 6:47

GoogleCodeExporter commented 8 years ago
Btw, I just found out that this is only when setuptools is used to build the 
library. When I use CMake directly, it works. It's 100% repeatable for me 
(package maintainer of Arch Linux) and at least one other user.

Original comment by ggi...@gmail.com on 29 May 2011 at 11:39