xlab / c-for-go

Automatic C-Go Bindings Generator for Go Programming Language
https://c.for-go.com
MIT License
1.5k stars 119 forks source link

could not determine kind of name for C.nvmlComputeInstancePlacement_t #116

Closed jshen28 closed 2 years ago

jshen28 commented 2 years ago

Hello, I am trying to compile and run go-nvml from source. and found that "types_gen.go" file is empty. After a little bit of debugging, I found the following command seems to fail

# go tool cgo -godefs types.go
/home/sjt/go-nvml-master/pkg/nvml/types.go:174:31: could not determine kind of name for C.nvmlComputeInstancePlacement_t
/home/sjt/go-nvml-master/pkg/nvml/types.go:55:33: could not determine kind of name for C.nvmlRowRemapperHistogramValues_t

the go version is

# go version go1.17.6 linux/amd64

On the server, cuda is not installed,

# nvidia-smi
Tue Jan 25 15:56:14 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63       Driver Version: 470.63       CUDA Version: N/A      |

So what did I do wrong? Thank you.