lizrice / learning-ebpf

Learning eBPF, published by O'Reilly - out now! Here's where you'll find a VM config for the examples, and more

Home Page:https://www.amazon.com/Learning-eBPF-Programming-Observability-Networking/dp/1098135121

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

One problem with make or make install

killerwzb opened this issue · comments

Hi,I make this and get error from make command,it like this:
[wangzhibin@localhost src]$ make
MKDIR staticobjs
CC staticobjs/bpf.o
CC staticobjs/btf.o
CC staticobjs/libbpf.o
CC staticobjs/libbpf_errno.o
CC staticobjs/netlink.o
CC staticobjs/nlattr.o
CC staticobjs/str_error.o
CC staticobjs/libbpf_probes.o
CC staticobjs/bpf_prog_linfo.o
CC staticobjs/btf_dump.o
btf_dump.c: In function ‘btf_dump_dump_type_data.isra.24’:
btf_dump.c:2363:5: error: ‘err’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (err < 0)
^
cc1: all warnings being treated as errors
make: *** [staticobjs/btf_dump.o] Error 1

How can I solve it?

It's not clear where you are running this make command but I'm going to guess from the src in the prompt that you're building libbpf? That's a separate project, pulled in here as a submodule for convenience. If you're having problems with libbpf then the project repo is here.