mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

binutils-2.24/bin/ld: cannot find -lopenblas

Open defaultRobot opened this issue 9 years ago • 5 comments

For bugs or installation issues, please provide the following information. The more information you provide, the more likely people will be able to help you.

Environment info

Operating System: centos 6.5 x86_64 Compiler: g++ (GCC) 4.8.5 ldd (GNU libc) 2.12 opencv-2.4.13 openblase-0.2.15 binutils-2.24

Error Message:

Please paste the full error message, including stack trace. /opt/pb/binutils-2.24/bin/ld: cannot find -lopenblas collect2: error: ld returned 1 exit status make: *** [lib/libmxnet.so] Error 1 make: *** Waiting for unfinished jobs.... /opt/pb/binutils-2.24/bin/ld: cannot find -lopenblas collect2: error: ld returned 1 exit status make: *** [bin/im2rec] Error 1

What have you tried to solve it?

1.reinstall openblas 2.set mxnet/config.mk: 31#ADD_LDFLAGS = -L/opt/openblas -L/opt/openblas/include 34#ADD_CFLAGS = -L/opt/openblas -L/opt/openblas/include 96#USE_BLAS = openblas 3.cd mxnet and make stills fail

defaultRobot avatar Dec 28 '16 11:12 defaultRobot

try this: ADD_LDFLAGS = -L/opt/openblas -L/opt/openblas/lib

howard0su avatar Dec 28 '16 11:12 howard0su

@howard0su thx. I try your solution and don't recieve errors. I execute the 'python setup.py install', it's ok now. But I import mxnet twice, then have two different errors: import error 1:OSError: libopenblas.so.0: cannot open shared object file: No such file or directory import error 2: from .base import MXNetError File "/data/apps/anaconda/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/base.py", line 10, in from . import libinfo ImportError: cannot import name libinfo

can you have any idea to solve it ? Thank you very much!

defaultRobot avatar Dec 29 '16 02:12 defaultRobot

You need add /opt/openblas/lib to your LD path. you can search internet for "Linux ldconfig"

or a simper solution, copy libopenblas.* from /opt/openblas/lib/ to /usr/local/lib64 (maybe /usr/local/lib) depends on your env. i don't have centos to check for sure.) after copy, run the command to refresh ld cacahe: "sudo ldconfig"

howard0su avatar Dec 29 '16 02:12 howard0su

@howard0su thx! I follow your solutions and find just copy libopenblas.*, still meet errors. Then I decide to set LD_LIBRARY_PATH in .bashrc file to add openblas and opencv. then source the file to make it work. the set: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib64:/opt/openblas/lib:/data/apps/opencv-2.4.13/release/lib

now I can import mxnet successfully. I will check it can run well.

defaultRobot avatar Dec 29 '16 03:12 defaultRobot

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!

yajiedesign avatar Sep 28 '17 07:09 yajiedesign