-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libcaffe.so.1.0.0-rc3 problem #3597
Comments
This is a |
Looks to me like Make links $ ldd python/caffe/_caffe.so | grep caf
libcaffe.so.1.0.0-rc3 => /home/lyeager/caffe/caffe/python/caffe/../../build/lib/libcaffe.so.1.0.0-rc3 (0x00007fa439e55000) How did you come up with that error? |
@lukeyeager ,thank you for reply. |
I replied because I thought your problem might be related to my recent changes at #3311. I can't tell if your issue actually has anything to do with those changes unless you can give me some steps to reproduce the error that you reported. And no, my changes should work with either Make or CMake. I just asked because I wondered if you might be on some platform other than Ubuntu 14.04. CMake tends to handle multi-platform builds better than the raw Makefile build. |
I am facing this libcaffe.so.1.0.0-rc3 problem I just downloaded the recent git...and trying to make it includes some FastRcnn staff..so in my Makefile.config I have line WITH_PYTHON_LAYER := 1 library compiles and my project link with it...but when comes to running, I got error |
Can you give me some more information?
$ python -c 'import platform; print platform.platform()'
Linux-3.13.0-76-generic-x86_64-with-Ubuntu-14.04-trusty
$ ldd build/tools/caffe | grep caffe
libcaffe.so.1.0.0-rc3 => /home/lyeager/caffe/caffe/build/tools/../lib/libcaffe.so.1.0.0-rc3 (0x00007fe4bb78b000)
$ ldd python/caffe/_caffe.so | grep caffe
libcaffe.so.1.0.0-rc3 => /home/lyeager/caffe/caffe/python/caffe/../../build/lib/libcaffe.so.1.0.0-rc3 (0x00007f6d0d4d1000) |
For commands: $ python -c 'import platform; print platform.platform()' |
@mostafa-saad I'm not seeing anything obvious that you're doing wrong. Nor can I see anything in #3311 that looks problematic. All the tools and examples build against It seems most likely that you have some sort of issue with your project's build/link setup. Otherwise I guess maybe this is a CentOS vs. Ubuntu thing? I don't have a way to test on your platform. |
Not sure. I was building and using some caffe versions in 2015, and was totally ok. I am not sure why in this time, the file libcaffe.so.1.0.0-rc3 is generated. Usually, it was not generated. I will dig more at some time and see. I may also try it on my personal ubuntu. This is my reserach lab machine. |
I met the same problem. I am using OS X 10.11.3 and zsh. When I ran
my DYLD_LIBRARY_PATH is
Someone faced the same issue too. |
Thanks for the bug report @liboyue. I've got two short-term solutions for you:
I'll try to find an OSX machine to test this on, but I could use some help if somebody with knowledge about building on OSX wants to chime in! |
I found an old Mac (OSX 10.10.4) to test this on and didn't have any problems with either build system. # Check platform
$ python -c 'import platform; print platform.platform'
Darwin-14.4.0-x86_64-i386-64bit
# Makefile build
$ make all runtest
$ build/tools/caffe --version
caffe version 1.0.0-rc3
# CMake build
$ mkdir build && cd build
$ cmake .. -DCPU_ONLY=On
$ make all runtest
$ tools/caffe --version
caffe version 1.0.0-rc3 That may not help anyone on this thread, but I'm glad to know that not ALL Mac builds are broken, at least. It might be worth checking that your binary is built with the proper links: # Makefile build
$ otools -L buildtools/caffe | grep caffe
libcaffe.so.1.0.0-rc3 (compatibility version 0.0.0, current version 0.0.0)
# CMake build
$ otools -L tools/caffe | grep caffe
@rpath/libcaffe.1.0.0-rc3.dylib (compatibility version 1.0.0, current version 1.0.0) |
I would like to apologize, Things are ok on both Centos and Ubuntu 14. It was a mistake from my side in my DYLD_LIBRARY_PATH :( Kindly ignore all my posts |
@lukeyeager I don't konw how to use cmake...
But this commit a97300c works fine on my Mac. Thanks a lot : ) |
I also met the exact problem as mentioned by @liboyue on OSX 10.11.2. Reverting to the old commit a97300c fixed it. Thanks for the workaround @lukeyeager! |
I am facing such kind of a problem:
Help much appreciated |
I am facing the exact same issue.
But:
And then:
And finally:
I am using mac os x 10.10.5. |
I'm not sure how the linking bug was introduced, but running the following two lines after And if using pycaffe: |
I should clarify that the above fix is only of OSX and it simply changes the library path inside the binary to point to the relative path (rather than expecting it to be in the system path). |
I encountered the same issue on Ubuntu 14.04. Ran
then tried to import
|
@KellyChan what happens if you try to import forom |
@lukeyeager, thanks for your reply. If I tried to
Alternatively, I changed to test by script:
test.py
|
@KellyChan |
@lukeyeager Thanks for your reference links. Just would like to provide some feedback. If I set up the imported libraries in python scripts, everything worked well. I could run the model.
If I imported
|
@safrooze when i try to modify the pycaffe lib i get:
my temporary workaround is to copy |
@kylemcdonald that's strange as the install names should be pretty much the same between mine and yours if you're building the latest caffe. What's the output of "otool -L python/caffe/_caffe.so"? Also, to be sure this is just a name-length issue, you can copy libcaffe.so.1.0.0-rc3 to /usr/libs (can even rename it to libcaffe.so) and provide this much shorter path to isntall_name_tool and see if that solves it. If it does, then somehow your library paths must be longer than mine and the small change doesn't fit. |
after further work on this, it turns out that there were other problems with my |
From #3628 |
This issue manifests in OS X 10.11 since it disregards the #3696 fixes the Makefile. Please follow-up if there is a CMake issue. @safrooze thanks for pointing out the precise issue and a linking fix in #3597 (comment). @kylemcdonald try #3696. |
@mostafa-saad I met similar issue: |
Fixed in Makefile by #3696. |
I had the same problem (and I spent too much time to solve it, but I did!!). Using the ldd command on /home/me/mylibs/caffe/distribute/python/ I got this:
but executing it in /home/me/mylibs/caffe/python/ got this:
hence I change my PYTHONPATH to this: It worked!!!! P.D.: sure there is a more ellegant way to fix it, but... now I can continue my work. |
I fixed this issue by adding |
On CentOS, I fixed the missing libcaffe error by adding |
@lukeyeager hi, I meet the same error and when I do: Do you get any solution? |
@TimingSpace OS X 10.11 introduced restrictions on relative rpath usage. Use For instance, when I ran
As we see, libcaffe.so.1.0.0-rc3 has no path specified and hence falls back on the relative rpath that's restricted in OS X 10.11:
So I made it absolute and it fixed the issue:
|
@lukeyeager i met the same quesion above. I tried the tips from yours. I got the following messages: can you give me some tips? |
I'm having the same problem: Ubuntu 16.04 and with C++ API `#include using caffe::Blob; int main() { for(int i = 0; i<6411400; ++i) // Create a solver parameter object and load solver.prototxt into it caffeCppAPIExample$ make ./caffeCppAPIExample What to do to solve the problem? |
I temporary "solved" by this: |
@lukeyeager : I have installed caffe on Ubuntu16.04 via CMAKE without any errors and I think successfully. Now I want to import caffe in python and I can not. I had GLIBCXX version problem in which the new version did not exist in anaconda2 but I brought that using Ubuntu library. Now when importing caffe I have another error which I have not found any solutions or same problems! here is the error:
and here are my results for some items you had asked above:
I have also included caffe in
I really don't know what else I can do. Can you help me? |
Add |
I tried the above and still got this ImportError: /home/archpengown/Downloads/intel-caffe/.build_release/lib/libcaffe.so.1.0.0-rc3: undefined symbol: _ZNK6google8protobuf7Message11GetTypeNameB5cxx11Ev |
@Daenerys24 Have you solved this problem? I have the same problem as you. |
@jinyu121 Have you solved this problem? I have the same problem as you when I install protobuf 3.2. Using Ubuntu 16.04.4 Matlab R2014a gcc 5.4.0 |
@AemikaChow Yeah, I solved this problem. In my case:
Maybe _ZNK6google... can be solve using softlink. |
@thinkski thanks! I use macOS 10.12.4, and I encounter the same problem like this:
and, otool looks like this
I thought the
It works. |
For anyone having the error in macOS 10.12.5:
Check if you have the library libcaffe.so.1.0.0-rc3 under /usr/local/lib. If not copy it into that directory and rerun. |
@thinkski If someone else bump into things like: ImportError: dlopen($YOUR_DIR/py-faster-rcnn/caffe-fast-rcnn/python/caffe/_caffe.so, 2): Library not loaded: libcaffe.so.1.0.0-rc3 the link above can solve your question. |
My error is not exactly as mentioned before: "libcaffe.so.1.0.0: undefined symbol: _ZNK6google8protobuf7Message11GetTypeNameB5cxx11Ev", my error came from the libcaffe.so.1.0.0, not libcaffe.so.1.0.0-rc3. And what is the effective solution to solve this issue? I googled it and got one possible solution like this: http://hwengineer.blogspot.com/2017/07/&prev=search. |
this helps me : https://groups.google.com/forum/#!topic/caffe-users/EA7zR-xhHoA |
is this a problem?
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: libcaffe.so.1.0.0-rc3
The text was updated successfully, but these errors were encountered: