apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.73k stars 6.81k forks source link

Problem installing mxnet on Ubuntu 16.04 #4584

Closed Justin1904 closed 6 years ago

Justin1904 commented 7 years ago

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: Ubuntu 16.04

Compiler: gcc 4.9.3

Package used (Python/R/Scala/Julia): Python

MXNet version: 0.9.1

MXNet commit hash (git rev-parse HEAD): 9f9c135bbb8853351c927caf5c53e5a9524f156f

If you are using python package, please provide

Python version and distribution: Python 2.7.12

Error Message:

Please paste the full error message, including stack trace.

Building MXNet core. This can take few minutes...
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/broadcast_reduce_op_index.cc -o build/src/operator/tensor/broadcast_reduce_op_index.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/ordering_op.cc -o build/src/operator/tensor/ordering_op.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/elemwise_unary_op.cc -o build/src/operator/tensor/elemwise_unary_op.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/sample_op.cc -o build/src/operator/tensor/sample_op.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/elemwise_binary_op_logic.cc -o build/src/operator/tensor/elemwise_binary_op_logic.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/elemwise_binary_scalar_op_basic.cc -o build/src/operator/tensor/elemwise_binary_scalar_op_basic.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/elemwise_binary_scalar_op_logic.cc -o build/src/operator/tensor/elemwise_binary_scalar_op_logic.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/io/io.cc -o build/src/io/io.o
src/operator/tensor/elemwise_unary_op.cc: In lambda function:
src/operator/tensor/elemwise_unary_op.cc:35:44: error: converting to ‘std::unordered_map<std::basic_string<char>, std::basic_string<char> >’ from initializer list would use explicit constructor ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = std::basic_string<char>; _Tp = std::basic_string<char>; _Hash = std::hash<std::basic_string<char> >; _Pred = std::equal_to<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >]’
     return MakeGradNode("_zeros", n, {}, {});
                                            ^
src/operator/tensor/ordering_op.cc: In lambda function:
src/operator/tensor/ordering_op.cc:37:46: error: converting to ‘std::unordered_map<std::basic_string<char>, std::basic_string<char> >’ from initializer list would use explicit constructor ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = std::basic_string<char>; _Tp = std::basic_string<char>; _Hash = std::hash<std::basic_string<char> >; _Pred = std::equal_to<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >]’
       return MakeGradNode("_zeros", n, {}, {});
                                              ^
src/operator/tensor/ordering_op.cc: In lambda function:
src/operator/tensor/ordering_op.cc:98:44: error: converting to ‘std::unordered_map<std::basic_string<char>, std::basic_string<char> >’ from initializer list would use explicit constructor ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = std::basic_string<char>; _Tp = std::basic_string<char>; _Hash = std::hash<std::basic_string<char> >; _Pred = std::equal_to<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >]’
     return MakeGradNode("_zeros", n, {}, {});
                                            ^
src/operator/tensor/broadcast_reduce_op_index.cc: In lambda function:
src/operator/tensor/broadcast_reduce_op_index.cc:15:44: error: converting to ‘std::unordered_map<std::basic_string<char>, std::basic_string<char> >’ from initializer list would use explicit constructor ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = std::basic_string<char>; _Tp = std::basic_string<char>; _Hash = std::hash<std::basic_string<char> >; _Pred = std::equal_to<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >]’
     return MakeGradNode("_zeros", n, {}, {});
                                            ^
src/operator/tensor/broadcast_reduce_op_index.cc: In lambda function:
src/operator/tensor/broadcast_reduce_op_index.cc:23:44: error: converting to ‘std::unordered_map<std::basic_string<char>, std::basic_string<char> >’ from initializer list would use explicit constructor ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = std::basic_string<char>; _Tp = std::basic_string<char>; _Hash = std::hash<std::basic_string<char> >; _Pred = std::equal_to<std::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::basic_string<char> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::pair<const std::basic_string<char>, std::basic_string<char> > >]’
     return MakeGradNode("_zeros", n, {}, {});
                                            ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/registry.h:13:0,
                 from include/mxnet/operator_util.h:18,
                 from src/operator/tensor/./sample_op.h:9,
                 from src/operator/tensor/sample_op.cc:6:
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = long unsigned int; Y = int]’:
src/operator/tensor/././init_op.h:155:3:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/registry.h:13:0,
                 from include/mxnet/operator_util.h:18,
                 from src/operator/tensor/./ordering_op-inl.h:9,
                 from src/operator/tensor/ordering_op.cc:7:
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = long unsigned int; Y = int]’:
src/operator/tensor/./ordering_op-inl.h:415:3:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/registry.h:13:0,
                 from include/mxnet/operator_util.h:18,
                 from src/operator/tensor/./broadcast_reduce_op.h:9,
                 from src/operator/tensor/broadcast_reduce_op_index.cc:6:
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = long unsigned int; Y = int]’:
src/operator/tensor/././elemwise_binary_broadcast_op.h:24:3:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = unsigned int; Y = int]’:
src/operator/tensor/./broadcast_reduce_op.h:151:5:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/registry.h:13:0,
                 from include/mxnet/operator_util.h:18,
                 from src/operator/tensor/./elemwise_unary_op.h:9,
                 from src/operator/tensor/elemwise_binary_scalar_op_logic.cc:6:
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = long unsigned int; Y = int]’:
src/operator/tensor/./../elemwise_op_common.h:77:3:   required from ‘bool mxnet::op::ElemwiseShape(const nnvm::NodeAttrs&, std::vector<nnvm::TShape>*, std::vector<nnvm::TShape>*) [with int n_in = 1; int n_out = 1]’
src/operator/tensor/elemwise_binary_scalar_op_logic.cc:13:1:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/registry.h:13:0,
                 from include/mxnet/operator_util.h:18,
                 from src/operator/tensor/./elemwise_unary_op.h:9,
                 from src/operator/tensor/elemwise_binary_scalar_op_basic.cc:6:
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = long unsigned int; Y = int]’:
src/operator/tensor/./../elemwise_op_common.h:77:3:   required from ‘bool mxnet::op::ElemwiseShape(const nnvm::NodeAttrs&, std::vector<nnvm::TShape>*, std::vector<nnvm::TShape>*) [with int n_in = 1; int n_out = 1]’
src/operator/tensor/elemwise_binary_scalar_op_basic.cc:12:1:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/registry.h:13:0,
                 from include/mxnet/operator_util.h:18,
                 from src/operator/tensor/./elemwise_unary_op.h:9,
                 from src/operator/tensor/elemwise_binary_op_logic.cc:6:
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = long unsigned int; Y = int]’:
src/operator/tensor/./../elemwise_op_common.h:77:3:   required from ‘bool mxnet::op::ElemwiseShape(const nnvm::NodeAttrs&, std::vector<nnvm::TShape>*, std::vector<nnvm::TShape>*) [with int n_in = 2; int n_out = 1]’
src/operator/tensor/elemwise_binary_op_logic.cc:11:1:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
In file included from /home/justin1904/mxnet/mshadow/mshadow/tensor.h:1012:0,
                 from include/mxnet/./base.h:13,
                 from include/mxnet/operator_util.h:24,
                 from src/operator/tensor/./ordering_op-inl.h:9,
                 from src/operator/tensor/ordering_op.cc:7:
/home/justin1904/mxnet/mshadow/mshadow/./tensor_cpu-inl.h: In instantiation of ‘void mshadow::SortByKey(mshadow::Tensor<mshadow::cpu, 1, DType>, mshadow::Tensor<mshadow::cpu, 1, VDType>, bool) [with KDType = float; VDType = float]’:
src/operator/tensor/./ordering_op-inl.h:202:43:   required from ‘void mxnet::op::TopKImpl(mxnet::RunContext, mxnet::Resource, const mxnet::TBlob&, const std::vector<mxnet::TBlob>&, const mxnet::op::TopKParam&) [with xpu = mshadow::cpu]’
src/operator/tensor/./ordering_op-inl.h:282:73:   required from ‘void mxnet::op::TopK(const nnvm::NodeAttrs&, const mxnet::OpContext&, const std::vector<mxnet::TBlob>&, const std::vector<mxnet::OpReqType>&, const std::vector<mxnet::TBlob>&) [with xpu = mshadow::cpu]’
src/operator/tensor/ordering_op.cc:25:47:   required from here
/home/justin1904/mxnet/mshadow/mshadow/./tensor_cpu-inl.h:441:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < keys.size(0); i++) {
                     ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/registry.h:13:0,
                 from include/mxnet/operator_util.h:18,
                 from src/operator/tensor/./ordering_op-inl.h:9,
                 from src/operator/tensor/ordering_op.cc:7:
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = unsigned int; Y = int]’:
/home/justin1904/mxnet/mshadow/mshadow/././extension/broadcast_with_axis.h:197:3:   required from ‘mshadow::expr::BroadcastWithMultiAxesExp<SrcExp, DType, mshadow::expr::ExpInfo<E>::kDim> mshadow::expr::broadcast_to(const mshadow::expr::Exp<SrcExp, DType, etype>&, const TShape&) [with SrcExp = mshadow::Tensor<mshadow::cpu, 3, float>; DType = float; int etype = 0; TShape = nnvm::TShape]’
src/operator/tensor/./ordering_op-inl.h:357:87:   required from ‘void mxnet::op::TopKBackward_(const nnvm::NodeAttrs&, const mxnet::OpContext&, const std::vector<mxnet::TBlob>&, const std::vector<mxnet::OpReqType>&, const std::vector<mxnet::TBlob>&) [with xpu = mshadow::cpu]’
src/operator/tensor/ordering_op.cc:52:56:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/./io.h:14:0,
                 from /home/justin1904/mxnet/dmlc-core/include/dmlc/data.h:14,
                 from include/mxnet/io.h:9,
                 from src/io/io.cc:3:
/home/justin1904/mxnet/dmlc-core/include/dmlc/././logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = long unsigned int; Y = int]’:
src/io/./iter_normalize.h:112:9:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/././logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/././logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
In file included from /home/justin1904/mxnet/dmlc-core/include/dmlc/registry.h:13:0,
                 from include/mxnet/operator_util.h:18,
                 from src/operator/tensor/./elemwise_unary_op.h:9,
                 from src/operator/tensor/elemwise_unary_op.cc:6:
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = long unsigned int; Y = int]’:
src/operator/tensor/./../elemwise_op_common.h:77:3:   required from ‘bool mxnet::op::ElemwiseShape(const nnvm::NodeAttrs&, std::vector<nnvm::TShape>*, std::vector<nnvm::TShape>*) [with int n_in = 1; int n_out = 1]’
src/operator/tensor/elemwise_unary_op.cc:13:1:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_LT(const X&, const Y&) [with X = unsigned int; Y = int]’:
/home/justin1904/mxnet/mshadow/mshadow/././extension/transpose.h:113:7:   required from ‘mshadow::expr::TransposeIndicesExp<SrcExp, DType, dimsrc, etype>::TransposeIndicesExp(const SrcExp&, mshadow::Shape<dim>, mshadow::Shape<dim>) [with SrcExp = mshadow::Tensor<mshadow::cpu, 1, float>; DType = float; int dimsrc = 3; int etype = 0]’
/home/justin1904/mxnet/mshadow/mshadow/././extension/transpose.h:148:95:   required from ‘mshadow::expr::TransposeIndicesExp<SrcExp, DType, dimsrc, etype> mshadow::expr::transpose_indices(const mshadow::expr::Exp<SrcExp, DType, etype>&, mshadow::Shape<dim>, mshadow::Shape<dim>) [with SrcExp = mshadow::Tensor<mshadow::cpu, 1, float>; DType = float; int dimsrc = 3; int etype = 0]’
src/operator/tensor/./ordering_op-inl.h:362:52:   required from ‘void mxnet::op::TopKBackward_(const nnvm::NodeAttrs&, const mxnet::OpContext&, const std::vector<mxnet::TBlob>&, const std::vector<mxnet::OpReqType>&, const std::vector<mxnet::TBlob>&) [with xpu = mshadow::cpu]’
src/operator/tensor/ordering_op.cc:52:56:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:90:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_LT, <)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/./logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/././logging.h: In instantiation of ‘dmlc::LogCheckError dmlc::LogCheck_EQ(const X&, const Y&) [with X = int; Y = unsigned int]’:
/home/justin1904/mxnet/nnvm/include/nnvm/tuple.h:411:5:   required from ‘mshadow::Shape<ndim> nnvm::TShape::get() const [with int dim = 3]’
include/mxnet/././tensor_blob.h:214:63:   required from ‘mshadow::Tensor<Device, dim, DType> mxnet::TBlob::get(mshadow::Stream<Device>*) const [with Device = mshadow::cpu; int dim = 3; DType = float]’
src/io/./iter_normalize.h:115:74:   required from here
/home/justin1904/mxnet/dmlc-core/include/dmlc/././logging.h:94:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 DEFINE_CHECK_FUNC(_EQ, ==)
                        ^
/home/justin1904/mxnet/dmlc-core/include/dmlc/././logging.h:76:11: note: in definition of macro ‘DEFINE_CHECK_FUNC’
     if (x op y) return LogCheckError();                           \
           ^
Makefile:202: recipe for target 'build/src/operator/tensor/broadcast_reduce_op_index.o' failed
make: *** [build/src/operator/tensor/broadcast_reduce_op_index.o] Error 1
make: *** 正在等待未完成的任务....
Makefile:202: recipe for target 'build/src/operator/tensor/ordering_op.o' failed
make: *** [build/src/operator/tensor/ordering_op.o] Error 1
Makefile:202: recipe for target 'build/src/operator/tensor/elemwise_unary_op.o' failed
make: *** [build/src/operator/tensor/elemwise_unary_op.o] Error 1

Minimum reproducible example

if you are using your own code, please provide a short script that reproduces the error.

Steps to reproduce

I did exactly what the guide at mxnet.io said here: http://mxnet.io/get_started/ubuntu_setup.html , and it seems that previous steps worked out just fine. And when I execute bash install-mxnet-ubuntu-python.sh, the above problems will occur, after make -j in the script is excuted.

What have you tried to solve it?

I've tried make clean && make but same problem occurs.

piiswrong commented 7 years ago

@sxjscience Some versions of gcc doesn't support MakeGradNode("_zeros", n, {}, {}); you need to use MakeGradNode("_zeros", n, {}, std::unordered_map<std::string, std::string>());

Justin1904 commented 7 years ago

@piiswrong Sorry to say that I'm not familiar with C++ and these details. Would you give me some clues on what I should do to make the installation right? Will changing to another version of gcc help? Thanks a lot!

sxjscience commented 7 years ago

@Justin1904 You first try whether replacing the return MakeGradNode("_zeros", n, {}, {}); in the following lines to return MakeGradNode("_zeros", n, {}, std::unordered_map<std::string, std::string>()); solves the build problem. https://github.com/dmlc/mxnet/blob/master/src/operator/tensor/ordering_op.cc#L37 https://github.com/dmlc/mxnet/blob/master/src/operator/tensor/ordering_op.cc#L98 https://github.com/dmlc/mxnet/blob/master/src/operator/tensor/elemwise_unary_op.cc#L35 https://github.com/dmlc/mxnet/blob/master/src/operator/tensor/broadcast_reduce_op_index.cc#L15 https://github.com/dmlc/mxnet/blob/master/src/operator/tensor/broadcast_reduce_op_index.cc#L23

Justin1904 commented 7 years ago

@sxjscience I did what you said. Thanks for your taking the time to point out each line to change! However some other problems came up when when compiling, here's the new error message:

/tmp/cc3JZXWv.o:在函数‘main’中:
im2rec.cc:(.text.startup+0x1ac5):对‘cv::imencode(std::string const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)’未定义的引用
collect2: error: ld returned 1 exit status
Makefile:259: recipe for target 'bin/im2rec' failed
make: *** [bin/im2rec] Error 1

I can't post the full console log here as it exceeds characters limit, the above is the final error message.

sxjscience commented 7 years ago

Seems to be related to opencv.

Justin1904 commented 7 years ago

I'll try to build opencv from source later and see if that solves my problem. Thanks!

Justin1904 commented 7 years ago

@sxjscience I built opencv from source and then tried installing mxnet, but still there're problems.

make[1]: Entering directory '/home/justin1904/mxnet/dmlc-core'
make[1]: Entering directory '/home/justin1904/mxnet/nnvm'
make[1]: 'libdmlc.a' is up to date.
make[1]: Leaving directory '/home/justin1904/mxnet/dmlc-core'
make[1]: 'lib/libnnvm.a' is up to date.
make[1]: Leaving directory '/home/justin1904/mxnet/nnvm'
g++ -DMSHADOW_FORCE_STREAM -Wall -O3 -I/home/justin1904/mxnet/mshadow/ -I/home/justin1904/mxnet/dmlc-core/include -fPIC -I/home/justin1904/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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/local/include/opencv -I/usr/local/include -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -std=c++11  -o bin/im2rec tools/im2rec.cc build/src/operator/mkl/mkl_cppwrapper.o build/src/operator/mkl/mkl_memory.o build/src/operator/tensor/elemwise_binary_broadcast_op_basic.o build/src/operator/tensor/matrix_op.o build/src/operator/tensor/elemwise_binary_op_extended.o build/src/operator/tensor/init_op.o build/src/operator/tensor/broadcast_reduce_op_index.o build/src/operator/tensor/elemwise_binary_broadcast_op_extended.o build/src/operator/tensor/broadcast_reduce_op_value.o build/src/operator/tensor/ordering_op.o build/src/operator/tensor/elemwise_binary_op_basic.o build/src/operator/tensor/elemwise_unary_op.o build/src/operator/tensor/elemwise_sum.o build/src/operator/tensor/elemwise_binary_scalar_op_extended.o build/src/operator/tensor/indexing_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/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/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/svm_output.o build/src/operator/pooling.o build/src/operator/cast.o build/src/operator/crop.o build/src/operator/spatial_transformer.o build/src/operator/swapaxis.o build/src/operator/pad.o build/src/operator/softmax_output.o build/src/operator/operator_util.o build/src/operator/sequence_reverse.o build/src/operator/sequence_last.o build/src/operator/loss_binary_op.o build/src/operator/operator.o build/src/operator/optimizer_op.o build/src/operator/lrn.o build/src/operator/correlation.o build/src/operator/sequence_mask.o build/src/operator/instance_norm.o build/src/operator/leaky_relu.o build/src/operator/identity_attach_KL_sparse_reg.o build/src/operator/convolution.o build/src/operator/upsampling.o build/src/operator/deconvolution.o build/src/operator/activation.o build/src/operator/slice_channel.o build/src/operator/cudnn_batch_norm.o build/src/operator/native_op.o build/src/operator/fully_connected.o build/src/operator/regression_output.o build/src/operator/make_loss.o build/src/operator/ndarray_op.o build/src/operator/concat.o build/src/operator/roi_pooling.o build/src/operator/custom.o build/src/operator/cudnn_convolution.o build/src/operator/batch_norm.o build/src/operator/dropout.o build/src/operator/cross_device_copy.o build/src/operator/softmax_activation.o build/src/operator/l2_normalization.o build/src/operator/rnn.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_symbolic.o build/src/c_api/c_api_ndarray.o build/src/c_api/c_api_executor.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/justin1904/mxnet/dmlc-core/libdmlc.a /home/justin1904/mxnet/nnvm/lib/libnnvm.a build/src/operator/tensor/elemwise_binary_op_basic_gpu.o build/src/operator/tensor/elemwise_binary_scalar_op_basic_gpu.o build/src/operator/tensor/elemwise_binary_scalar_op_extended_gpu.o build/src/operator/tensor/elemwise_binary_broadcast_op_extended_gpu.o build/src/operator/tensor/elemwise_binary_op_extended_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/matrix_op_gpu.o build/src/operator/tensor/broadcast_reduce_op_value_gpu.o build/src/operator/tensor/ordering_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/sample_op_gpu.o build/src/operator/tensor/elemwise_binary_op_logic_gpu.o build/src/ndarray/ndarray_function_gpu.o build/src/operator/fully_connected_gpu.o build/src/operator/svm_output_gpu.o build/src/operator/optimizer_op_gpu.o build/src/operator/instance_norm_gpu.o build/src/operator/correlation_gpu.o build/src/operator/lrn_gpu.o build/src/operator/sequence_mask_gpu.o build/src/operator/swapaxis_gpu.o build/src/operator/softmax_activation_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/activation_gpu.o build/src/operator/spatial_transformer_gpu.o build/src/operator/loss_binary_op_gpu.o build/src/operator/roi_pooling_gpu.o build/src/operator/cudnn_batch_norm_gpu.o build/src/operator/native_op_gpu.o build/src/operator/convolution_gpu.o build/src/operator/l2_normalization_gpu.o build/src/operator/upsampling_gpu.o build/src/operator/concat_gpu.o build/src/operator/batch_norm_gpu.o build/src/operator/dropout_gpu.o build/src/operator/pad_gpu.o build/src/operator/slice_channel_gpu.o build/src/operator/deconvolution_gpu.o build/src/operator/pooling_gpu.o build/src/operator/cast_gpu.o build/src/operator/crop_gpu.o build/src/operator/sequence_reverse_gpu.o build/src/operator/softmax_output_gpu.o build/src/operator/make_loss_gpu.o build/src/operator/sequence_last_gpu.o build/src/operator/rnn_gpu.o -pthread -lm -lcudart -lcublas -lcurand -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -lcblas -fopenmp -lrt -L/usr/local/lib -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_shape -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_calib3d -lopencv_features2d -lopencv_objdetect -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudawarping -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_video -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_cudaarithm -lopencv_core -lopencv_cudev -lcudnn  -lcuda
build/src/io/image_aug_default.o:在函数‘mxnet::io::DefaultImageAugmenter::Process(cv::Mat const&, std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul, 2567483615ul, 11ul, 4294967295ul, 7ul, 2636928640ul, 15ul, 4022730752ul, 18ul, 1812433253ul>*)’中:
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x1a6):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x1b8):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x6c0):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x6e8):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x701):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x79e):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x7b0):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x96d):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x99f):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0x9f2):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0xa04):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0xbd8):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_aug_default.cc:(.text._ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE[_ZN5mxnet2io21DefaultImageAugmenter7ProcessERKN2cv3MatEPSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE]+0xbe3):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
build/src/io/image_io.o:在函数‘mxnet::io::Imdecode(nnvm::NodeAttrs const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> >*)::{lambda(mxnet::RunContext)#1}::operator()(mxnet::RunContext) const [clone .isra.330]’中:
image_io.cc:(.text+0x939):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
image_io.cc:(.text+0xad6):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_io.cc:(.text+0xae1):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
build/src/io/image_io.o:在函数‘mxnet::io::Imdecode(nnvm::NodeAttrs const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> > const&, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> >*)’中:
image_io.cc:(.text+0x1f79):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
image_io.cc:(.text+0x2114):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_io.cc:(.text+0x2135):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_io.cc:(.text+0x2140):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
build/src/io/image_io.o:在函数‘mxnet::io::Imresize(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&)’中:
image_io.cc:(.text._ZN5mxnet2io8ImresizeERKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESD_[_ZN5mxnet2io8ImresizeERKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESD_]+0x2e9):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_io.cc:(.text._ZN5mxnet2io8ImresizeERKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESD_[_ZN5mxnet2io8ImresizeERKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESD_]+0x2f4):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
build/src/io/image_io.o:在函数‘mxnet::io::copyMakeBorder(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&)’中:
image_io.cc:(.text._ZN5mxnet2io14copyMakeBorderERKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESD_[_ZN5mxnet2io14copyMakeBorderERKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESD_]+0x355):对‘cv::_OutputArray::_OutputArray(cv::Mat&)’未定义的引用
image_io.cc:(.text._ZN5mxnet2io14copyMakeBorderERKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESD_[_ZN5mxnet2io14copyMakeBorderERKN4nnvm9NodeAttrsERKNS_9OpContextERKSt6vectorINS_5TBlobESaIS9_EERKS8_INS_9OpReqTypeESaISE_EESD_]+0x360):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
build/src/io/iter_image_recordio.o:在函数‘mxnet::io::ImageRecordIOParser<unsigned char>::ParseNext(std::vector<mxnet::io::InstVector<unsigned char>, std::allocator<mxnet::io::InstVector<unsigned char> > >*) [clone ._omp_fn.5]’中:
iter_image_recordio.cc:(.text+0x66be):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
iter_image_recordio.cc:(.text+0x6706):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
iter_image_recordio.cc:(.text+0x6846):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
build/src/io/iter_image_recordio.o:在函数‘mxnet::io::ImageRecordIOParser<float>::ParseNext(std::vector<mxnet::io::InstVector<float>, std::allocator<mxnet::io::InstVector<float> > >*) [clone ._omp_fn.2]’中:
iter_image_recordio.cc:(.text+0x78d6):对‘cv::_InputArray::_InputArray(cv::Mat const&)’未定义的引用
build/src/io/iter_image_recordio.o:iter_image_recordio.cc:(.text+0x791e): 跟着更多未定义的参考到 cv::_InputArray::_InputArray(cv::Mat const&)
collect2: error: ld returned 1 exit status
Makefile:258: recipe for target 'bin/im2rec' failed
make: *** [bin/im2rec] Error 1
jingpengw commented 7 years ago

I got some error with ubuntu 14.04 too.

both mxnet and nnvm were updated with master branch.

g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -O3 -I/opt/mxnet/mshadow/ -I/opt/mxnet/dmlc-core/include -fPIC -I/opt/mxnet/nnvm/include -Iinclude -funroll-loops -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 -DMSDHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=0 -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_NVRTC=0 -MMD -c src/operator/tensor/ordering_op.cc -o build/src/operator/tensor/ordering_op.o
In file included from src/operator/tensor/ordering_op.cc:7:0:
src/operator/tensor/./ordering_op-inl.h: In instantiation of ‘void mxnet::op::TopKBackward_(const nnvm::NodeAttrs&, const mxnet::OpContext&, const std::vector<mxnet::TBlob>&, const std::vector<mxnet::OpReqType>&, const std::vector<mxnet::TBlob>&) [with xpu = mshadow::cpu]’:
src/operator/tensor/ordering_op.cc:52:56:   required from here
src/operator/tensor/./ordering_op-inl.h:362:52: error: ‘transpose_indices’ was not declared in this scope
                                     Shape3(0, 2, 1));
                                                    ^
src/operator/tensor/./ordering_op-inl.h:374:45: error: ‘IndexFill’ was not declared in this scope
     IndexFill(in_grad, sel_indices, out_grad);
                                             ^
src/operator/tensor/./ordering_op-inl.h: In instantiation of ‘void mxnet::op::TopKImpl(mxnet::RunContext, mxnet::Resource, const mxnet::TBlob&, const std::vector<mxnet::TBlob>&, const mxnet::op::TopKParam&) [with xpu = mshadow::cpu]’:
src/operator/tensor/./ordering_op-inl.h:282:73:   required from ‘void mxnet::op::TopK(const nnvm::NodeAttrs&, const mxnet::OpContext&, const std::vector<mxnet::TBlob>&, const std::vector<mxnet::OpReqType>&, const std::vector<mxnet::TBlob>&) [with xpu = mshadow::cpu]’
src/operator/tensor/ordering_op.cc:25:47:   required from here
src/operator/tensor/./ordering_op-inl.h:226:54: error: ‘transpose_indices’ was not declared in this scope
                                       Shape3(0, 2, 1));
                                                      ^
src/operator/tensor/./ordering_op-inl.h:228:46: error: ‘IndexFill’ was not declared in this scope
     IndexFill(ret_mask, sel_indices, mask_val);
                                              ^
make: *** [build/src/operator/tensor/ordering_op.o] Error 1

I searched transpose_indices it was defined in mshadow.

https://github.com/search?q=org%3Admlc+transpose_indices&type=Code

jingpengw commented 7 years ago

manually checkout and pull the mshadow package fixed the above errors, but I still get some errors:

In file included from src/io/iter_csv.cc:11:0:
src/io/./iter_prefetcher.h: In member function ‘void mxnet::io::PrefetcherParam::__DECLARE__(dmlc::parameter::ParamManagerSingleton<mxnet::io::PrefetcherParam>*)’:
src/io/./iter_prefetcher.h:38:8: error: ‘class dmlc::parameter::FieldEntry<dmlc::optional<int> >’ has no member named ‘add_enum’
       .add_enum("float32", mshadow::kFloat32)
        ^
In file included from src/io/iter_mnist.cc:15:0:
src/io/./iter_prefetcher.h: In member function ‘void mxnet::io::PrefetcherParam::__DECLARE__(dmlc::parameter::ParamManagerSingleton<mxnet::io::PrefetcherParam>*)’:
src/io/./iter_prefetcher.h:38:8: error: ‘class dmlc::parameter::FieldEntry<dmlc::optional<int> >’ has no member named ‘add_enum’
       .add_enum("float32", mshadow::kFloat32)
        ^
In file included from src/operator/convolution.cc:8:0:
src/operator/./convolution-inl.h: In member function ‘void mxnet::op::ConvolutionParam::__DECLARE__(dmlc::parameter::ParamManagerSingleton<mxnet::op::ConvolutionParam>*)’:
src/operator/./convolution-inl.h:64:6: error: ‘class dmlc::parameter::FieldEntry<dmlc::optional<int> >’ has no member named ‘add_enum’
     .add_enum("off", conv::kOff)
      ^
src/operator/./convolution-inl.h:80:6: error: ‘class dmlc::parameter::FieldEntry<dmlc::optional<int> >’ has no member named ‘add_enum’
     .add_enum("NCHW", mshadow::kNCHW)
      ^
In file included from src/operator/./cudnn_convolution-inl.h:14:0,
                 from src/operator/cudnn_convolution.cc:7:
src/operator/././convolution-inl.h: In member function ‘void mxnet::op::ConvolutionParam::__DECLARE__(dmlc::parameter::ParamManagerSingleton<mxnet::op::ConvolutionParam>*)’:
src/operator/././convolution-inl.h:64:6: error: ‘class dmlc::parameter::FieldEntry<dmlc::optional<int> >’ has no member named ‘add_enum’
     .add_enum("off", conv::kOff)
      ^
src/operator/././convolution-inl.h:80:6: error: ‘class dmlc::parameter::FieldEntry<dmlc::optional<int> >’ has no member named ‘add_enum’
     .add_enum("NCHW", mshadow::kNCHW)
      ^
In file included from src/io/iter_image_recordio.cc:22:0:
src/io/./iter_prefetcher.h: In member function ‘void mxnet::io::PrefetcherParam::__DECLARE__(dmlc::parameter::ParamManagerSingleton<mxnet::io::PrefetcherParam>*)’:
src/io/./iter_prefetcher.h:38:8: error: ‘class dmlc::parameter::FieldEntry<dmlc::optional<int> >’ has no member named ‘add_enum’
       .add_enum("float32", mshadow::kFloat32)
        ^
In file included from src/io/io.cc:8:0:
src/io/./iter_prefetcher.h: In member function ‘void mxnet::io::PrefetcherParam::__DECLARE__(dmlc::parameter::ParamManagerSingleton<mxnet::io::PrefetcherParam>*)’:
src/io/./iter_prefetcher.h:38:8: error: ‘class dmlc::parameter::FieldEntry<dmlc::optional<int> >’ has no member named ‘add_enum’
       .add_enum("float32", mshadow::kFloat32)
        ^
make: *** [build/src/io/iter_csv.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build/src/io/iter_mnist.o] Error 1
make: *** [build/src/operator/cudnn_convolution.o] Error 1
make: *** [build/src/io/io.o] Error 1
make: *** [build/src/operator/convolution.o] Error 1
make: *** [build/src/io/iter_image_recordio.o] Error 1

again, these operators are in dmlc-core https://github.com/search?utf8=%E2%9C%93&q=org%3Admlc+add_enum&type=Code&ref=searchresults

updating the dmlc-core fixed this problem.