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

解决


相关文章
|
8月前
|
安全 JavaScript
any和unknown有何区别?
any和unknown有何区别?
156 1
|
7月前
|
Java
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
81 0
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 : ‘}‘
138 0
|
JavaScript
Uncaught runtime errors: × ERROR Avoided redundant navigation to current location: “/xxx“.
Uncaught runtime errors: × ERROR Avoided redundant navigation to current location: “/xxx“.
206 0
|
JavaScript
Error Unknown option ‘--inline‘
Error Unknown option ‘--inline‘
377 0
|
关系型数据库 MySQL C++
Error:error C2601: ‘b‘ : local function definitions are illegal error C2063: ‘b‘ : not a function
Error:error C2601: ‘b‘ : local function definitions are illegal error C2063: ‘b‘ : not a function
194 0
解决报错之 - error Identifier ‘attr_id‘ is not in camel case camelcase
解决报错之 - error Identifier ‘attr_id‘ is not in camel case camelcase
457 0
解决报错之 - error Identifier ‘attr_id‘ is not in camel case camelcase
|
Java Android开发
Bad method handle type 7异常解决
在利用androidx版本写demo时,在添加了一些依赖后,遇到了`java.lang.ClassNotFoundException`bug,这就很奇怪了,我就添加rxjava3的依赖,就给我报这个错误。
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
166 0
解决办法:error: unknown type name ‘__int64‘
解决办法:error: unknown type name ‘__int64‘
515 0