Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

fatal error: cblas.h: No such file or directory #9937

Open
zhengduoru opened this issue Mar 1, 2018 · 4 comments
Open

fatal error: cblas.h: No such file or directory #9937

zhengduoru opened this issue Mar 1, 2018 · 4 comments

Comments

@zhengduoru
Copy link

My system is Ubuntu 16.04.
when I run code make -j4 USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1

I got the error

g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/home/duoduo/github/mxnet/mshadow/ -I/home/duoduo/github/mxnet/dmlc-core/include -fPIC -I/home/duoduo/github/mxnet/nnvm/include -Iinclude -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/local/include/opencv -I/usr/local/include -fopenmp -DMSHADOW_USE_CUDNN=1 -I/home/duoduo/github/mxnet/cub -DMXNET_USE_NVRTC=0 -MMD -c src/operator/nn/softmax.cc -o build/src/operator/nn/softmax.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/home/duoduo/github/mxnet/mshadow/ -I/home/duoduo/github/mxnet/dmlc-core/include -fPIC -I/home/duoduo/github/mxnet/nnvm/include -Iinclude -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/local/include/opencv -I/usr/local/include -fopenmp -DMSHADOW_USE_CUDNN=1 -I/home/duoduo/github/mxnet/cub -DMXNET_USE_NVRTC=0 -MMD -c src/operator/mkl/mkl_memory.cc -o build/src/operator/mkl/mkl_memory.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/home/duoduo/github/mxnet/mshadow/ -I/home/duoduo/github/mxnet/dmlc-core/include -fPIC -I/home/duoduo/github/mxnet/nnvm/include -Iinclude -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/local/include/opencv -I/usr/local/include -fopenmp -DMSHADOW_USE_CUDNN=1 -I/home/duoduo/github/mxnet/cub -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/elemwise_binary_broadcast_op_basic.cc -o build/src/operator/tensor/elemwise_binary_broadcast_op_basic.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/home/duoduo/github/mxnet/mshadow/ -I/home/duoduo/github/mxnet/dmlc-core/include -fPIC -I/home/duoduo/github/mxnet/nnvm/include -Iinclude -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/local/include/opencv -I/usr/local/include -fopenmp -DMSHADOW_USE_CUDNN=1 -I/home/duoduo/github/mxnet/cub -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/elemwise_binary_op_extended.cc -o build/src/operator/tensor/elemwise_binary_op_extended.o
In file included from /home/duoduo/github/mxnet/mshadow/mshadow/tensor.h:16:0,
from include/mxnet/base.h:13,
from src/operator/nn/./../mxnet_op.h:10,
from src/operator/nn/./softmax-inl.h:11,
from src/operator/nn/softmax.cc:6:
/home/duoduo/github/mxnet/mshadow/mshadow/./base.h:136:23: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:207: recipe for target 'build/src/operator/nn/softmax.o' failed
make: *** [build/src/operator/nn/softmax.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /home/duoduo/github/mxnet/mshadow/mshadow/tensor.h:16:0,
from include/mxnet/./base.h:13,
from include/mxnet/operator.h:19,
from src/operator/mkl/../operator_common.h:13,
from src/operator/mkl/mkl_memory.cc:22:
/home/duoduo/github/mxnet/mshadow/mshadow/./base.h:136:23: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:207: recipe for target 'build/src/operator/mkl/mkl_memory.o' failed
make: *** [build/src/operator/mkl/mkl_memory.o] Error 1
In file included from /home/duoduo/github/mxnet/mshadow/mshadow/tensor.h:16:0,
from include/mxnet/./base.h:13,
from include/mxnet/operator_util.h:24,
from src/operator/tensor/./elemwise_unary_op.h:9,
from src/operator/tensor/elemwise_binary_broadcast_op_basic.cc:6:
/home/duoduo/github/mxnet/mshadow/mshadow/./base.h:136:23: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:207: recipe for target 'build/src/operator/tensor/elemwise_binary_broadcast_op_basic.o' failed
make: *** [build/src/operator/tensor/elemwise_binary_broadcast_op_basic.o] Error 1
In file included from /home/duoduo/github/mxnet/mshadow/mshadow/tensor.h:16:0,
from include/mxnet/./base.h:13,
from include/mxnet/operator_util.h:24,
from src/operator/tensor/./elemwise_unary_op.h:9,
from src/operator/tensor/elemwise_binary_op_extended.cc:6:
/home/duoduo/github/mxnet/mshadow/mshadow/./base.h:136:23: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:207: recipe for target 'build/src/operator/tensor/elemwise_binary_op_extended.o' failed
make: *** [build/src/operator/tensor/elemwise_binary_op_extended.o] Error 1

how can I solve this problem

@reminisce
Copy link
Contributor

You need to install openblas. Please follow the steps here for building from source.
http://mxnet.incubator.apache.org/install/index.html
Try this
sudo apt-get install libopenblas-dev.

@ericzw
Copy link

ericzw commented Jul 23, 2018

good issue!

@piyushghai
Copy link
Contributor

@zhengduoru Did installing openblas help resolve your issue ?
If it did resolve your issue, please feel free to close the issue :)

@piyushghai
Copy link
Contributor

@mxnet-label-bot [Pending Requester Info]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants