Results 1 to 8 of 8

Thread: cannot find -lcblas

  1. #1
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    8

    Default cannot find -lcblas

    I've got the following message during a compilation.

    Code:
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lcblas
    Which packages does contain the required library? I am using openSUSE 13.2 (x86_64).

    Details

    I would like to install mxnet. I guessed that the required library was contained in one of "atlas" packages or "libblas3". The latter has already been installed. Regarding atlas packages, "libatlas3" and "libatlas3-devel" were installed, but this does not solve the problem. So I switched the combination of libatlas3-sse3-devel, libatlas3-sse3 and libatlas3-sse-common-devel (after removing libatlas3 and libatlas3-devel because of a conflict), but these do not solve the problem neither.

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,117
    Blog Entries
    2

    Default Re: cannot find -lcblas

    Recommend installing openblas and trying again,
    Code:
    zypper in openblas-devel
    Something I was working on months ago used openblas, and it built successfully...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    8

    Default Re: cannot find -lcblas

    Thanks for your comment. The package has already installed. (I also tried openblas-devel-static, but this does not help.)

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,117
    Blog Entries
    2

    Default Re: cannot find -lcblas

    Took a look at this.

    In the end, I ran into the following which somewhat clearly suggests that the makefile which was designed to run on Debian is incorrectly looking for blas.h and not finding it. Would probably require editing the makefile config.

    First, update your system
    Code:
    zypper up
    The following was done on a LEAP, with the following dependencies...
    Code:
    zypper in git make gcc-c++ openblas-devel opencv-devel
    Then, from a directory of your choosing clone the mxnet project
    Code:
    git clone --recursive https://github.com/dmlc/mxnet
    Then, build
    Code:
    Code:
    cd mxnet && make -j4
    HTH,
    My guess is that this is likely the last issue to address to get it installed on openSUSE (yes, still optimistic guessing) is to look for the line that describes where the makefile script or base.h is looking for blas.h and point it instead to the actual location. Alternative might be to add the openblas path to your system path... I don't know if the makefile can find code in the openblas app tree as shown in my screenshot below. who knows, maybe copying blas.h in the mxnet directory tree might work(It's just a guess). Another try might be to copy all the openblas files into the mxnet directory (Since you'll likely delete the entire tree after the mxnet library file is built, this is probably OK as a temporary measure)

    TSU




    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    8

    Default Re: cannot find -lcblas

    Thanks a lot for your try and very sorry for my late reply. I recently installed Leap 42.1 and the situation did not changed.

    But after I installed cblas-devel (and libcblas3) by following this post on stackoverflow, the compile fails with the following lines.

    Code:
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcblas.so: undefined reference to `zgemm_'
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcblas.so: undefined reference to `chpmv_'
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcblas.so: undefined reference to `stpmv_'
    
    [A lot of similar message are omitted.]
    
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcblas.so: undefined reference to `cgeru_'
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcblas.so: undefined reference to `sswap_'
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libcblas.so: undefined reference to `srotmg_'
    collect2: error: ld returned 1 exit status
    Makefile:202: recipe for target 'bin/im2rec' failed
    make: *** [bin/im2rec] Error 1
    I have not succeeded in installing mxnet so far. Because the problem in the title of this thread is solved, it is probably better not to continue this thread, but if you have any idea to install mxnet, please let me know.

  6. #6

    Default Re: cannot find -lcblas

    Hey,

    here is something that allowed me to install the target library libmxnet.so on Opensuse Leap: Install openblas and in the /make/config.mk file change atlas to openblas (USE_BLAS = openblas).

    Hope this helped.

  7. #7

    Default Re: cannot find -lcblas

    FWIW I have a very similar problem on Leap 42.1 with attempting to build MXNet into Julia.
    I have two versions of Julia installed, one from the openSUSE repos version 0.4.6 and also the latest version 0.6 direct from github.
    I have attempted to install MXNet into both and the build appears to succeed on both; tests are ok in 0.6 but fail on 0.4.6.
    Tried both the edit of config.mk and the update-alternatives fixes, but nothing enables the tests on 0.4.6 as supplied in the repo.
    Good news is that the independent build of Julia version 0.6 works with MXNet.

  8. #8
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    8

    Default Re: cannot find -lcblas

    Thanks a lot, DrAwesome and colbec. "USE_BLAS = openblas" is exactly what I needed!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •