mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

Compiling error: tensor_blob.h(36): error: namespace "std" has no member "is_pod"

Open max0x opened this issue 10 years ago • 2 comments

Whiling compiling MxNet, I got the following errors:

$ make
-- Found OpenBLAS libraries: /opt/OpenBLAS/lib/libopenblas.so
-- Found OpenBLAS include: /usr/include
-- CUDA detected: 7.5
-- Found cuDNN (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Automatic GPU detection failed. Building for all known architectures.
-- Added CUDA NVCC flags for: sm_20 sm_21 sm_30 sm_35 sm_50
-- OpenCV found (/home/dave/anaconda2/share/OpenCV)
-- Found cuDNN (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dave/Downloads/mxnet/build
[  6%] Built target dmlccore
[  7%] Building NVCC (Device) object CMakeFiles/cuda_compile.dir/src/optimizer/./cuda_compile_generated_sgd.cu.o
/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(36): error: namespace "std" has no member "is_pod"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(36): error: expected a ")"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(36): error: explicit type is missing ("int" assumed)

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(39): warning: defaulted functions are a C++11 feature

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(55): error: qualified name is not allowed

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(55): error: expected a ")"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(55): error: inline specifier allowed on function declarations only

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(55): error: expected a ";"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(240): warning: parsing restarts here after previous syntax error

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(242): error: expected a declaration

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(245): error: expected a declaration

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(266): warning: parsing restarts here after previous syntax error

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(320): error: qualified name is not allowed

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(320): error: expected a ")"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(320): error: inline specifier allowed on function declarations only

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(320): error: expected a ";"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(526): warning: parsing restarts here after previous syntax error

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(306): error: class "mxnet::TShape" has no member "SetDim"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(307): error: identifier "begin" is undefined

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(314): error: class "mxnet::TShape" has no member "assign"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(314): error: class "mxnet::Tuple<mxnet::index_t>" has no member "begin"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(314): error: class "mxnet::Tuple<mxnet::index_t>" has no member "end"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(584): error: class "mxnet::TShape" has no member "ndim"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(620): error: class "mxnet::TShape" has no member "ndim"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(655): error: class "mxnet::TShape" has no member "ndim"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(663): error: no operator "[]" matches these operands
            operand types are: const mxnet::TShape [ mxnet::index_t ]

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(667): error: class "mxnet::TShape" has no member "Size"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(768): error: class "mxnet::TShape" has no member "ndim"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(770): error: no operator "<<" matches these operands
            operand types are: std::basic_ostream<char, std::char_traits<char>> << mxnet::TShape

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(775): error: class "mxnet::TShape" has no member "ndim"

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(776): error: no operator "[]" matches these operands
            operand types are: mxnet::TShape [ mxnet::index_t ]

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(778): error: no operator "<<" matches these operands
            operand types are: std::basic_ostream<char, std::char_traits<char>> << mxnet::TShape

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(42): error: identifier "data_heap_" is undefined

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(49): error: class "mxnet::Tuple<mxnet::index_t>" has no member "assign"
          detected during instantiation of "mxnet::Tuple<ValueType>::Tuple(const mxnet::Tuple<ValueType> &) [with ValueType=mxnet::index_t]"
(297): here

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(49): error: class "mxnet::Tuple<mxnet::index_t>" has no member "begin"
          detected during instantiation of "mxnet::Tuple<ValueType>::Tuple(const mxnet::Tuple<ValueType> &) [with ValueType=mxnet::index_t]"
(297): here

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(49): error: class "mxnet::Tuple<mxnet::index_t>" has no member "end"
          detected during instantiation of "mxnet::Tuple<ValueType>::Tuple(const mxnet::Tuple<ValueType> &) [with ValueType=mxnet::index_t]"
(297): here

/home/dave/Downloads/mxnet/dmlc-core/include/dmlc/./parameter.h(494): error: no operator ">>" matches these operands
            operand types are: std::istringstream >> mxnet::TShape
          detected during instantiation of "void dmlc::parameter::FieldEntryBase<TEntry, DType>::Set(void *, const std::string &) const [with TEntry=dmlc::parameter::FieldEntry<mxnet::TShape>, DType=mxnet::TShape]"

/home/dave/Downloads/mxnet/dmlc-core/include/dmlc/./parameter.h(576): error: no operator "<<" matches these operands
            operand types are: std::ostream << mxnet::TShape
          detected during instantiation of "void dmlc::parameter::FieldEntryBase<TEntry, DType>::PrintValue(std::ostream &, DType) const [with TEntry=dmlc::parameter::FieldEntry<mxnet::TShape>, DType=mxnet::TShape]"
(516): here

/home/dave/Downloads/mxnet/include/mxnet/././tensor_blob.h(638): error: class "mxnet::TShape" has no member "FlatTo2D"
          detected during instantiation of "void mxnet::opt::sgd_mom_update<xpu>(mxnet::RunContext, mxnet::TBlob, mxnet::TBlob, mxnet::TBlob, float, float, const mxnet::opt::SGDParam &) [with xpu=mxnet::gpu]"
/home/dave/Downloads/mxnet/src/optimizer/sgd.cu(13): here

35 errors detected in the compilation of "/tmp/tmpxft_0000318e_00000000-16_sgd.compute_50.cpp1.ii".
CMake Error at cuda_compile_generated_sgd.cu.o.cmake:264 (message):
  Error generating file
  /home/dave/Downloads/mxnet/build/CMakeFiles/cuda_compile.dir/src/optimizer/./cuda_compile_generated_sgd.cu.o


make[2]: *** [CMakeFiles/cuda_compile.dir/src/optimizer/./cuda_compile_generated_sgd.cu.o] Error 1
make[1]: *** [CMakeFiles/mxnet.dir/all] Error 2
make: *** [all] Error 2

I am using Ubuntu 14.04 with gcc 4.8.4, CUDA 7.5, and cuDNN 5.0.5. It's like the compiler is complaining C++11 errors. I am checking out the current latest version of MxNet at d67964ca1358b624d3407a7d6fbb50573b19d1b0. Anyone else has the same problem?

max0x avatar Sep 10 '16 05:09 max0x

are you using cmake? It's mostly for windows users. Try directly compile

piiswrong avatar Sep 11 '16 07:09 piiswrong

Yes, directly compile using "make" works. Thank you.

Also, I pulled the newest version of mxnet today, and it works with CMake in my new environment -- Ubuntu 16.04 and CUDA 8.0 rc. I think the issue can be closed now.

max0x avatar Sep 29 '16 01:09 max0x