xdp-project / xdp-tools

Utilities and example programs for use with XDP
Other
629 stars 133 forks source link

Dependencies for the configure script and Makefile not documented #286

Open jontrossbach opened 1 year ago

jontrossbach commented 1 year ago

The XDP Tutorial lists how to use XDP outside of needing too many *-devel packages. But in general the xdp-tools' usage for the configure script and the Makefile don't seem to be documented anywhere obvious. Is that something to fix or am I missing something?

For example, when testing a new libbpf package with xdp-tools my set up is about the following on Fedora/CentOS/RHEL:

# dnf install clang elfutils-libelf elfutils-libelf-devel zlib-devel git llvm libpcap libpcap-devel sqlite-devel m4 libbpf bpftool
# git clone https://github.com/xdp-project/xdp-tools/
# export FORCE_SYSTEM_LIBBPF=1

before running:

# ./configure
# make

However, I don't know where I would confirm these are the same steps everyone expects.

tohojo commented 1 year ago

Jon Trossbach @.***> writes:

The XDP Tutorial lists how to use XDP outside of needing too many *-devel packages. But in general the xdp-tools' usage for the configure script and the Makefile don't seem to be documented anywhere obvious. Is that something to fix or am I missing something?

It's not documented, no; we should fix that. However, the configure script should complain if there are missing dependencies.

# dnf install clang elfutils-libelf elfutils-libelf-devel zlib-devel git llvm libpcap libpcap-devel sqlite-devel m4 libbpf bpftool
# git clone https://github.com/xdp-project/xdp-tools/
# export FORCE_SYSTEM_LIBBPF=1

The FORCE_SYSTEM_LIBBPF is mostly for packaging so the build fails if the system libbpf doesn't work; you can set it when manually building, of course, but the configure output will also tell you if the system libbpf is picked up or not, so you can also just keep an eye on that :)