-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centos7.5 build failure #2478
Comments
What is your Kernel version? Is your Kernel built with BPF enabled? |
Hi [root@localhost build]# sysctl -a | grep bpf |
Most likely your system does not have an up-to-date /usr/include/linux/perf_event.h which contains a definition for PERF_EVENT_IOC_SET_BPF. To solve your problem, we probably should sync uapi linux/perf_event.h to libbpf repo. Could you file an issue against https://github.com/libbpf/libbpf? |
Hi install_manifest.txt [root@localhost build]# pwd |
The bcc tools stay in the source directory or in your install directory. |
Hi [root@localhost build]# ll |
the build prefix needs to be specified at cmake command line like |
Hi Song this file libclangFrontend.so.5 is present /opt/rh/llvm-toolset-7/root/usr/lib64/libclangFrontend.so.5 |
Some suggestions from online: |
hi [root@localhost tools]# source /root/.bash_profile |
Something like the below
might fix your issue. If this does fix your issue, maybe we need to check |
Hi now getting like below [root@localhost tools]# ./tcplife |
Hi Song getting segmentation fault, pl suggest |
Do you mind sharing a stack trace of the segfault? |
Hi [root@localhost tools]# gdb python Program received signal SIGSEGV, Segmentation fault. |
@balasu Maybe you can try it ? |
HI
Maybe you can try it ? |
I also needed to install kernel-devel package |
Hi
I am trying to do build on centos7.5, getting below error on running make command. pl suggest what all dependencies needs to be installed
/root/bcc/src/cc/libbpf/src/libbpf.c: In function ‘bpf_program__attach_perf_event’:
/root/bcc/src/cc/libbpf/src/libbpf.c:4033:17: error: ‘PERF_EVENT_IOC_SET_BPF’ undeclared (first use in this function); did you mean PERF_EVENT_IOC_SET_OUTPUT’?
if (ioctl(pfd, PERF_EVENT_IOC_SET_BPF, prog_fd) < 0) {
^~~~~~~~~~~~~~~~~~~~~~
PERF_EVENT_IOC_SET_OUTPUT
/root/bcc/src/cc/libbpf/src/libbpf.c:4033:17: note: each undeclared identifier is reported only once for each function it appears in
/root/bcc/src/cc/libbpf/src/libbpf.c: In function ‘perf_buffer__new’:
/root/bcc/src/cc/libbpf/src/libbpf.c:4522:13: error: ‘PERF_COUNT_SW_BPF_OUTPUT’ undeclared (first use in this function); did you mean ‘PERF_COUNT_SW_CPU_CLOCK’?
.config = PERF_COUNT_SW_BPF_OUTPUT,
^~~~~~~~~~~~~~~~~~~~~~~~
PERF_COUNT_SW_CPU_CLOCK
make[2]: *** [src/cc/CMakeFiles/bpf-shared.dir/build.make:154: src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:131: src/cc/CMakeFiles/bpf-shared.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
The text was updated successfully, but these errors were encountered: