In file included from /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/github.com/go-delve/delve/pkg/proc/internal/ebpf/bpf/trace.bpf.c:1:
/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/github.com/go-delve/delve/pkg/proc/internal/ebpf/bpf/include/trace.bpf.h:10:17: error: use of undeclared identifier 'BPF_MAP_TYPE_RINGBUF'
__uint(type, BPF_MAP_TYPE_RINGBUF);
^
/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/github.com/go-delve/delve/pkg/proc/internal/ebpf/bpf/include/trace.bpf.h:15:17: error: use of undeclared identifier 'BPF_MAP_TYPE_RINGBUF'
__uint(type, BPF_MAP_TYPE_RINGBUF);
^
/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/github.com/go-delve/delve/pkg/proc/internal/ebpf/bpf/trace.bpf.c:243:37: error: use of undeclared identifier 'BPF_RB_FORCE_WAKEUP'
bpf_ringbuf_submit(parsed_args, BPF_RB_FORCE_WAKEUP); ^
3 errors generated.
Error: clang: exit status 1
Looks like pkg/proc/internal/ebpf/bpf/include/trace.bpf.h is missing a #include <linux/bpf.h>
Maybe there is a better solution than this hack...
I tried to call bpftool directly instead of using the /usr/sbin/bpftool script: https:/ /git.launchpad. net/~danilogond olfo/ubuntu/ +source/ delve/commit/ ?h=ubuntu/ devel&id= 2cf86a5394786f9 ec8b2931d0c4c05 af992be1c2
It kinda worked but then the build failed with:
In file included from /<<PKGBUILDDIR> >/obj-x86_ 64-linux- gnu/src/ github. com/go- delve/delve/ pkg/proc/ internal/ ebpf/bpf/ trace.bpf. c:1: >/obj-x86_ 64-linux- gnu/src/ github. com/go- delve/delve/ pkg/proc/ internal/ ebpf/bpf/ include/ trace.bpf. h:10:17: error: use of undeclared identifier 'BPF_MAP_ TYPE_RINGBUF' TYPE_RINGBUF) ; >/obj-x86_ 64-linux- gnu/src/ github. com/go- delve/delve/ pkg/proc/ internal/ ebpf/bpf/ include/ trace.bpf. h:15:17: error: use of undeclared identifier 'BPF_MAP_ TYPE_RINGBUF' TYPE_RINGBUF) ; >/obj-x86_ 64-linux- gnu/src/ github. com/go- delve/delve/ pkg/proc/ internal/ ebpf/bpf/ trace.bpf. c:243:37: error: use of undeclared identifier 'BPF_RB_ FORCE_WAKEUP' ringbuf_ submit( parsed_ args, BPF_RB_ FORCE_WAKEUP) ;
^
/<<PKGBUILDDIR>
__uint(type, BPF_MAP_
^
/<<PKGBUILDDIR>
__uint(type, BPF_MAP_
^
/<<PKGBUILDDIR>
bpf_
3 errors generated.
Error: clang: exit status 1
Looks like pkg/proc/ internal/ ebpf/bpf/ include/ trace.bpf. h is missing a #include <linux/bpf.h>
Maybe there is a better solution than this hack...