onnx-tensorrt: NvOnnxParser.h:48: Error: Syntax error in input(1).

python setup.py build running build running build_py running build_ext building 'onnx_tensorrt.parser._nv_onnx_parser_bindings' extension swigging nv_onnx_parser_bindings.i to nv_onnx_parser_bindings_wrap.cpp swig -python -c++ -modern -builtin -o nv_onnx_parser_bindings_wrap.cpp nv_onnx_parser_bindings.i NvOnnxParser.h:48: Error: Syntax error in input(1). error: command 'swig' failed with exit status 1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 11
  • Comments: 16

Most upvoted comments

I could build onnx-tensorrt successfully after removing TENSORRTAPI in the following lines .

213: extern "C" TENSORRTAPI void* createNvOnnxParser_INTERNAL(void* network, void* logger, int version);
214: extern "C" TENSORRTAPI int getNvOnnxParserVersion();

When building TensorRT OSS(https://github.com/NVIDIA/TensorRT) with onnx-tensorrt, this problem doesn’t arise. It includes TENSORRTAPI in the following file. Maybe you could use this definition. https://github.com/NVIDIA/TensorRT/blob/572d54f91791448c015e74a4f1d6923b77b79795/include/NvInferRuntimeCommon.h#L59-L66

hi,update swig version