1

I am trying to build caffe from a git checkout on ubuntu 16.04.

If found the gcc5 workaround and have sorted the hf5 issues but am now stuck.

I've resolved most of the dependencies but am stuck with these ones.

/usr/bin/ld: warning: libcudart.so.6.5, needed by
/usr/lib/libcaffe.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcublas.so.6.5, needed by
/usr/lib/libcaffe.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcurand.so.6.5, needed by
/usr/lib/libcaffe.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_system.so.1.55.0, needed b
/usr/lib/libcaffe.so, may conflict with libboost_system.so.1.58.0
/usr/bin/ld: warning: libboost_thread.so.1.55.0, needed by
/usr/lib/libcaffe.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_python-py27.so.1.55.0, needed by
/usr/lib/libcaffe.so, not found (try using -rpath or -rpath-link)

ubuntu 16.04 ships with boost 1.58 and doesn't have 1.55 package still available in the repo, anyone know where i can find them and how to install them without breaking other boost packages ?

I'm also unsure where to get the libcu* files from either

Has anyone worked out how to get round this or is anyone planning to make a snap package of caffe which would ease this pain ?

Edit: the machine i'm doing this on is a dell precison m3800 with a NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1) in optimus with a intel 4600

Edit: the error message suggests -rpath any suggestions on how to make use of that ?

Edit: I just did a git pull on my caffe sources this morning (may 18th 2016) and it appears that caffe has now moved up to the the 1.58 versions of the boost libs and the 7.5 cuda libs so is using those installed on my system, however this is not stable yet and the compile fails with pages of warning s and errors. Hopefully this is the beginning of the fix...

Update:

Using advice from user.dz to use the bundled cuda tools i did

apt-get install nvidia-cuda-toolkit 

this worked and has moved me past the difficult bit ! thanks @user.dz :)

building caffe still had a ton of compile errors, these where fixable by googling for them and finding posts with workarounds, too many to list.

This got me to the point where i could compile caffe (with many many warnings from boost) successfully so i think that means this question is answered, thanks everyone , especially user.dz !

as an aside:

I am now stuck trying to get pycaffe to build , it's complaining about libboost_python3 not being found , i have the package installed but it seems there is not an .so version only a .a , this fails the build due to an unsupported relocation error. any ideas ? i will start a new question about that and post a link to it

pycaffe now builds , fixed it with a cheeky symlink :)

sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python3.so
karel
  • 122,292
  • 133
  • 301
  • 332
Amias
  • 5,359

2 Answers2

1
  1. It seems an absolute package that why it is not listed in the search through packages.ubuntu.com and can get it from:

    http://archive.ubuntu.com/ubuntu/pool/multiverse/n/nvidia-cuda-toolkit/

    In other cases not one, you may look for old releases repository too:

    http://old-releases.ubuntu.com/ubuntu/pool/universe/n/nvidia-cuda-toolkit/

  2. Extract them and copy needed shared object (libraries) to /usr/local/lib/

You can do the same for boost libraries. These libraries are versioned so you can put many in same system. The only limit for easy install is the packaging, they have put them under same name.

If you think it is required to have multiple version in the same system and it is widely applicable, file a bug report for it.

user.dz
  • 49,176
-1

I think the library version for libcudart in Xenial is 7.5. Can you try targeting those instead (Same for libcublas and libcurand)?

Boost has been upped to version .58. You also might need to install libboost-system-dev in addition to libbost-system (Not a boot developer, take this salt). Same with libboost-thread and libboost-python.

It's very possible that they haven't changed the packages to match 16.04 and instead are targeting trusty which appears to have those package versions.