Caffe: / usr / bin / ld: cannot find -lcblas

I installed BLAS on my CentOS7 (64 bit). But when my use is make allin my

'caffe'. It reports an error:

/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas
collect2: error: ld returned 1 exit status
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

I do not know why this happened and how to solve it.

+4
source share
4 answers

As a result, I used OpenBLAS to solve this problem.

yum install openblas-devel
sed -i 's/BLAS := atlas/BLAS := open/' Makefile.config
sed -i '/BLAS := open/aBLAS_INCLUDE := \/usr\/include\/openblas/' Makefile.config

which means installing OpenBLAS and changing BLAS := altasto BLAS := open and add BLAS_INCLUDE := /usr/include/openblas/to Makefile.config. After you make these changes, rebuild.

+1
source

sudo yum install atlas-develto install the ATLAS library and try compiling Caffe again.

0
source

sudo yum install atlas-devel

Makefile.config

BLAS_INCLUDE := /usr/include
BLAS_LIB := /usr/lib64/atlas

.

 36 # The target shared library name
 37 LIBRARY_NAME := $(PROJECT)
 38 LIB_BUILD_DIR := $(BUILD_DIR)/lib
 39 STATIC_NAME := $(LIB_BUILD_DIR)/lib$(LIBRARY_NAME).a
 40 DYNAMIC_VERSION_MAJOR       := 1
 41 DYNAMIC_VERSION_MINOR       := 0
 42 DYNAMIC_VERSION_REVISION    := 0-rc3
 43 DYNAMIC_NAME_SHORT := lib$(LIBRARY_NAME).so
 44 #DYNAMIC_SONAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR)
 45 DYNAMIC_VERSIONED_NAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR).$(DYNAMIC_VERSION_    MINOR).$(DYNAMIC_VERSION_REVISION)
 46 DYNAMIC_NAME := $(LIB_BUILD_DIR)/$(DYNAMIC_VERSIONED_NAME_SHORT)
 47 COMMON_FLAGS += -DCAFFE_VERSION=$(DYNAMIC_VERSION_MAJOR).$(DYNAMIC_VERSION_MINOR).$(DYNAMIC_VERSI    ON_REVISION)
 48 
 49 BLAS_INCLUDE := /usr/include
 50 BLAS_LIB := /usr/lib64/atlas

I also ran into the same problem when creating coffee on amazon in-depth study of ami and found a solution here: https://groups.google.com/forum/#!topic/caffe-users/Pyfp9eQoIMQ

0
source

1.Download the atlas from here

2. Change to the root directory of the open atlas. Install it using the instructions:

mkdir build
cd build 
../configure --shared
make
make install

3. Extract the Makefile.configcaffe file :

BLAS_LIB := /usr/local/atlas/lib/

/usr/local/atlas/lib/ contains libtatlas.so

0
source

All Articles