forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bcc: support building with external libbpf package and older uapi lin…
…ux/bpf.h When building bcc with a relatively new packaged libbpf (0.8.1) and -DCMAKE_USE_LIBBPF_PACKAGE:BOOL=TRUE, multiple compilation failures are encountered due the fact the system uapi header in /usr/include/linux/bpf.h is not very recent (this is often the case for distros, which sync it via a kernel headers package quite conservatively due to use by glibc). With libbpf built via git submodule, the uapi header included in the libbpf package is used, so here a similar approach is proposed for the external package build. Instead of having to sync another file the already present compat/linux/virtual_bpf.h is used; we copy it to compat/linux/bpf.h (eliminating the string prefix/suffix on first/last lines). From there, we ensure that places that assume the presence of the libbpf git submodule point at compat/ as a location to find the uapi header. Signed-off-by: Alan Maguire <[email protected]>
- Loading branch information
1 parent
981a947
commit e4bb4f3
Showing
4 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters