mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

build error: expected ‘}’ at end of input

Open StatML opened this issue 9 years ago • 5 comments

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.4

Compiler: G++ 5.4

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

MXNet version:

Or if installed from source: source

MXNet commit hash (git rev-parse HEAD): 1286809a1fc76c0b808b988084fc0950300f40d4

If you are using python package, please provide

Python version and distribution: 3.5.2

Error Message:

In file included from src/operator/random/./../operator_common.h:37:0, from src/operator/random/./sample_multinomial_op.h:31, from src/operator/random/sample_multinomial_op.cc:24: src/operator/random/./../../common/cuda_utils.h:95:43: error: ‘mxnet::common::cuda::CusolverGetErrorString’ declared as an ‘inline’ variable inline const char* CusolverGetErrorString(cusolverStatus_t error) { ^ src/operator/random/./../../common/cuda_utils.h:95:43: error: ‘cusolverStatus_t’ was not declared in this scope src/operator/random/./../../common/cuda_utils.h:95:67: error: expected ‘,’ or ‘;’ before ‘{’ token inline const char* CusolverGetErrorString(cusolverStatus_t error) { ^ src/operator/random/sample_multinomial_op.cc:111:1: error: expected ‘}’ at end of input } // namespace mxnet ^ src/operator/random/sample_multinomial_op.cc:111:1: error: expected ‘}’ at end of input src/operator/random/sample_multinomial_op.cc:111:1: error: expected ‘}’ at end of input Makefile:275: recipe for target 'build/src/operator/random/sample_multinomial_op.o' failed make: *** [build/src/operator/random/sample_multinomial_op.o] Error 1

Steps to reproduce

or if you are running standard examples, please provide the commands you have run that lead to the error.

  1. make -j

What have you tried to solve it?

N/A

StatML avatar Aug 17 '17 05:08 StatML

@asmushetzel @ptrendx Any idea why cusolverStatus_t wouldn't be available?

piiswrong avatar Aug 17 '17 17:08 piiswrong

Is it CUDA build? Which CUDA version is used?

ptrendx avatar Aug 17 '17 18:08 ptrendx

Make sure that the submodules are updated by using git submodule update --init --recursive

szha avatar Aug 17 '17 20:08 szha

Hi, @piiswrong @ptrendx @szha Thanks a lot for your replies! The problem had been solved. I just did make clean then make -j. So weird...

StatML avatar Aug 18 '17 00:08 StatML

Most likely triggered as there has been a Makefile change in MxNet such that now cuSolver gets rolled in. That change affects compilation of cuda_utils.h, though cuda_utils.h itself wasn't touched/changed. So the system can't figure out by going through dependencies that now everything that includes cuda_utils.h must be recompiled.

asmushetzel avatar Aug 18 '17 14:08 asmushetzel