Skip to content
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

syscount-probe build failure: Invalid record #18

Open
scottlamb opened this issue Jul 7, 2021 · 1 comment
Open

syscount-probe build failure: Invalid record #18

scottlamb opened this issue Jul 7, 2021 · 1 comment

Comments

@scottlamb
Copy link

I saw your mention of this project here and thought I'd try it out. It doesn't build for me out of the box at 88e3e5a.

$ cargo build
   Compiling allprobes v0.1.0 (/home/slamb/git/crates/cargo-trace/examples/allprobes)
   Compiling cargo-trace v0.1.0 (/home/slamb/git/crates/cargo-trace/cargo-trace)
   Compiling syscount v0.1.0 (/home/slamb/git/crates/cargo-trace/examples/syscount)
error: failed to run custom build command for `syscount v0.1.0 (/home/slamb/git/crates/cargo-trace/examples/syscount)`

Caused by:
  process didn't exit successfully: `/home/slamb/git/crates/cargo-trace/target/debug/build/syscount-e2e797b385d546a3/build-script-build` (exit status: 101)
  --- stderr
      Blocking waiting for file lock on package cache
      Blocking waiting for file lock on package cache
      Blocking waiting for file lock on package cache
      Blocking waiting for file lock on package cache
     Compiling syscount-probe v0.1.0 (/home/slamb/git/crates/cargo-trace/examples/syscount/probe)
  warning: due to multiple output types requested, the explicitly specified output file name will be adapted for each output type

  warning: ignoring --out-dir flag due to -o flag

  warning: 2 warnings emitted

      Finished release [optimized + debuginfo] target(s) in 0.26s
  thread 'main' panicked at 'couldn't compile probes: Compile("syscount-probe", Some("couldn't process IR file: LLVMParseIRInContext failed: /home/slamb/git/crates/cargo-trace/target/debug/build/syscount-533abdd8f526e7d6/out/target/bpf/programs/syscount-probe/syscount-probe-4ac884cf8595263c.bc: error: Invalid record\n"))', examples/syscount/build.rs:12:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

That's with Rust 1.53.0, fwiw, on Ubuntu 21.04 after apt install llvm-11 clang-11 to build llvm-sys properly properly. Looks like you have a checked-in Cargo.lock so I think all other relevant software should be exactly as in the repository. I'm not sure why it'd fail just on my setup then. I haven't diagnosed further; I don't know much about LLVM IR...

@dvc94ch
Copy link
Owner

dvc94ch commented Jul 11, 2021

I guess one of the first things to do to revive this project would be to migrate to using the recently merged rustc ebpf target and aya [0]. But I'll probably be busy with other things for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants