1

I am trying to build caffe after the instructions on http://caffe.berkeleyvision.org/installation.html#prerequisites When compiling i get the following error: (I use Fedora 22)

$make all
CXX src/caffe/data_transformer.cpp
In file included from ./include/caffe/blob.hpp:8:0,
                 from ./include/caffe/data_transformer.hpp:6,
                 from src/caffe/data_transformer.cpp:6:
./include/caffe/common.hpp:5:27: fatal error: gflags/gflags.h: No such file or directory
compilation terminated.
Makefile:516: recipe for target '.build_release/src/caffe/data_transformer.o' failed
make: *** [.build_release/src/caffe/data_transformer.o] Error 1

What am i doin wrong?

iqopi
  • 141
  • 1
  • 2

2 Answers2

2

You have to install missing dependencies (gflags).

Fedora/RHEL/CentOS: sudo yum install gflags-devel

Ubuntu: sudo apt-get install libgflags-dev

There are also instructions for other dependencies:

Fedora/RHEL/CentOS :http://caffe.berkeleyvision.org/install_yum.html

Ubuntu: http://caffe.berkeleyvision.org/install_apt.html

Elchin Valiyev
  • 105
  • 3
  • 10
0

To install missing gflag dependencies

wget https://github.com/schuhschuh/gflags/archive/master.zip
unzip master.zip
cd gflags-master
mkdir build && cd build
export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
make 
sudo make install
Irtaza
  • 599
  • 10
  • 18
  • This fails for me: -- Could NOT find GFlags (missing: GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY) -- Found Git: /usr/bin/git (found version "1.8.3.1") -- Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY) -- Found PROTOBUF: /usr/lib64/libprotobuf.so -- Found PROTOBUF Compiler: /usr/bin/protoc CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) – Prune Aug 08 '16 at 17:06