Skip to content

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

@formula-spectre

Description

@formula-spectre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions