progs/verifier_netfilter_retcode.c:42:1: error: unknown attribute 'btf_decl_tag' ignored

简介: progs/verifier_netfilter_retcode.c:42:1: error: unknown attribute 'btf_decl_tag' ignored

平台

ubuntu20.04

问题

在linux内核源码目录下执行下面的命令时:

root@ubuntu-vm:/mnt/linux-6.5/tools/testing/selftests/bpf# make

报如下错误:

progs/verifier_netfilter_retcode.c:41:1: error: unknown attribute 'btf_decl_tag' ignored [-Werror,-Wunknown-attributes]
__description("bpf_exit with invalid return code. test4")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
progs/bpf_misc.h:64:44: note: expanded from macro '__description'
#define __description(desc)     __attribute__((btf_decl_tag("comment:test_description=" desc)))
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

原因

目前我是用的是clang12,而btf_decl_tag是在clang14才开始支持的:

https://releases.llvm.org/14.0.0/tools/clang/docs/AttributeReference.html#btf-decl-tag

解决


相关文章
|
6月前
|
安全 JavaScript
any和unknown有何区别?
any和unknown有何区别?
111 1
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
117 0
|
JavaScript
Error Unknown option ‘--inline‘
Error Unknown option ‘--inline‘
352 0
|
Java Android开发
Bad method handle type 7异常解决
在利用androidx版本写demo时,在添加了一些依赖后,遇到了`java.lang.ClassNotFoundException`bug,这就很奇怪了,我就添加rxjava3的依赖,就给我报这个错误。
NotImplementedError: Invalid CAN Bus Type - None
NotImplementedError: Invalid CAN Bus Type - None
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
154 0
解决办法:error: unknown type name ‘__int64‘
解决办法:error: unknown type name ‘__int64‘
498 0
|
计算机视觉
opencv出错:error: (-213:The function/feature is not implemented) Unknown/unsupported array type
opencv出错:error: (-213:The function/feature is not implemented) Unknown/unsupported array type
464 0
|
程序员 算法框架/工具 Caffe
解决办法:error: 'size_t' does not name a type、unknown type name 'size_t'
解决办法:error: 'size_t' does not name a type、unknown type name 'size_t'
721 0