iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.46k stars 3.86k forks source link

instructions for building bcc on Debian 10 #3082

Open mmelo-yottaa opened 4 years ago

mmelo-yottaa commented 4 years ago

I am trying to use bcc python bindings on Debian 10 with v5.8.5 kernel I built. Using the apt-install Debian 10 bcc package I get this failure:

mike@debian$ python bindtrace.py In file included from /virtual/main.c:2: In file included from /lib/modules/5.8.5/build/include/linux/sched.h:14: In file included from /lib/modules/5.8.5/build/include/linux/pid.h:5: In file included from /lib/modules/5.8.5/build/include/linux/rculist.h:11: In file included from /lib/modules/5.8.5/build/include/linux/rcupdate.h:26: In file included from /lib/modules/5.8.5/build/include/linux/irqflags.h:16: In file included from /lib/modules/5.8.5/build/arch/x86/include/asm/irqflags.h:9: In file included from /lib/modules/5.8.5/build/arch/x86/include/asm/nospec-branch.h:256: /lib/modules/5.8.5/build/arch/x86/include/asm/segment.h:266:2: error: expected '(' after 'asm' alternative_io ("lsl %[seg],%[p]", ^ /lib/modules/5.8.5/build/arch/x86/include/asm/alternative.h:240:2: note: expanded from macro 'alternative_io' asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, feature) \ ^

From reading https://github.com/iovisor/bcc/issues/2573 it seems I might be well off building a new bcc. This was not easy, I uninstalled Debian 10 LLVM/clang and installed version 3.8 from Debian 9 (stretch) to match the instructions here:

https://github.com/iovisor/bcc/blob/master/INSTALL.md#debian---source

There were issues using newer Debian 10 LLVM/clang versions, lots of warnings during build, also errors and failed tests.

After down-rev'ing LLVM/clang, and installing all other prerequisites per the above URL, the build completed but a large number of tests fail. I can forward bcc_0.16.0-1_amd64.build if that is interesting.

Could you please point me at instructions for building bcc on Debian 10 that work? I can up-rev or down-rev installed components at necessary, although I prefer to use latest bcc / kernel / buildtools.

Thank you.

sbernard31 commented 4 years ago

it sounds a duplicate of https://github.com/iovisor/bcc/issues/3081