facebookincubator / below

A time traveling resource monitor for modern Linux systems
Apache License 2.0
1.01k stars 59 forks source link

Error building "main" branch #8195

Closed SchweinDeBurg closed 11 months ago

SchweinDeBurg commented 1 year ago

Trying to build from "main" branch just now and got the following error:

error: failed to run custom build command for `below v0.7.0 (/home/elijah/.local/rpmbuild/BUILD/below/below)`

Caused by:
  process didn't exit successfully: `/home/elijah/.local/rpmbuild/BUILD/below/target/release/build/below-aefe42d9920a03d1/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Build("Failed to compile /var/tmp/.tmpCurUWB/exitstat.o from ./src/bpf/exitstat.bpf.c")', below/build.rs:38:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Using Rust 1.70.0, Clang 11.1.0, libbpf 1.2.0 and Linux kernel 5.15.120.

brianc118 commented 1 year ago

below requires Clang 15 to build exitstat.bpf.c.

If you can install clang-15 you should be able to build with something like:

export CLANG=clang-15
cargo build --release
SchweinDeBurg commented 11 months ago

Sorry for my late answer, just now I've packaged/installed LLVM/Clang 16.0.6 and then successfully built below. Many thanks for your information.