iovisor / iovisor/bcc

Broken build using v0.9.0 release tar

Open
#2,261 25 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
5d 13h
Merged PRs (30d)
3

Description

BCC can not be build on an Arch Linux 4.20.14 system using the [v0.9.0](https://github.com/iovisor/bcc/archive/v0.9.0.tar.gz) release tar from GitHub. However, it can be build using the git repository and checking out the v0.9.0 tag. I successfully reproduced the error on another Arch machine with a different configuration. Hence, I do not think the problem is device specific. Furthermore, the previous version v0.8.0 builds fine.

I used the following commands for building
```bash
mkdir build; cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
```
and got the following error message
```txt
bcc-0.9.0/src/cc/libbpf.c:54:10: fatal error: libbpf/src/bpf.h: No such file or directory
#include "libbpf/src/bpf.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/cc/CMakeFiles/bpf-shared.dir/build.make:63: src/cc/CMakeFiles/bpf-shared.dir/libbpf.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:163: src/cc/CMakeFiles/bpf-shared.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
```

To be honest I am a little bit confused as to what might be the cause of the error. It might very well just me doing something wrong. Any help would be greatly appreciated.

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare the GitHub v0.9.0 release tar with the repository checked out at the v0.9.0 tag, focusing on the missing libbpf/src/bpf.h reported by the compiler. Reproduce the build with mkdir build; cd build; cmake -DCMAKE_INSTALL_PREFIX=/usr ..; make on Arch Linux. Done means the v0.9.0 release tar completes the build like the matching git checkout.

Written by the indexing model from the issue text.

Assessment

Tech stack
arch-linux, c, cmake, linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.