Closed Alvin2580du closed 7 years ago
The linker cannot find the libraries to link your final shared object against. Because either:
Do you have those libraries? To start off you can try build with USE_OPENCV = 0
and also add the path to your openblas installation for eg: ADD_LDFLAGS=-L../../OpenBLAS
in your config.mk
OpenCV3 has issues linking with -lopencv_imgcodecs. mxnet uses pkgconfig to find the opencv libraries, and opencv generates an opencv.pc, or opencv-3.2.0-dev.pc file somewhere for this. Copy the opencv.pc file into /usr/lib/pkgconfig/ and mxnet should be able to find the opencv binaries.
aften the installationg of the OpenBLASS, run the command below to put the related lib file in to the path :/opt/OpenBLAS. sudo make PREFIX=/opt/OpenBLAS install
THEN :
You need add /opt/openblas/lib to your LD path by doing this:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/:usr/local/cuda/lib:/opt/OpenBLAS/lib:/usr/local/lib
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"
Thank you very much, I have solve it.
This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks! Also, do please check out our forum (and Chinese version) for general "how-to" questions.
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:
Compiler:
Package used (Python/R/Scala/Julia):
MXNet version:
Or if installed from source:
MXNet commit hash (
git rev-parse HEAD
):If you are using python package, please provide
Python version and distribution:
If you are using R package, please provide
R
sessionInfo()
:Error Message:
itching.so -lopencv_sta - build/src/operator/tensor/elemwise_binary_broadcast_op_logic_gpu.o itching /usr/lib/x86_64-linux-gnu/libopencv_superres.so -lopencv_superres /usr/lib/x86_64-linux-gnu/libopencv_ts.so /usr/lib/x86_64-linux-gnu/libopencv_video.so -lopencv_video /usr/lib/x86_64-linux-gnu/libopencv_videostab.so -lopencv_videostab -lcudnn -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lcuda \ -Wl,--whole-archive /home/dms/install_program/mxnet/nnvm/lib/libnnvm.a -Wl,--no-whole-archive a - build/src/operator/tensor/elemwise_binary_op_logic_gpu.o a - build/src/operator/contrib/multibox_detection_gpu.o a - build/src/operator/contrib/multibox_target_gpu.o a - build/src/operator/contrib/proposal_gpu.o a - build/src/operator/contrib/multibox_prior_gpu.o a - build/src/operator/custom/native_op_gpu.o a - build/src/ndarray/ndarray_function_gpu.o a - build/src/operator/svm_output_gpu.o a - build/src/operator/optimizer_op_gpu.o a - build/src/operator/fully_connected_gpu.o a - build/src/operator/pooling_v1_gpu.o a - build/src/operator/lrn_gpu.o a - build/src/operator/grid_generator_gpu.o a - build/src/operator/softmax_activation_gpu.o a - build/src/operator/pooling_gpu.o a - build/src/operator/regression_output_gpu.o a - build/src/operator/leaky_relu_gpu.o a - build/src/operator/identity_attach_KL_sparse_reg_gpu.o a - build/src/operator/sequence_mask_gpu.o a - build/src/operator/activation_gpu.o a - build/src/operator/roi_pooling_gpu.o a - build/src/operator/cudnn_batch_norm_gpu.o a - build/src/operator/loss_binary_op_gpu.o a - build/src/operator/convolution_gpu.o a - build/src/operator/l2_normalization_gpu.o a - build/src/operator/batch_norm_gpu.o a - build/src/operator/upsampling_gpu.o a - build/src/operator/concat_gpu.o a - build/src/operator/sequence_reverse_gpu.o a - build/src/operator/slice_channel_gpu.o a - build/src/operator/dropout_gpu.o a - build/src/operator/bilinear_sampler_gpu.o a - build/src/operator/pad_gpu.o a - build/src/operator/correlation_gpu.o a - build/src/operator/instance_norm_gpu.o a - build/src/operator/softmax_output_gpu.o a - build/src/operator/rnn_gpu.o a - build/src/operator/convolution_v1_gpu.o a - build/src/operator/crop_gpu.o a - build/src/operator/spatial_transformer_gpu.o a - build/src/operator/deconvolution_gpu.o a - build/src/operator/swapaxis_gpu.o a - build/src/operator/make_loss_gpu.o a - build/src/operator/sequence_last_gpu.o g++ -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/home/dms/install_program/mxnet/mshadow/ -I/home/dms/install_program/mxnet/dmlc-core/include -fPIC -I/home/dms/install_program/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/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1 -I/usr/include/openblas -I/home/dms/install_program/mxnet/cub -DMXNET_USE_NVRTC=0 -std=c++11 -o bin/im2rec tools/im2rec.cc build/src/operator/nn/softmax.o build/src/operator/mkl/mkl_cppwrapper.o build/src/operator/mkl/mkl_memory.o build/src/operator/tensor/elemwise_binary_broadcast_op_extended.o build/src/operator/tensor/elemwise_binary_op_extended.o build/src/operator/tensor/matrix_op.o build/src/operator/tensor/elemwise_sum.o build/src/operator/tensor/init_op.o build/src/operator/tensor/elemwise_binary_broadcast_op_basic.o build/src/operator/tensor/broadcast_reduce_op_index.o build/src/operator/tensor/broadcast_reduce_op_value.o build/src/operator/tensor/elemwise_unary_op.o build/src/operator/tensor/elemwise_binary_op_basic.o build/src/operator/tensor/elemwise_binary_scalar_op_extended.o build/src/operator/tensor/indexing_op.o build/src/operator/tensor/ordering_op.o build/src/operator/tensor/elemwise_binary_broadcast_op_logic.o build/src/operator/tensor/sample_op.o build/src/operator/tensor/elemwise_binary_op_logic.o build/src/operator/tensor/control_flow_op.o build/src/operator/tensor/elemwise_binary_scalar_op_basic.o build/src/operator/tensor/elemwise_binary_scalar_op_logic.o build/src/operator/nnpack/nnpack_util.o build/src/operator/contrib/multibox_target.o build/src/operator/contrib/multibox_prior.o build/src/operator/contrib/multibox_detection.o build/src/operator/contrib/proposal.o build/src/operator/custom/native_op.o build/src/operator/custom/ndarray_op.o build/src/operator/custom/custom.o build/src/io/io.o build/src/io/image_aug_default.o build/src/io/iter_csv.o build/src/io/image_io.o build/src/io/iter_image_recordio.o build/src/io/iter_mnist.o build/src/common/mxrtc.o build/src/nnvm/legacy_op_util.o build/src/nnvm/legacy_json_util.o build/src/ndarray/ndarray_function.o build/src/ndarray/ndarray.o build/src/operator/instance_norm.o build/src/operator/loss_binary_op.o build/src/operator/rnn.o build/src/operator/convolution_v1.o build/src/operator/crop.o build/src/operator/sequence_reverse.o build/src/operator/spatial_transformer.o build/src/operator/swapaxis.o build/src/operator/batch_norm.o build/src/operator/operator_util.o build/src/operator/operator.o build/src/operator/sequence_last.o build/src/operator/correlation.o build/src/operator/make_loss.o build/src/operator/svm_output.o build/src/operator/deconvolution.o build/src/operator/optimizer_op.o build/src/operator/lrn.o build/src/operator/pooling_v1.o build/src/operator/pad.o build/src/operator/sequence_mask.o build/src/operator/grid_generator.o build/src/operator/identity_attach_KL_sparse_reg.o build/src/operator/activation.o build/src/operator/bilinear_sampler.o build/src/operator/fully_connected.o build/src/operator/pooling.o build/src/operator/softmax_output.o build/src/operator/convolution.o build/src/operator/cudnn_batch_norm.o build/src/operator/cross_device_copy.o build/src/operator/regression_output.o build/src/operator/l2_normalization.o build/src/operator/upsampling.o build/src/operator/concat.o build/src/operator/leaky_relu.o build/src/operator/roi_pooling.o build/src/operator/cudnn_convolution.o build/src/operator/slice_channel.o build/src/operator/dropout.o build/src/operator/softmax_activation.o build/src/engine/profiler.o build/src/engine/naive_engine.o build/src/engine/threaded_engine_pooled.o build/src/engine/engine.o build/src/engine/threaded_engine.o build/src/engine/threaded_engine_perdevice.o build/src/storage/storage.o build/src/c_api/c_api_executor.o build/src/c_api/c_api_symbolic.o build/src/c_api/c_api_ndarray.o build/src/c_api/c_predict_api.o build/src/c_api/c_api.o build/src/c_api/c_api_error.o build/src/executor/inplace_addto_detect_pass.o build/src/executor/graph_executor.o build/src/executor/attach_op_execs_pass.o build/src/executor/attach_op_resource_pass.o build/src/kvstore/kvstore.o build/src/resource.o build/src/initialize.o /home/dms/install_program/mxnet/dmlc-core/libdmlc.a /home/dms/install_program/mxnet/nnvm/lib/libnnvm.a build/src/operator/nn/softmax_gpu.o build/src/operator/tensor/elemwise_binary_op_extended_gpu.o build/src/operator/tensor/elemwise_binary_scalar_op_extended_gpu.o build/src/operator/tensor/elemwise_binary_scalar_op_basic_gpu.o build/src/operator/tensor/matrix_op_gpu.o build/src/operator/tensor/ordering_op_gpu.o build/src/operator/tensor/elemwise_binary_broadcast_op_extended_gpu.o build/src/operator/tensor/sample_op_gpu.o build/src/operator/tensor/elemwise_binary_op_basic_gpu.o build/src/operator/tensor/elemwise_sum_gpu.o build/src/operator/tensor/init_op_gpu.o build/src/operator/tensor/broadcast_reduce_op_index_gpu.o build/src/operator/tensor/elemwise_binary_scalar_op_logic_gpu.o build/src/operator/tensor/broadcast_reduce_op_value_gpu.o build/src/operator/tensor/control_flow_op_gpu.o build/src/operator/tensor/elemwise_binary_broadcast_op_basic_gpu.o build/src/operator/tensor/elemwise_unary_op_gpu.o build/src/operator/tensor/indexing_op_gpu.o build/src/operator/tensor/elemwise_binary_broadcast_op_logic_gpu.o build/src/operator/tensor/elemwise_binary_op_logic_gpu.o build/src/operator/contrib/multibox_detection_gpu.o build/src/operator/contrib/multibox_target_gpu.o build/src/operator/contrib/proposal_gpu.o build/src/operator/contrib/multibox_prior_gpu.o build/src/operator/custom/native_op_gpu.o build/src/ndarray/ndarray_function_gpu.o build/src/operator/svm_output_gpu.o build/src/operator/optimizer_op_gpu.o build/src/operator/fully_connected_gpu.o build/src/operator/pooling_v1_gpu.o build/src/operator/lrn_gpu.o build/src/operator/grid_generator_gpu.o build/src/operator/softmax_activation_gpu.o build/src/operator/pooling_gpu.o build/src/operator/regression_output_gpu.o build/src/operator/leaky_relu_gpu.o build/src/operator/identity_attach_KL_sparse_reg_gpu.o build/src/operator/sequence_mask_gpu.o build/src/operator/activation_gpu.o build/src/operator/roi_pooling_gpu.o build/src/operator/cudnn_batch_norm_gpu.o build/src/operator/loss_binary_op_gpu.o build/src/operator/convolution_gpu.o build/src/operator/l2_normalization_gpu.o build/src/operator/batch_norm_gpu.o build/src/operator/upsampling_gpu.o build/src/operator/concat_gpu.o build/src/operator/sequence_reverse_gpu.o build/src/operator/slice_channel_gpu.o build/src/operator/dropout_gpu.o build/src/operator/bilinear_sampler_gpu.o build/src/operator/pad_gpu.o build/src/operator/correlation_gpu.o build/src/operator/instance_norm_gpu.o build/src/operator/softmax_output_gpu.o build/src/operator/rnn_gpu.o build/src/operator/convolution_v1_gpu.o build/src/operator/crop_gpu.o build/src/operator/spatial_transformer_gpu.o build/src/operator/deconvolution_gpu.o build/src/operator/swapaxis_gpu.o build/src/operator/make_loss_gpu.o build/src/operator/sequence_last_gpu.o -pthread -lm -lcudart -lcublas -lcurand -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -lopenblas -fopenmp -lrt /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so -lopencv_calib3d /usr/lib/x86_64-linux-gnu/libopencv_contrib.so -lopencv_contrib /usr/lib/x86_64-linux-gnu/libopencv_core.so -lopencv_core /usr/lib/x86_64-linux-gnu/libopencv_features2d.so -lopencv_features2d /usr/lib/x86_64-linux-gnu/libopencv_flann.so -lopencv_flann /usr/lib/x86_64-linux-gnu/libopencv_gpu.so -lopencv_gpu /usr/lib/x86_64-linux-gnu/libopencv_highgui.so -lopencv_highgui /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so -lopencv_imgproc /usr/lib/x86_64-linux-gnu/libopencv_legacy.so -lopencv_legacy /usr/lib/x86_64-linux-gnu/libopencv_ml.so -lopencv_ml /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so -lopencv_objdetect /usr/lib/x86_64-linux-gnu/libopencv_ocl.so -lopencv_ocl /usr/lib/x86_64-linux-gnu/libopencv_photo.so -lopencv_photo /usr/lib/x86_64-linux-gnu/libopencv_stitching.so -lopencv_stitching /usr/lib/x86_64-linux-gnu/libopencv_superres.so -lopencv_superres /usr/lib/x86_64-linux-gnu/libopencv_ts.so /usr/lib/x86_64-linux-gnu/libopencv_video.so -lopencv_video /usr/lib/x86_64-linux-gnu/libopencv_videostab.so -lopencv_videostab -lcudnn -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lcuda /usr/bin/ld: cannot find -lopenblas /usr/bin/ld: cannot find -lopencv_imgcodecs /usr/bin/ld: cannot find -lopenblas /usr/bin/ld: cannot find -lopencv_imgcodecs collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status Makefile:237: recipe for target 'lib/libmxnet.so' failed make: [lib/libmxnet.so] Error 1 make: Waiting for unfinished jobs.... Makefile:259: recipe for target 'bin/im2rec' failed make: *** [bin/im2rec] Error 1
Minimum reproducible example
if you are using your own code, please provide a short script that reproduces the error.
Steps to reproduce
or if you are running standard examples, please provide the commands you have run that lead to the error.
1. 2. 3.
What have you tried to solve it?