eunomia-bpf / eunomia-bpf/bpf-developer-tutorial

[BUG] Cannot compile <9-runqlat>'s code in Ubuntu 22.04

Open
#86 5 comments 0 reactions 1 assignee Claimed by @Officeyutong View on GitHub
bug
Dominant language
C
Stars
4.3k
Forks
602
Avg merge
1d 10h
Merged PRs (30d)
1

Description

Error message:
```
INFO [ecc_rs::bpf_compiler] Compiling bpf object...
error: unknown argument: '-target bpf'
/home/runjie/Desktop/bpf-developer-tutorial/src/9-runqlat/core_fixes.bpf.h:28:6: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration]
/home/runjie/Desktop/bpf-developer-tutorial/src/9-runqlat/core_fixes.bpf.h:51:6: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration]
/home/runjie/Desktop/bpf-developer-tutorial/src/9-runqlat/core_fixes.bpf.h:79:6: error: use of unknown builtin '__builtin_preserve_type_info' [-Wimplicit-function-declaration]
/home/runjie/Desktop/bpf-developer-tutorial/src/9-runqlat/core_fixes.bpf.h:79:6: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
/home/runjie/Desktop/bpf-developer-tutorial/src/9-runqlat/core_fixes.bpf.h:79:6: note: consider using __builtin_trap() or qualifying pointer with 'volatile'
/home/runjie/Desktop/bpf-developer-tutorial/src/9-runqlat/core_fixes.bpf.h:107:6: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration]
INFO [ecc_rs::bpf_compiler] Generating export types...
INFO [ecc_rs::bpf_compiler] Generating package json..
INFO [ecc_rs::bpf_compiler] Packing ebpf object and config into package.json..
```

My clang version is clang 14, which is default clang version in Ubuntu 22.04. I also try to use clang 16. However, the error message is same.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.