phoenixbai opened a new issue #10981: build ends with error : 
elemwise_binary_op-inl.h:78:3574: error: expected primary-expression before 
‘template’
URL: https://github.com/apache/incubator-mxnet/issues/10981
 
 
   ## Description
   I tried to build from source, and it exits with error below:
   I try googling, and fail to find anything helpful.
   What could be the cause ? please help.
   ```
   src/operator/tensor/./elemwise_binary_op-inl.h: In static member function 
‘static void 
mxnet::op::ElemwiseBinaryOp::RspRspOp(mshadow::Stream<mshadow::cpu>*, const 
nnvm::NodeAttrs&, const mxnet::OpContext&, const mxnet::NDArray&, const 
mxnet::NDArray&, mxnet::OpReqType, const mxnet::NDArray&, bool, bool, bool, 
bool)’:
   src/operator/tensor/./elemwise_binary_op-inl.h:78:3574: error: expected 
primary-expression before ‘template’
      MSHADOW_IDX_TYPE_SWITCH(rsp.aux_type(rowsparse::kIdx), IType, {
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                         ^
   src/operator/tensor/./elemwise_binary_op-inl.h:78:3675: error: expected 
primary-expression before ‘template’
      MSHADOW_IDX_TYPE_SWITCH(rsp.aux_type(rowsparse::kIdx), IType, {
   ```
   
   ## Environment info (Required)
   
   ```
   $python diagnose.py
   ----------Python Info----------
   ('Version      :', '2.7.14')
   ('Compiler     :', 'GCC 7.2.0')
   ('Build        :', ('default', 'Dec  7 2017 17:05:42'))
   ('Arch         :', ('64bit', ''))
   ------------Pip Info-----------
   ('Version      :', '10.0.1')
   ('Directory    :', '/opt/anaconda/lib/python2.7/site-packages/pip')
   ----------MXNet Info-----------
   /opt/anaconda/lib/python2.7/site-packages/h5py/__init__.py:36: 
FutureWarning: Conversion of the second argument of issubdtype from `float` to 
`np.floating` is deprecated. In future, it will be treated as `np.float64 == 
np.dtype(float).type`.
     from ._conv import register_converters as _register_converters
   ('Version      :', '1.1.0')
   ('Directory    :', '/opt/anaconda/lib/python2.7/site-packages/mxnet')
   ('Commit Hash   :', 'e29bb6f76365e45dd44e23941692c9d969959315')
   ----------System Info----------
   ('Platform     :', 
'Linux-3.10.0-327.ali2000.alios7.x86_64-x86_64-with-redhat-7.2-Paladin')
   ('system       :', 'Linux')
   ('node         :', 'gpu0071.et2')
   ('release      :', '3.10.0-327.ali2000.alios7.x86_64')
   ('version      :', '#1 SMP Tue Dec 29 19:54:05 CST 2015')
   ----------Hardware Info----------
   ('machine      :', 'x86_64')
   ('processor    :', 'x86_64')
   Architecture:          x86_64
   CPU op-mode(s):        32-bit, 64-bit
   Byte Order:            Little Endian
   CPU(s):                32
   On-line CPU(s) list:   0-31
   Thread(s) per core:    2
   Core(s) per socket:    8
   Socket(s):             2
   NUMA node(s):          1
   Vendor ID:             GenuineIntel
   CPU family:            6
   Model:                 62
   Model name:            Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
   Stepping:              4
   CPU MHz:               2599.898
   BogoMIPS:              5205.29
   Virtualization:        VT-x
   L1d cache:             32K
   L1i cache:             32K
   L2 cache:              256K
   L3 cache:              20480K
   NUMA node0 CPU(s):     0-31
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0007 
sec, LOAD: 2.5281 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0741 sec, LOAD: 
2.4492 sec.
   Timing for FashionMNIST: 
https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz,
 DNS: 0.3796 sec, LOAD: 2.5022 sec.
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.1665 sec, 
LOAD: 0.7387 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.9525 sec, LOAD: 
2.2194 sec.
   Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.7872 sec, LOAD: 
1.3082 sec.
   
   ```
   
   ## Build info (Required if built from source)
   
   Compiler (gcc/clang/mingw/visual studio): gcc (GCC) 4.8.5 20150623 (Red Hat 
4.8.5-4)
   
   MXNet commit hash:
   b84514758d9aefb60dbb90a941c3948d2854c2d3
   
   Build config:
   
   1. the diff part from default config.mk as below:
   
   ```
   DEV = 1
   DEBUG = 1
   USE_CUDA = 1
   USE_CUDA_PATH = /usr/local/cuda
   
   WARPCTC_PATH = /gruntdata/zhimo.bmz/warp-ctc
   MXNET_PLUGINS += plugin/warpctc/warpctc.mk
   
   # whether to use sframe integration. This requires build sframe
   # g...@github.com:dato-code/SFrame.git
   # SFRAME_PATH = $(HOME)/SFrame
   # MXNET_PLUGINS += plugin/sframe/plugin.mk
   USE_BLAS=openblas
   ADD_CFLAGS += -I/usr/include/openblas
   ADD_LDFLAGS += -lopencv_core -lopencv_imgproc -lopencv_imgcodecs
   ```
   
   2. build command:
   `make -j 10 USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 
USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1`
   
   
   ## Error Message:
   
[build.log](https://github.com/apache/incubator-mxnet/files/2011374/build.log)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to