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

can't build bettercap on linux musl: could not determine kind of name for C.u_int8_t #1070

Open
formula-spectre opened this issue Jan 24, 2024 · 1 comment

Comments

@formula-spectre
Copy link


bettercap fails to build on musl; since it's go I suspect something similar to podman, a module is broken on musl

Environment

Please provide:

  • Bettercap version you are using ( bettercap -version ): none
  • OS version and architecture you are using: Gentoo linux, amd64
  • Go version if building from sources: go version go1.21.6 linux/amd64
  • Command line arguments you are using: build.sh and go build -o bettercap
  • Caplet code you are using or the interactive session commands: none
  • full log of the two build commands:
# github.com/chifflier/nfqueue-go/nfqueue
../../.local/share/go/pkg/mod/github.com/chifflier/nfqueue-go@v0.0.0-20170228160439-61ca646babef/nfqueue/nfqueue.go:187:29: could not determine kind of name for C.u_int16_t
../../.local/share/go/pkg/mod/github.com/chifflier/nfqueue-go@v0.0.0-20170228160439-61ca646babef/nfqueue/nfqueue.go:269:35: could not determine kind of name for C.u_int32_t
../../.local/share/go/pkg/mod/github.com/chifflier/nfqueue-go@v0.0.0-20170228160439-61ca646babef/nfqueue/nfqueue.go:257:27: could not determine kind of name for C.u_int8_t

Steps to Reproduce

  1. get the llvm/musl gentoo tarball; unmask ~amd64; update @world; emerge go. Alternatively, get any linux distro based on musl, but I haven't reproduced this error on, say, alpine (yet)
  2. git clone https://github.com/bettercap/bettercap/ && cd bettercap
  3. build.sh or go build -o bettercap

Expected behavior: I expect bettercap to compile

Actual behavior: Bettercap Fails to build;
since i'm on gentoo I tried with the package manager and reported the bug there, as seen in pentoo/pentoo-overlay#1545
I tried to build manually, and that the output of that is the one I provided above
my full specs are gentoo linux, linux kernel 6.5.9-cachyos, llvm toolchain version 17. I tried to remove the go directory so it could re-download the dependencies, but I get the same error.

@blshkv
Copy link

blshkv commented Jan 31, 2024

I suggest to find a better supported alternative if possible. https://pkg.go.dev/github.com/florianl/go-nfqueue perhaps?

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

No branches or pull requests

2 participants