foniod / redbpf

Rust library for building and running BPF/eBPF modules
Apache License 2.0
1.71k stars 136 forks source link

llvm 15 support #365

Open LessThanGreaterThan opened 1 year ago

LessThanGreaterThan commented 1 year ago

Hey, currently llvm 15 support is missing.

error:

error: No suitable version of LLVM was found system-wide or pointed
              to by LLVM_SYS_120_PREFIX.

              Consider using `llvmenv` to compile an appropriate copy of LLVM, and
              refer to the llvm-sys documentation for more information.

              llvm-sys: https://crates.io/crates/llvm-sys
              llvmenv: https://crates.io/crates/llvmenv
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/llvm-sys-120.2.6/src/lib.rs:486:1
    |
486 | / std::compile_error!(concat!(
487 | |     "No suitable version of LLVM was found system-wide or pointed
488 | |        to by LLVM_SYS_",
489 | |     env!("CARGO_PKG_VERSION_MAJOR"),
...   |
496 | |        llvmenv: https://crates.io/crates/llvmenv"
497 | | ));
    | |__^

error: could not compile `llvm-sys` due to previous error
warning: build failed, waiting for other jobs to finish...
dlescos commented 1 year ago

Have a look at this: https://github.com/foniod/redbpf/compare/main...SitinCloud:redbpf:llvm15.

Not satisfied enough to make a PR now, but it works (we use it at Owlyshield).

wxmbugu commented 1 year ago

@dlescos Tried that and got this error


thread 'main' panicked at 'Surprising failure from llvm-config: Custom { kind: NotFound, error: "llvm-config ret
urned empty output" 
`
dlescos commented 1 year ago

What does your llvm-config --version display?

wxmbugu commented 1 year ago

llvm-config --version 15.0.7