BCC v.0.24.0 is failing to compile on CentOS7
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
I have been trying to compile BCC (v.0.24.0) source on CentOS 7 and hitting following build errors.
[ 73%] Building CXX object src/cc/CMakeFiles/bcc-static.dir/bcc_btf.cc.o
/home/localadmin/bcc/src/cc/bcc_btf.cc:73:25: error: use of undeclared identifier 'EINVAL'
return -EINVAL;
^
/home/localadmin/bcc/src/cc/bcc_btf.cc:82:25: error: use of undeclared identifier 'EINVAL'
return -EINVAL;
^
/home/localadmin/bcc/src/cc/bcc_btf.cc:88:25: error: use of undeclared identifier 'EINVAL'
return -EINVAL;
^
/home/localadmin/bcc/src/cc/bcc_btf.cc:97:25: error: use of undeclared identifier 'EINVAL'
return -EINVAL;
^
/home/localadmin/bcc/src/cc/bcc_btf.cc:106:25: error: use of undeclared identifier 'EINVAL'
return -EINVAL;
In order to get past this issue I had to make following changes into the source.
My assumption was that source is buildable.
Can you please advise if I am supposed to make such change into the source or is this something already identified?
diff --git a/src/cc/bcc_btf.cc b/src/cc/bcc_btf.cc
index 7f551ae..088eadd 100644
--- a/src/cc/bcc_btf.cc
+++ b/src/cc/bcc_btf.cc
@@ -17,6 +17,7 @@
#include "bcc_btf.h"
#include
#include
+#include
#include "linux/btf.h"
#include "libbpf.h"
#include "bcc_libbpf_inc.h"
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the v0.24.0 CentOS 7 build at src/cc/bcc_btf.cc, where the reported errors occur, and inspect the existing includes around the BTF implementation. Reproduce the build and use the reported EINVAL failure as the check; done means the file compiles successfully on CentOS 7 without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- centos, cmake, cpp
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100