Skip to content
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

Dynamic linking bugfix #3619

Closed
wants to merge 10 commits into from
Closed

Dynamic linking bugfix #3619

wants to merge 10 commits into from

Conversation

zfogg
Copy link

@zfogg zfogg commented Feb 1, 2016

Confirmed working for both OS X (El Capitan) and Linux (Ubuntu LTS)

This fixes #3597 and fixes #3459.

About the Linux dynamic linking setup.. perhaps it would be better practice if we added libcaffe to the OS's dynamic library cache? We could do something like this:

~/src/caffe$ ldconfig -r $HOME -p ./build/lib
~/src/caffe$ ldconfig -p | grep caffe
        libcaffe.so.1.0.0-rc3 (libc6,x86-64) => /home/ubuntu/src/caffe/build/lib/libcaffe.so.1.0.0-rc3
        libcaffe.so (libc6,x86-64) => /home/ubuntu/src/caffe/build/lib/libcaffe.so

So, it works well right now using ld.so's magic '$ORIGIN' variable, but maybe switching to ldconfig is the right move. Any preference? Let me know! :)

@lukeyeager
Copy link
Contributor

Your fix doesn't seem to work on TravisCI (Ubuntu 12.04).

This comment might be relevant/helpful:

I'm not sure how the linking bug was introduced, but running the following two lines after make alland make test fixes the problem for good:

install_name_tool -change libcaffe.so.1.0.0-rc3 @executable_path/../lib/libcaffe.so.1.0.0-rc3 .build_release/tools/caffe
install_name_tool -change libcaffe.so.1.0.0-rc3 @executable_path/../lib/libcaffe.so.1.0.0-rc3 .build_release/test/test_all.testbin

@safrooze #3597 (comment)

@zfogg
Copy link
Author

zfogg commented Feb 3, 2016

hacking away at the issue.. p sure I know what the problem is; please hold and I'll push a fix :)

@shelhamer
Copy link
Member

Thanks for taking a stab at a fix @zfogg but this is addressed by smaller patches in #3695 and #3696. If there are further cmake changes you would like to contribute please open a separate PR.

@shelhamer shelhamer closed this Feb 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libcaffe.so.1.0.0-rc3 problem Python fails when import caffe, Library not loaded: @rpath/libcaffe.so
3 participants