Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building Caffe on Ubuntu: make can't find Boost's include files

I am following these instructions to install and build Caffe along with its dependencies. I built Boost and got this at the end:

The following directory should be added to compiler include paths:
   /home/ubuntu/Caffe/boost_1_57_0
The following directory should be added to linker library paths:
   /home/ubuntu/Caffe/boost_1_57_0/stage/lib

When I run make all in the caffe directory, I get this:

CXX src/caffe/blob.cpp
In file included from ./include/caffe/blob.hpp:8:0,
             from src/caffe/blob.cpp:4:
./include/caffe/common.hpp:4:32: fatal error: boost/shared_ptr.hpp: No such file or directory
compilation terminated.
make: *** [.build_release/src/caffe/blob.o] Error 1

What do I need to modify for it to find the include (and lib) files? A specific environment variable? A setting in caffe's Makefile? Something else?

like image 714
I Z Avatar asked Mar 05 '15 00:03

I Z


3 Answers

Probably you do not have boost installed on your machine

 sudo apt-get install --no-install-recommends libboost-all-dev
like image 128
Jumabek Alikhanov Avatar answered Nov 16 '22 18:11

Jumabek Alikhanov


This worked for me:

cd /usr/include/boost/thread
sudo ln -s locks.hpp latch.hpp
like image 3
Paul Nord Avatar answered Nov 16 '22 17:11

Paul Nord


Just copy your boost folder that you have built (must be named as "boost") to your /usr/local/include or /usr/include. Then run make all again.

like image 1
Amin Suzani Avatar answered Nov 16 '22 17:11

Amin Suzani