libbpf-tools: README how to update libbpf submodule
authorLiz Rice <liz@lizrice.com>
Fri, 7 Jan 2022 14:51:36 +0000 (14:51 +0000)
committeryonghong-song <ys114321@gmail.com>
Sat, 8 Jan 2022 20:09:18 +0000 (12:09 -0800)
An outdated libbpf submodule can cause the libbpf-tools `make` to fail. Adding note to the README on how to update it.

libbpf-tools/README.md

index 676ec515be149964db43aca36790800758480f1b..ac29ad4b9a0a76da5d05a711abeedbc2b3d9ecd7 100644 (file)
@@ -15,11 +15,13 @@ only exception is resulting tool binaries, which are put in a current
 directory. `make clean` will clean up all the build artifacts, including
 generated binaries.
 
-Given libbpf package might not be available across wide variety of
-distributions, all libbpf-based tools are linked statically against version of
-libbpf that BCC links against (from submodule under src/cc/libbpf). This
+Given that the libbpf package might not be available across wide variety of
+distributions, all libbpf-based tools are linked statically against a version 
+of libbpf that BCC links against (from submodule under src/cc/libbpf). This
 results in binaries with minimal amount of dependencies (libc, libelf, and
-libz are linked dynamically, though, given their widespread availability).
+libz are linked dynamically, though, given their widespread availability). 
+If your build fails because the libbpf submodule is outdated, try running `git 
+submodule update --init --recursive`. 
 
 Tools are expected to follow a simple naming convention:
   - <tool>.c contains userspace C code of a tool.