caffe icon indicating copy to clipboard operation
caffe copied to clipboard

Caffe Import Error: ../ caffe/_caffe.so: undefined symbol: _ZN5caffe10PyErrFatalEv

Open anilsathyan7 opened this issue 9 years ago • 12 comments

I'am facing an caffe import error problem similar to "ImportError:caffe.so: undefined symbol: _ZN5caffe4mtx_E #3834" (https://github.com/BVLC/caffe/issues/3834) i.e Caffe Import Error: ../ caffe/_caffe.so: undefined symbol: _ZN5caffe10PyErrFatalEv

I have tried Uncommenting the line: WITH_PYTHON_LAYER := 1 and recompiled everything.. Still the problem persists.

Using CUDA 8,,NVIDIA Caffe 0.16,OpenBLAS,Ubuntu 16.04,Python 2.7 Everything worked correctly; prior to this step..

I could not understand what this refers to ' _ZN5caffe10PyErrFatalEv'

Installation reference: https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide

anilsathyan7 avatar Sep 06 '17 17:09 anilsathyan7

Hi @anilsathyan7 please paste here what commands do you run when you rebuild everything and what output they produce. Thank you.

drnikolaev avatar Sep 09 '17 22:09 drnikolaev

As mentioned earlier, i have followed the github link for installation reference and after changing the WITH_PYTHON_LAYER := 1 , i ran

make all make test make runtest make pycaffe -should be finished already, so you can omit this one make distribute (as in instructions...)

Output in python ...

$import caffe Traceback (most recent call last): File "", line 1, in File "/home/anilsathyan7/caffe-caffe-0.16/distribute/python/caffe/init.py", line 1, in from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver,
File "/home/anilsathyan7/caffe-caffe-0.16/distribute/python/caffe/pycaffe.py", line 13, in from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: /home/anilsathyan7/caffe-caffe-0.16/distribute/python/caffe/_caffe.so: undefined symbol: _ZN5caffe10PyErrFatalEv

(I have tried ../caffe-caffe-0.16/python/caffe also for python path..but same error occurs..) I'am getting same error upon starting NVIDIA Digits!!!

Anyway, i'am able to run the whole thing using docker(caffe with 0.15) But i would be more happy if i could figure the problem and make it work...

anilsathyan7 avatar Sep 10 '17 06:09 anilsathyan7

Thank you @anilsathyan7 Let me keep it open so far. Also, as a first step, please run

make superclean

Sometimes it helps.

drnikolaev avatar Sep 11 '17 08:09 drnikolaev

It did not work.Problem still persists ...

anilsathyan7 avatar Sep 11 '17 12:09 anilsathyan7

Hi @anilsathyan7 reproduced and fixed. So far the fix is in my staging branch: https://github.com/drnikolaev/caffe/tree/caffe-0.16 You are welcome to verify it.

drnikolaev avatar Oct 03 '17 06:10 drnikolaev

@drnikolaev hi,I meet the same problems as @anilsathyan7 ,and I still don't understand how to solve it ,can you help me ?thank you.

zxx001 avatar Oct 09 '17 09:10 zxx001

Hi @anilsathyan7 @zxx001 It's reproduced and fixed, new release is coming soon. You are welcome to try it here:
https://github.com/drnikolaev/caffe/tree/caffe-0.16

drnikolaev avatar Oct 09 '17 09:10 drnikolaev

@zxx001 hi, an easy way is to use docker images..Instead!! https://hub.docker.com/r/nvidia/caffe/ https://hub.docker.com/r/bvlc/caffe/ https://hub.docker.com/r/nvidia/digits/

I had actually spent couple of weeks for installation (previously.. due to compatibility and dependency issues) and configuration during my initial trial..

If you just want to get things done..docker is the easiest way out. I've yet to try out the fix suggested by @drnikolaev

anilsathyan7 avatar Oct 09 '17 10:10 anilsathyan7

@anilsathyan7 Hi, I meet the same problems. Besides does with docker images, is there any other solution to solve the problem?

zn845639326 avatar Oct 31 '17 11:10 zn845639326

Please check v0.16.5 and reopen the issue if the problem still exists.

drnikolaev avatar Jan 01 '18 09:01 drnikolaev

Confirmed working!!! There seems to be no errors, now. I'am able to import caffe-v0.16.5 in python 2.7 .. Also digits is working fine with this latest version !!! Thanks ...

anilsathyan7 avatar Jan 05 '18 15:01 anilsathyan7

@anilsathyan7 thanks for confirming

drnikolaev avatar Jan 05 '18 20:01 drnikolaev