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

Unable to make caffe on CentOS 7 #3852

Closed
linrio opened this issue Mar 20, 2016 · 10 comments
Closed

Unable to make caffe on CentOS 7 #3852

linrio opened this issue Mar 20, 2016 · 10 comments

Comments

@linrio
Copy link

linrio commented Mar 20, 2016

CentOS 7.
I reference the Tutorial in http://www.aymeric.net/journal/2015/07/tutorial-install-caffe-on-centos-7/

Edit the line
BLAS := open

And add a new line under it:
BLAS_INCLUDE := /usr/include/openblas

Then edit line: PYTHON_INCLUDE := /usr/include/python2.7
/usr/lib64/python2.7/site-packages/numpy/core/include

Then edit line:
CPU_ONLY := 1

save Makefile.config
[root@lingfeng caffe-master]# sudo make all
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/blob.cpp
CXX src/caffe/common.cpp
CXX src/caffe/data_reader.cpp
CXX src/caffe/data_transformer.cpp
CXX src/caffe/internal_thread.cpp
CXX src/caffe/layer.cpp
CXX src/caffe/layer_factory.cpp
CXX src/caffe/layers/absval_layer.cpp
CXX src/caffe/layers/accuracy_layer.cpp
CXX src/caffe/layers/argmax_layer.cpp
CXX src/caffe/layers/base_conv_layer.cpp
CXX src/caffe/layers/base_data_layer.cpp
CXX src/caffe/layers/batch_norm_layer.cpp
CXX src/caffe/layers/batch_reindex_layer.cpp
CXX src/caffe/layers/bias_layer.cpp
CXX src/caffe/layers/bnll_layer.cpp
CXX src/caffe/layers/concat_layer.cpp
CXX src/caffe/layers/contrastive_loss_layer.cpp
CXX src/caffe/layers/conv_layer.cpp
CXX src/caffe/layers/crop_layer.cpp
CXX src/caffe/layers/cudnn_conv_layer.cpp
CXX src/caffe/layers/cudnn_lcn_layer.cpp
CXX src/caffe/layers/cudnn_lrn_layer.cpp
CXX src/caffe/layers/cudnn_pooling_layer.cpp
CXX src/caffe/layers/cudnn_relu_layer.cpp
CXX src/caffe/layers/cudnn_sigmoid_layer.cpp
CXX src/caffe/layers/cudnn_softmax_layer.cpp
CXX src/caffe/layers/cudnn_tanh_layer.cpp
CXX src/caffe/layers/data_layer.cpp
CXX src/caffe/layers/deconv_layer.cpp
CXX src/caffe/layers/dropout_layer.cpp
CXX src/caffe/layers/dummy_data_layer.cpp
CXX src/caffe/layers/eltwise_layer.cpp
CXX src/caffe/layers/elu_layer.cpp
CXX src/caffe/layers/embed_layer.cpp
CXX src/caffe/layers/euclidean_loss_layer.cpp
CXX src/caffe/layers/exp_layer.cpp
CXX src/caffe/layers/filter_layer.cpp
CXX src/caffe/layers/flatten_layer.cpp
CXX src/caffe/layers/hdf5_data_layer.cpp
CXX src/caffe/layers/hdf5_output_layer.cpp
CXX src/caffe/layers/hinge_loss_layer.cpp
CXX src/caffe/layers/im2col_layer.cpp
CXX src/caffe/layers/image_data_layer.cpp
CXX src/caffe/layers/infogain_loss_layer.cpp
CXX src/caffe/layers/inner_product_layer.cpp
CXX src/caffe/layers/input_layer.cpp
CXX src/caffe/layers/log_layer.cpp
CXX src/caffe/layers/loss_layer.cpp
CXX src/caffe/layers/lrn_layer.cpp
CXX src/caffe/layers/memory_data_layer.cpp
CXX src/caffe/layers/multinomial_logistic_loss_layer.cpp
CXX src/caffe/layers/mvn_layer.cpp
CXX src/caffe/layers/neuron_layer.cpp
CXX src/caffe/layers/pooling_layer.cpp
CXX src/caffe/layers/power_layer.cpp
CXX src/caffe/layers/prelu_layer.cpp
CXX src/caffe/layers/reduction_layer.cpp
CXX src/caffe/layers/relu_layer.cpp
CXX src/caffe/layers/reshape_layer.cpp
CXX src/caffe/layers/scale_layer.cpp
CXX src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp
CXX src/caffe/layers/sigmoid_layer.cpp
CXX src/caffe/layers/silence_layer.cpp
CXX src/caffe/layers/slice_layer.cpp
CXX src/caffe/layers/softmax_layer.cpp
CXX src/caffe/layers/softmax_loss_layer.cpp
CXX src/caffe/layers/split_layer.cpp
CXX src/caffe/layers/spp_layer.cpp
CXX src/caffe/layers/tanh_layer.cpp
CXX src/caffe/layers/threshold_layer.cpp
CXX src/caffe/layers/tile_layer.cpp
CXX src/caffe/layers/window_data_layer.cpp
CXX src/caffe/net.cpp
CXX src/caffe/parallel.cpp
CXX src/caffe/solver.cpp
CXX src/caffe/solvers/adadelta_solver.cpp
CXX src/caffe/solvers/adagrad_solver.cpp
CXX src/caffe/solvers/adam_solver.cpp
CXX src/caffe/solvers/nesterov_solver.cpp
CXX src/caffe/solvers/rmsprop_solver.cpp
CXX src/caffe/solvers/sgd_solver.cpp
CXX src/caffe/syncedmem.cpp
CXX src/caffe/util/benchmark.cpp
CXX src/caffe/util/blocking_queue.cpp
CXX src/caffe/util/cudnn.cpp
CXX src/caffe/util/db.cpp
CXX src/caffe/util/db_leveldb.cpp
CXX src/caffe/util/db_lmdb.cpp
CXX src/caffe/util/hdf5.cpp
CXX src/caffe/util/im2col.cpp
CXX src/caffe/util/insert_splits.cpp
CXX src/caffe/util/io.cpp
CXX src/caffe/util/math_functions.cpp
CXX src/caffe/util/signal_handler.cpp
CXX src/caffe/util/upgrade_proto.cpp
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/bin/ld: cannot find -lopenblas
collect2: Error :ld return 1
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error

what this problem?

@cdluminate
Copy link
Contributor

build dependency libopenblas.so is missing, you should install install openblas packages.

@linrio
Copy link
Author

linrio commented Mar 22, 2016

@cdluminate But I have installed openblas

_# rpm -qi openblas
Name : openblas
Version : 0.2.15
Release : 5.el6
Architecture: x86_64
_
And the problem still exists. After # make --debug, it shows,

file “all” does not exist.
file“lib” does not exist.
file“.build_release/lib/libcaffe.so.1.0.0-rc3” does not exist.

Maybe the BLAS library PATH is wrong?

@linrio
Copy link
Author

linrio commented Mar 23, 2016

I Reinstall the system, CentOS 7.
F12,first Install centos 7, Tab,
change
_vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet
_to
_vmlinuz initrd=initrd.img inst.stage2=hd:/dev/sdb4 quiet
_

@cdluminate
Copy link
Contributor

you may want to try cmake

$ mkdir build
$ cd build
$ cmake .. -DBLAS=Open
$ make

@linrio
Copy link
Author

linrio commented Mar 23, 2016

@cdluminate I have installed cmake. By #cmake --vrision
But I check that I never install glog dependencie successfully

@cdluminate
Copy link
Contributor

Well, dependency check is indeed one of the advantages of CMake. Can it successfully build caffe when you have all the build dependencies satisfied?

@linrio
Copy link
Author

linrio commented Mar 24, 2016

@cdluminate Toaday I solved my problem, Tks!

@seanbell
Copy link

Glad you solved it -- closing the issue.

@linrio
Copy link
Author

linrio commented Mar 26, 2016

@seanbell Sorry I forgot closing this issue. Thank you for your operation.

@ChiZhangRIT
Copy link

@linrio May I ask how you solve this problem? I met a similar problem on compiling caffe on CentOS 7.

/bin/ld: cannot find -lsnappy
But I have snappy installed on my machine. Do you have any idea what is going on?

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

No branches or pull requests

4 participants