Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topology can't be allocated in Go (Is this being maintained)? #1

Open
vsoch opened this issue Feb 25, 2024 · 3 comments
Open

topology can't be allocated in Go (Is this being maintained)? #1

vsoch opened this issue Feb 25, 2024 · 3 comments

Comments

@vsoch
Copy link

vsoch commented Feb 25, 2024

I just tried adding to my library, and:

mkdir -p /home/vanessa/Desktop/Code/compspec/compspec-go/bin
GO111MODULE="on" CGO_CFLAGS="-I/home/vanessa/Desktop/Code/compspec/compspec-go/lib/include" CGO_LDFLAGS="-L/home/vanessa/Desktop/Code/compspec/compspec-go/lib/lib -lhwloc" go build -ldflags '-w' -o /home/vanessa/Desktop/Code/compspec/compspec-go/bin/compspec cmd/compspec/compspec.go
# github.com/c0mm4nd/go-hwloc
vendor/github.com/c0mm4nd/go-hwloc/topology.go:22:36: _Ctype_struct_hwloc_topology can't be allocated in Go; it is incomplete (or unallocatable)
make: *** [Makefile:28: build] Error 1

From this https://forum.golangbridge.org/t/type-is-incomplete-or-unallocatable/33565 I think likely a pointer is needed somewhere? Also let me know if you are still maintaining this. Thank you!

@0xffffa
Copy link

0xffffa commented Jun 25, 2024

Currently having this issue as well, going to investigate. I remember building this library a few months ago with no issue, so most likely this has to do with an updated library.

If I manage to get it working I'll create a fork and link it back here

@0xffffa
Copy link

0xffffa commented Jun 25, 2024

Update: Forked the project with the struct allocation fix.

https://github.com/0xffffa/go-hwloc

@vsoch
Copy link
Author

vsoch commented Jun 25, 2024

@0xffffa are you planning to contribute via PR here so we can use the upstream for our projects? Or are the changes not acceptable for adding here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants