cilium / ebpf

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.

Home Page:https://ebpf-go.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

internal: doesn't compile with golang.org/x/sys v0.14.0

dkorunic opened this issue · comments

On golang.org/x/sys upgrade to v0.14.0, building cilium/ebpf@v0.12.2 errors out on compile due to missing linux.BPF_F_KPROBE_MULTI_RETURN when using GOOS=linux target:

$ go get -u
...
go: upgraded golang.org/x/sys v0.13.0 => v0.14.0
...

$ go build ...
-: # github.com/cilium/ebpf/internal/unix
../../../../pkg/mod/github.com/cilium/ebpf@v0.12.2/internal/unix/types_linux.go:41:36: undefined: linux.BPF_F_KPROBE_MULTI_RETURN
/Users/dkorunic/.go/pkg/mod/github.com/cilium/ebpf@v0.12.2/internal/unix/types_linux.go:41:36: undefined: linux.BPF_F_KPROBE_MULTI_RETURN

See 36f6316 you can use x/sys/unix@master to fix this.

We've just released v0.12.3 that depends on an unreleased version of x/sys. Please upgrade to that version.