MXNetToCaffeConverter icon indicating copy to clipboard operation
MXNetToCaffeConverter copied to clipboard

make error

Open koizora223 opened this issue 8 years ago • 2 comments

Hi @pertusa I use Atlas as BLAS and my caffe is installed in virtualenv.

When i ran make,I got: g++ objs/mxnet_to_caffe.o objs/mxnet_my_c_predict_api.o -lm -lboost_serialization -lboost_filesystem -fopenmp -Wl,--whole-archive /home/jason/download/caffe/caffe-master/build/lib/libcaffe.a -Wl,--no-whole-archive -lprotobuf -lglog -lgflags -lboost_system -lboost_thread -llmdb -lleveldb /usr/lib/x86_64-linux-gnu/libhdf5.so /usr/lib/x86_64-linux-gnu/libhdf5_hl.so -L /usr/lib -latlas -L /usr/local/cuda/lib64 -lcudart -lcublas -lcurand -lcudnn /home/jason/download/mxnet/mxnet/lib/libmxnet.so pkg-config --libs opencv -o "mxnet_to_caffe" /usr/bin/ld: /home/jason/download/caffe/caffe-master/build/lib/libcaffe.a(math_functions.o): undefined reference to symbol 'cblas_sgemm' //usr/lib/libcblas.so.3: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

I think it may be the Atlas's problem?

koizora223 avatar Nov 30 '16 14:11 koizora223

It may be because Atlas is a C library (not C++). You can replace it by another library, or try to add this at the beginning of mxnet_my_c_predict_api.h:

extern "C" { #include <cblas.h> }

From: http://stackoverflow.com/questions/10786237/atlas-gemm-linking-undefined-reference-to-cblas-sgemm

pertusa avatar Nov 30 '16 16:11 pertusa

@pertusa It works. Cheers!

koizora223 avatar Dec 01 '16 11:12 koizora223