Build errors in release version of CGO library

77 views Asked by At

I'm new to CGO and am trying to use the library https://github.com/goccy/go-graphviz. I am trying to compile using Gazelle and Bazel, however, when I run Bazel build I get a huge number of build errors that make me wonder how the project is able to build for anyone else. I previously was running into some errors due to Gazelle not being able to find the config.h file in the "internal" folder. I solved that with a Gazelle patch that copied the config.h file to the "internal/ccall" folder and added some other header files as a src in the BUILD.bazel file, and now am facing these errors. They may be related, but I don't think they are since these errors look legitimate to me.

See a sample of the errors below. There are 20 of these errors:

I checked the files both in my local cache and in Github and the errors look legitimate. The agnxtedge function does have 3 input parameters and the Agnode_s struct doesn't have any member named 'in' or 'out'.

Am I crazy here or is there something weird happening? I haven't used C in 10 years or so, but I don't remember there being optional function parameters or anything.

I'm confused about how this library works for anyone given these (seeming) errors in the code, but I can't imagine the developer would release a version so obviously broken, so I have to think there's something weird going on here.

0

There are 0 answers