pyyolo icon indicating copy to clipboard operation
pyyolo copied to clipboard

pyyolo.so: undefined symbol: cvWaitKey

Open ghost opened this issue 8 years ago • 13 comments

When running example.py got an error:

Traceback (most recent call last): File "example.py", line 1, in import pyyolo ImportError: /usr/local/lib/python2.7/dist-packages/pyyolo.so: undefined symbol: cvWaitKey

ghost avatar Apr 16 '17 13:04 ghost

I got the same problem. Have you resolved it yet?

XiomarG avatar May 11 '17 06:05 XiomarG

i think the key is that you cannot turn on OpenCV in Makefile.

XiomarG avatar May 11 '17 06:05 XiomarG

i got the same error, even though i turned opencv=0 it still persists

reinaldomaslim avatar Jul 02 '17 07:07 reinaldomaslim

Also getting this error in python3 also tried python2 same issue. Tried turning off OPENCV in Makefile for does not seem to resolve. It seem to be working now for me in python3 if I turn off OPENCV in Makefile. I must have been doing something else incorrect.

rnunziata avatar Jul 03 '17 23:07 rnunziata

removed....

rnunziata avatar Jul 04 '17 06:07 rnunziata

Is there a solution with OPENCV=1? I can't get it to work.

cbaziotis avatar Jul 08 '17 15:07 cbaziotis

You can use it in python just not when you compile pyyolo, its a shard lib problem.

rnunziata avatar Jul 08 '17 16:07 rnunziata

@reinaldomaslim I had the same problem. It appears that python setup.py install does not overwrite the already installed modules. If you delete the two files in your python module directory before the call, it'll work. That said, you might want to delete the build directory before building as well.

sunsided avatar Jul 11 '17 13:07 sunsided

Hi @sunsided, can you please specify which two files you mean? Currently I'm removing pyyolo.so and pyyolo-0.1.egg-info in /usr/local/lib/python2.7/dist-packages/while trying to get this work repetitively... I am also rm -rf build as in instructions point 4. And I set OPENCV=1 since otherwise I get a different error saying ImportError: /usr/local/lib/python2.7/dist-packages/pyyolo.so: undefined symbol: _ZGVbN2vv___pow_finite.

georoen avatar Jul 12 '17 11:07 georoen

I'm geting the same error as @georoen

filipetrocadoferreira avatar Jul 25 '17 09:07 filipetrocadoferreira

@georoen For me they are pyyolo.cpython-36m-x86_64-linux-gnu.so and pyyolo-0.1-py3.6.egg-info in dist-packages, but that looks right. If I don't delete these prior to install, it doesn't seem to copy anything new. Apart from that, for me it only works with OPENCV=0. I have to say that I did not rebuild pyyolo since my last comment 14 days ago, so maybe there are newer changes introducing the pow_finite problem. It appears to be related to glibc though - maybe try a newer/different compiler?

sunsided avatar Jul 25 '17 10:07 sunsided

okay, unfortunately I'm very new to compiling stuff (I want to wrap yolo into R, so I can move on in my favorite language, but python would be okay as well).. This is how I gave it a new try: sudo rm /usr/local/lib/python2.7/dist-packages/pyyolo* Find which other compliers are available on my system with dpkg --list | grep compiler and use that instead: make CC=/usr/bin/gcc-6 with with OPENCV=0. However it still returns the same errors (both, also OPENCV=1 and also with ggc-5) on Ubuntu 17.04. Which newer/different compiler do you suggest @sunsided?

georoen avatar Jul 25 '17 10:07 georoen

I got the same import error after installing: ImportError: /usr/local/lib/python2.7/dist-packages/pyyolo.so: undefined symbol: cvWaitKey

I attempted another clean install which worked. The following steps were performed:

  • modified the Makefile to have OPENCV=0, (for the record all variables (GPU, CUDNN, DEBUG) are also 0)
  • followed the suggestion of @sunsided to delete the build directory and files pyyolo.so and pyyolo-0.1.egg-info in the directory /usr/local/lib/python2.7/dist-packages/
  • ran the same install steps again

Configuration: Python 2.7.12 OpenCV 3.2.0

But the main issue is still not resolved since the installation is not going through with OpenCV support, i.e., with OPENCV=1 in the Makefile.

ni9elf avatar Jul 26 '17 19:07 ni9elf