Re: Build failure bft for trace-cmd and libtraceevent
Giulio Benetti <[email protected]> Sun, 8 Feb 2026 22:44:24 +0100
| Newsgroups | org.kernel.vger.linux-trace-devel |
|---|---|
| Message-ID | <[email protected]> |
On 08/02/2026 22:32, Steven Rostedt wrote: > On Sun, 8 Feb 2026 21:53:31 +0100 > Giulio Benetti <[email protected]> wrote: > >> Otherwise the solution could be to switch according to Linux version >> between print_args() with and without bft support, basically re-adding >> the function here: >> https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/commit/?id=e798103c0815e6642e74d9317c325b2c62681f2e >> >> What do you think about it? > > Is the failure found at runtime? That is, the loaded BTF file doesn't > parse correctly? What is the error exactly? > > I guess if the tep_btf_print_args() fails, it should just print the raw > args then. Oh, I've forgotten to post the build failure, here it is and it's due to dealing with different Linux versions: [8/40] Compiling C object src/libtraceevent.so.1.9.0.p/trace-btf.c.o FAILED: [code=1] src/libtraceevent.so.1.9.0.p/trace-btf.c.o /home/giuliobenetti/git/upstream/test-libtraceevent/bootlin-armv5-uclibc/host/bin/arm-linux-gcc -Isrc/libtraceevent.so.1.9.0.p -Isrc -I../src -Iinclude -I../include -Iinclude/traceevent -I../include/traceevent -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu99 -O3 -D_GNU_SOURCE '-DPLUGIN_DIR="/usr/lib/traceevent/plugins"' -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0 -fPIC -MD -MQ src/libtraceevent.so.1.9.0.p/trace-btf.c.o -MF src/libtraceevent.so.1.9.0.p/trace-btf.c.o.d -o src/libtraceevent.so.1.9.0.p/trace-btf.c.o -c ../src/trace-btf.c ../src/trace-btf.c:60:10: error: ‘BTF_KIND_FLOAT’ undeclared here (not in a function); did you mean ‘BTF_KIND_CONST’? 60 | [BTF_KIND_FLOAT] = "FLOAT", | ^~~~~~~~~~~~~~ | BTF_KIND_CONST ../src/trace-btf.c:60:10: error: array index in initializer not of integer type ../src/trace-btf.c:60:10: note: (near initialization for ‘btf_kind_str’) ../src/trace-btf.c:60:35: warning: excess elements in array initializer 60 | [BTF_KIND_FLOAT] = "FLOAT", | ^~~~~~~ ../src/trace-btf.c:60:35: note: (near initialization for ‘btf_kind_str’) ../src/trace-btf.c:61:10: error: ‘BTF_KIND_DECL_TAG’ undeclared here (not in a function) 61 | [BTF_KIND_DECL_TAG] = "DECL_TAG", | ^~~~~~~~~~~~~~~~~ ../src/trace-btf.c:61:10: error: array index in initializer not of integer type ../src/trace-btf.c:61:10: note: (near initialization for ‘btf_kind_str’) ../src/trace-btf.c:61:35: warning: excess elements in array initializer 61 | [BTF_KIND_DECL_TAG] = "DECL_TAG", | ^~~~~~~~~~ ../src/trace-btf.c:61:35: note: (near initialization for ‘btf_kind_str’) ../src/trace-btf.c:62:10: error: ‘BTF_KIND_TYPE_TAG’ undeclared here (not in a function); did you mean ‘BTF_KIND_TYPEDEF’? 62 | [BTF_KIND_TYPE_TAG] = "TYPE_TAG", | ^~~~~~~~~~~~~~~~~ | BTF_KIND_TYPEDEF ../src/trace-btf.c:62:10: error: array index in initializer not of integer type ../src/trace-btf.c:62:10: note: (near initialization for ‘btf_kind_str’) ../src/trace-btf.c:62:35: warning: excess elements in array initializer 62 | [BTF_KIND_TYPE_TAG] = "TYPE_TAG", | ^~~~~~~~~~ ../src/trace-btf.c:62:35: note: (near initialization for ‘btf_kind_str’) ../src/trace-btf.c:63:10: error: ‘BTF_KIND_ENUM64’ undeclared here (not in a function); did you mean ‘BTF_KIND_ENUM’? 63 | [BTF_KIND_ENUM64] = "ENUM64", | ^~~~~~~~~~~~~~~ | BTF_KIND_ENUM ../src/trace-btf.c:63:10: error: array index in initializer not of integer type ../src/trace-btf.c:63:10: note: (near initialization for ‘btf_kind_str’) ../src/trace-btf.c:63:35: warning: excess elements in array initializer 63 | [BTF_KIND_ENUM64] = "ENUM64", | ^~~~~~~~ ../src/trace-btf.c:63:35: note: (near initialization for ‘btf_kind_str’) ../src/trace-btf.c: In function ‘btf_type_size’: ../src/trace-btf.c:115:38: error: invalid application of ‘sizeof’ to incomplete type ‘struct btf_decl_tag’ 115 | return size + sizeof(struct btf_decl_tag); | ^~~~~~ ../src/trace-btf.c:119:38: error: invalid application of ‘sizeof’ to incomplete type ‘struct btf_enum64’ 119 | return size + sizeof(struct btf_enum64) * BTF_INFO_VLEN(type->info); | ^~~~~~ [9/40] Compiling C object plugins/plugin_kmem.so.p/plugin_kmem.c.o [10/40] Compiling C object plugins/plugin_tlb.so.p/plugin_tlb.c.o [11/40] Compiling C object plugins/plugin_net.so.p/plugin_net.c.o [12/40] Compiling C object src/libtraceevent.so.1.9.0.p/parse-utils.c.o [13/40] Compiling C object plugins/plugin_sched_switch.so.p/plugin_sched_switch.c.o [14/40] Compiling C object samples/test-event.p/test-event.c.o [15/40] Compiling C object plugins/plugin_scsi.so.p/plugin_scsi.c.o [16/40] Compiling C object src/libtraceevent.so.1.9.0.p/event-parse-api.c.o [17/40] Compiling C object plugins/plugin_function.so.p/plugin_function.c.o [18/40] Compiling C object src/libtraceevent.so.1.9.0.p/trace-seq.c.o [19/40] Compiling C object plugins/plugin_kvm.so.p/plugin_kvm.c.o [20/40] Compiling C object src/libtraceevent.so.1.9.0.p/event-plugin.c.o [21/40] Compiling C object src/libtraceevent.so.1.9.0.p/kbuffer-parse.c.o [22/40] Compiling C object src/libtraceevent.so.1.9.0.p/parse-filter.c.o [23/40] Compiling C object src/libtraceevent.so.1.9.0.p/event-parse.c.o ninja: build stopped: subcommand failed. make[1]: *** [package/pkg-generic.mk:273: /home/giuliobenetti/git/upstream/test-libtraceevent/bootlin-armv5-uclibc/build/libtraceevent-1.9.0/.stamp_built] Error 1 make: *** [Makefile:83: _all] Error 2 Giulio