Caffe: make all error

Created on 28 Jun 2014  路  13Comments  路  Source: BVLC/caffe

I get the following errors when I do 'make all', although I installed all the required dependencies.

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

Using Ubuntu 12.10. Thanks.

Most helpful comment

install libatlas-base-dev solve my problem. Thanks @inexxt .

All 13 comments

The same happens with openblas. It's weird because I see earlier commands with -lcblas -latlas that works and all of sudden it fails.

Had the same problem on Ubuntu 15.04, the solution from ^link hasn't worked, it appeared that one has to install libatlas-base-dev. Maybe it's worth to add it to dependencies.

install libatlas-base-dev solve my problem. Thanks @inexxt .

libcblas.so may also present in subdirectory of /usr/lib. Check whether libcblas.so is present in /usr/lib/atlas. If exists, then include this path.

I had this problem any one with solution...
CXX src/caffe/layer.cpp
CXX src/caffe/data_reader.cpp
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lopencv_imgcodecs
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

Ubuntu 14.04, installing libatlas-base-dev solved my problem too.

Ubuntu 16.04, installing libatlas-base-dev solved my problem too.

@habemen
Long shot but I have the same problem, any ideas how to fix it?

@duygusar pkg-config --modversion opencv run this command on terminal to check opencv version if it is not version 3 then comment out OPENCV_VERSION := 3 in makefile.config

@nerdykamil thanks but it is opencv3.3 as I intended, I installed it from build myself and as far as I know 3 is recommended for computation > 6.0 GPUs. Opencv 3.3 has some changes Caffe build doesn't support yet (can't refer to some files as opencv separated them but content is the same) but what I did solves the problem:

I am not sure what worked exactly since I didn't take notes, as far as I remember

1.First, make sure you run this to satisfy all python requirements
sudo sh -c 'for req in $(cat requirements.txt); do pip install $req; done'
2.Then Follow the answer to this question religiously (for OpenCV 3.3 at least but possibly for 3.2 as well):
https://stackoverflow.com/questions/46584000/cmake-error-variables-are-set-to-notfound

On Ubuntu 18.04, installing libatlas-base-dev solved my problem as well.

Can you take a look at this problem?

This is the error that i got when i tried to make caffe:

rheza@rheza-VirtualBox:~/Documents/BirdWatcher/caffe$ make all
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lhdf5_hl
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

Any help will be appreciated. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dfotland picture dfotland  路  3Comments

FreakTheMighty picture FreakTheMighty  路  3Comments

iamhankai picture iamhankai  路  3Comments

malreddysid picture malreddysid  路  3Comments

Ruhjkg picture Ruhjkg  路  3Comments