Closed Masquerade0097 closed 4 years ago
Description
I built the MXNet C++ library and installed it on my system. Then I got the following errors when I was trying to build a project that uses MXNet C++ library using cgo.
Error Message
In file included from ../../mxnet/error.go:4:0: /opt/mxnet/include/mxnet/c_predict_api.h:45:9: error: unknown type name 'uint32_t' typedef uint32_t mx_uint; ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:88:28: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t num_input_nodes, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:90:34: error: unknown type name 'uint32_t' const uint32_t* input_shape_indptr, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:91:34: error: unknown type name 'uint32_t' const uint32_t* input_shape_data, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:123:36: error: unknown type name 'uint32_t' const uint32_t num_input_nodes, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:125:36: error: unknown type name 'uint32_t' const uint32_t* input_shape_indptr, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:126:36: error: unknown type name 'uint32_t' const uint32_t* input_shape_data, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:127:36: error: unknown type name 'uint32_t' const uint32_t num_provided_arg_dtypes, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:159:38: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t num_input_nodes, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:161:44: error: unknown type name 'uint32_t' const uint32_t* input_shape_indptr, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:162:44: error: unknown type name 'uint32_t' const uint32_t* input_shape_data, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:163:38: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t num_output_nodes, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:192:39: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t num_input_nodes, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:194:45: error: unknown type name 'uint32_t' const uint32_t* input_shape_indptr, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:195:45: error: unknown type name 'uint32_t' const uint32_t* input_shape_data, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:214:29: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? MXNET_DLL int MXPredReshape(uint32_t num_input_nodes, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:216:25: error: unknown type name 'uint32_t' const uint32_t* input_shape_indptr, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:217:25: error: unknown type name 'uint32_t' const uint32_t* input_shape_data, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:230:36: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t index, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:231:36: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t** shape_data, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:232:36: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t* shape_ndim); ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:242:35: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t out_index, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:257:30: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t size); ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:290:31: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t index, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:292:31: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t size); ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:311:30: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t* out_length); ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:323:27: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t index, ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:326:33: error: unknown type name 'uint32_t' const uint32_t** out_shape, ^~~~~~~~ /opt/mxnet/include/mxnet/c_predict_api.h:327:27: error: unknown type name 'uint32_t'; did you mean '__uint128_t'? uint32_t* out_ndim); ^~~~~~~~ __uint128_t /opt/mxnet/include/mxnet/c_predict_api.h:336:40: error: unknown type name 'bool'; did you mean '_Bool'? bool monitor_all); ^~~~ _Bool
Environment
----------Python Info---------- ('Version :', '2.7.17') ('Compiler :', 'GCC 7.5.0') ('Build :', ('default', 'Apr 15 2020 17:20:14')) ('Arch :', ('64bit', '')) ------------Pip Info----------- No corresponding pip install for current python. ----------MXNet Info----------- No MXNet installed. ----------System Info---------- ('Platform :', 'Linux-4.15.0-96-generic-s390x-with-Ubuntu-18.04-bionic') ('system :', 'Linux') ('node :', 'e0e720e9a63c') ('release :', '4.15.0-96-generic') ('version :', '#97-Ubuntu SMP Wed Apr 1 03:00:38 UTC 2020') ----------Hardware Info---------- ('machine :', 's390x') ('processor :', 's390x') Architecture: s390x CPU op-mode(s): 32-bit, 64-bit Byte Order: Big Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s) per book: 1 Book(s) per drawer: 1 Drawer(s): 4 NUMA node(s): 1 Vendor ID: IBM/S390 Machine type: 3906 CPU dynamic MHz: 5208 CPU static MHz: 5208 BogoMIPS: 21881.00 Hypervisor: z/VM 6.4.0 Hypervisor vendor: IBM Virtualization type: full Dispatching mode: horizontal L1d cache: 128K L1i cache: 128K L2d cache: 4096K L2i cache: 2048K L3 cache: 131072K L4 cache: 688128K NUMA node0 CPU(s): 0-3 Flags: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx vxd vxe gs sie ----------Network Test---------- Setting timeout: 10 Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0331 sec, LOAD: 0.6414 sec. Timing for D2L: http://d2l.ai, DNS: 0.0197 sec, LOAD: 0.0476 sec. Timing for FashionMNIST: https://repo.mxnet.io/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0924 sec, LOAD: 0.3836 sec. Error open Conda: https://repo.continuum.io/pkgs/free/, HTTP Error 403: Forbidden, DNS finished in 0.0146248340607 sec. Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0038 sec, LOAD: 0.5610 sec. Timing for GluonNLP: http://gluon-nlp.mxnet.io, DNS: 0.0462 sec, LOAD: 0.1590 sec. Timing for D2L (zh-cn): http://zh.d2l.ai, DNS: 0.0203 sec, LOAD: 0.1762 sec. Timing for GluonNLP GitHub: https://github.com/dmlc/gluon-nlp, DNS: 0.0037 sec, LOAD: 0.7520 sec.
Have you solve problem?
@xiaoFine Yes, the error was resolved after importing mxnet/c_api.h
in my Go code files.
@xiaoFine Yes, the error was resolved after importing
mxnet/c_api.h
in my Go code files. Thanks.
Description
I built the MXNet C++ library and installed it on my system. Then I got the following errors when I was trying to build a project that uses MXNet C++ library using cgo.
Error Message
Environment