Skip to content

perf.NewReader undefined on FreeBSD since v0.17.2 #1749

@dmachard

Description

@dmachard

Describe the bug

Since updating to version v0.17.2 and higher, I can no longer build the project DNS-collector on FreeBSD. It was OK before 0.17.2

How to reproduce

Try building the project on FreeBSD using the following command:

$ CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags="-s -w" -o dnscollector *.go
This results in the following error:

workers/sniffer_xdp.go:77:25: undefined: perf.NewReader

Version information

github.com/cilium/ebpf v0.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions