Fedora 21 Install Error: -lcblas -latlas

168 views
Skip to first unread message

flyv...@gmail.com

unread,
Jun 28, 2016, 1:48:51 PM6/28/16
to Caffe Users
Hello, this is an issue that I have seen discussed elsewhere, notably here:
https://groups.google.com/forum/#!topic/caffe-users/Pyfp9eQoIMQ
However, I do not find the solution posted in that thread to be very clear,
and I am hopeful that since some time has passed since the problem was raised in
the other thread that someone can point me in a correct direction
that is more transparent if possible. Sorry to resurrect the issue and if
this is not an appropriate way to ask the question let me know and I can
delete this post and try again some other way.

Some details:

I am running Fedora 21 and have installed both blas and atlas as per the
Fedora instructions on http://caffe.berkeleyvision.org/install_yum.html
as well as instructions in the thread I linked to above:


    sudo yum install atlas atlas-devel blas blas-devel

    Loaded plugins: langpacks
    Package atlas-3.10.1-18.fc21.x86_64 already installed and latest version
    Package atlas-devel-3.10.1-18.fc21.x86_64 already installed and latest version
    Package blas-3.5.0-10.fc21.x86_64 already installed and latest version
    Package blas-devel-3.5.0-10.fc21.x86_64 already installed and latest version
    Nothing to do

    [user@host atlas]$ ldconfig -p | grep atlas
        libtatlas.so.3 (libc6,x86-64) => /usr/lib64/atlas/libtatlas.so.3
        libtatlas.so (libc6,x86-64) => /usr/lib64/atlas/libtatlas.so
        libsatlas.so.3 (libc6,x86-64) => /usr/lib64/atlas/libsatlas.so.3
        libsatlas.so (libc6,x86-64) => /usr/lib64/atlas/libsatlas.so

    [user@host atlas]$ ldconfig -p | grep blas
        libnvblas.so.7.5 (libc6,x86-64) => /usr/local/cuda/lib64/libnvblas.so.7.5
        libnvblas.so (libc6,x86-64) => /usr/local/cuda/lib64/libnvblas.so
        liblash.so.1 (libc6,x86-64) => /lib64/liblash.so.1
        libcublas.so.7.5 (libc6,x86-64) => /usr/local/cuda/lib64/libcublas.so.7.5
        libcublas.so (libc6,x86-64) => /usr/local/cuda/lib64/libcublas.so
        libblas.so.3 (libc6,x86-64) => /lib64/libblas.so.3

My makefile is standard, except for the # BLAS choice: section which is as follows:

    # BLAS choice:
    # atlas for ATLAS (default)
    # mkl for MKL
    # open for OpenBlas
    BLAS := atlas
    # Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
    # Leave commented to accept the defaults for your choice of BLAS                                                    
    # (which should work)!
    BLAS_INCLUDE := /usr/include
    BLAS_LIB := /usr/lib64/atlas

When I run "make all" in the caffe directory the point where it fails is here:

    LD -o .build_release/lib/libcaffe.so
    /usr/bin/ld: cannot find -lcblas
    /usr/bin/ld: cannot find -latlas
    collect2: error: ld returned 1 exit status
    Makefile:503: recipe for target '.build_release/lib/libcaffe.so' failed
    make: *** [.build_release/lib/libcaffe.so] Error 1

Is there any officially-recommended course of action from the point I now find
myself at? Furthermore have I done anything unusual that might have caused this
specific situation to develop?

Lars Kastner

unread,
Feb 4, 2017, 6:59:45 AM2/4/17
to Caffe Users
Hi, I found a partial "solution" at stackoverflow. What made the -lcblas and -latlas errors go away for me was the following:

You already have libsatlas.so, just as me. Now do
cd /usr/lib64/atlas
sudo ln -s /usr/lib64/atlas/libsatlas.so libatlas.so
sudo ln -s /usr/lib64/atlas/libsatlas.so libcblas.so

Afterwards make sure that /usr/lib64 is in your LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64

Then make all worked for me. Nevertheless this is not a clean solution.

barsbek

unread,
Sep 24, 2017, 7:57:37 PM9/24/17
to Caffe Users
Hi, i had the same problem while building caffe on Fedora 26.
To solve it i installed openblas
sudo dnf install openblas-devel

set
    BLAS := open

and comment following lines
    # BLAS_INCLUDE := /usr/include
   
# BLAS_LIB := /usr/lib64/atlas

in file Makefile.config


Reply all
Reply to author
Forward
0 new messages