gobpf icon indicating copy to clipboard operation
gobpf copied to clipboard

Q: Is there a gobpf version that works with bcc as distributed in Linux distributions?

Open p- opened this issue 5 years ago • 4 comments

First of all: thanks for creating gobpf!

Problem: The current version of gobpf only seems to work with upstream versions of bcc. This somehow complicates the installation instructions for tools like my socket-connect-bpf project.

Does anybody know if there is a gobpf version that works with bcc as distributed in Linux distributions (e.g. bpfcc-tools on Ubuntu 19.04)?

I think one of the main problems is that bcc/bpf_common.h was renamed to bcc/bcc_common.h. Does anybody know if Ubuntu 19.10 will contain a version of bcc with the renamed files?

p- avatar Aug 26 '19 17:08 p-

It does not, I have just tested with Ubuntu 19 and I have the following problem:

$ go get -u github.com/iovisor/gobpf/bcc
# github.com/iovisor/gobpf/bcc
root/go/src/github.com/iovisor/gobpf/bcc/module.go:32:10: fatal error: bcc/bcc_common.h: No such file or directory
   32 | #include <bcc/bcc_common.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

guitmz avatar Nov 08 '19 10:11 guitmz

Confirming on Fedora 31, same issue

jnach avatar Feb 19 '20 19:02 jnach

Building from source seems to be a reasonable workaround for the time being, which tells me the distribution packages are behind some breaking changes, if a maintainer sees this, let me know if there is any help desired in getting packaging pipelines up to speed

jnach avatar Feb 19 '20 19:02 jnach

Same issue in #214

jnach avatar Feb 19 '20 19:02 jnach