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

Missing support for RISC-V architecture (64-bit) #150

Closed
xmzzz opened this issue Feb 28, 2023 · 0 comments
Closed

Missing support for RISC-V architecture (64-bit) #150

xmzzz opened this issue Feb 28, 2023 · 0 comments

Comments

@xmzzz
Copy link
Contributor

xmzzz commented Feb 28, 2023

Hi, I followed the steps in README on the riscv64 architecture and encountered an error. The reason is that the vmlinux.h file on riscv64 platform is missing. I will create a PR later to solve this problem.

The system information and error message are as follows:

ubuntu@ubuntu:~/work/libbpf-bootstrap/examples/c$ uname -a
Linux ubuntu 5.19.0-1012-generic #13~22.04.1-Ubuntu SMP Thu Jan 12 15:34:31 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux
ubuntu@ubuntu:~/work/libbpf-bootstrap/examples/c$ make minimal
  MKDIR    .output
  CC       .output/minimal.bpf.o
  MKDIR    bpftool
  BPFTOOL  bpftool/bootstrap/bpftool
...                        libbfd: [ on  ]
...        disassembler-four-args: [ on  ]
...                          zlib: [ on  ]
...                        libcap: [ on  ]
...               clang-bpf-co-re: [ on  ]
  MKDIR    /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/include/bpf
  INSTALL  /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/include/bpf/hashmap.h
  INSTALL  /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/include/bpf/relo_core.h
  INSTALL  /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/include/bpf/libbpf_internal.h
  MKDIR    /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/
  MKDIR    /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/
  MKDIR    /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/bpf.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/btf.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/libbpf.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/libbpf_errno.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/netlink.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/nlattr.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/str_error.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/libbpf_probes.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/bpf_prog_linfo.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/btf_dump.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/hashmap.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/ringbuf.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/strset.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/linker.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/gen_loader.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/relo_core.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/staticobjs/usdt.o
  AR       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/libbpf/libbpf.a
  INSTALL  bpf.h libbpf.h btf.h libbpf_common.h libbpf_legacy.h bpf_helpers.h bpf_helper_defs.h bpf_tracing.h bpf_endian.h bpf_core_read.h skel_internal.h libbpf_version.h usdt.bpf.h
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/main.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/common.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/json_writer.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/gen.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/btf.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/xlated_dumper.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/btf_dumper.o
  CC       /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/disasm.o
  LINK     /home/ubuntu/work/libbpf-bootstrap/examples/c/.output/bpftool/bootstrap/bpftool
  GEN-SKEL .output/minimal.skel.h
libbpf: elf: minimal_bpf is not a valid eBPF object file
Error: failed to open BPF object file: BPF object format invalid
make: *** [Makefile:112: .output/minimal.skel.h] Error 95
make: *** Deleting file '.output/minimal.skel.h'
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