Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

bindings.h:1:10: fatal error: 'btf.h' file not found #334

@yasin-cs-ko-ak

Description

@yasin-cs-ko-ak
❯ cargo build --examples
   Compiling bpf-sys v2.3.0 (/home/u1tron/Documents/Projects/eBPF/redbpf/bpf-sys)
error: failed to run custom build command for `bpf-sys v2.3.0 (/home/u1tron/Documents/Projects/eBPF/redbpf/bpf-sys)`

Caused by:
  process didn't exit successfully: `/home/u1tron/Documents/Projects/eBPF/redbpf/target/debug/build/bpf-sys-f6efd10e4f746fd1/build-script-build` (exit status: 101)
  --- stderr
  bindings.h:1:10: fatal error: 'btf.h' file not found
  bindings.h:1:10: fatal error: 'btf.h' file not found, err: true
  thread 'main' panicked at 'Unable to generate bindings: ()', bpf-sys/build.rs:23:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I do have my header file in this directory/usr/include/uapi/linux/btf.h. But it's not compiling properly.
and also I am installed cargo-bpf with this command cargo install cargo-bpf --no-default-features --features=llvm13,command-line
any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions