mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-02 03:29:27 +00:00
The perf build process auto-detects features and packages already
installed for its build. This is done in directory tools/build/feature.
This directory contains small sample programs. When they successfully
compile the necessary prereqs in form of libraries and header files are
present.
Such a check is also done for libtracefs. And this check fails:
Output before:
# rm -f test-libtracefs.bin; make test-libtracefs.bin
gcc -MD -Wall -Werror -o test-libtracefs.bin test-libtracefs.c \
> test-libtracefs.make.output 2>&1 -ltracefs
make: *** [Makefile:211: test-libtracefs.bin] Error 1
# cat test-libtracefs.make.output
In file included from test-libtracefs.c:2:
/usr/include/tracefs/tracefs.h:11:10: fatal error: \
event-parse.h: No such file or directory
11 | #include <event-parse.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
#
The root cause of this compile error is commit 880885d9c22e
("libtracefs: Remove "traceevent/" from referencing libtraceevent
headers") in the libtracefs project hosted here:
https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
That mentioned patch removes the traceevent/ directory name from
the include statement, causing the file not to be included even
when the libtraceevent-devel package is installed. This package contains
the file referred to in tracefs/tracefs.h:
# rpm -ql libtraceevent-devel
/usr/include/traceevent
/usr/include/traceevent/event-parse.h <----- here
/usr/include/traceevent/event-utils.h
/usr/include/traceevent/kbuffer.h
/usr/include/traceevent/trace-seq.h
/usr/lib64/libtraceevent.so
/usr/lib64/pkgconfig/libtraceevent.pc
#
With this patch the compile succeeds.
Output after:
# rm -f test-libtracefs.bin; make test-libtracefs.bin
gcc -MD -Wall -Werror -o test-libtracefs.bin test-libtracefs.c \
> test-libtracefs.make.output 2>&1 -I/usr/include/traceevent -ltracefs
#
Committer testing:
$ make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf-tools -C tools/perf install-bin
Before:
$ cat /tmp/build/perf-tools/feature/test-libtracefs.make.output
In file included from test-libtracefs.c:2:
/usr/include/tracefs/tracefs.h:11:10: fatal error: event-parse.h: No such file or directory
11 | #include <event-parse.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
$
$ grep -i tracefs /tmp/build/perf-tools/FEATURE-DUMP
feature-libtracefs=0
$
After:
$ cat /tmp/build/perf-tools/feature/test-libtracefs.make.output
$
$ grep -i tracefs /tmp/build/perf-tools/FEATURE-DUMP
feature-libtracefs=1
$
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: https://lore.kernel.org/r/20230711135338.397473-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Makefile | ||
| test-all.c | ||
| test-backtrace.c | ||
| test-bionic.c | ||
| test-bpf.c | ||
| test-clang-bpf-co-re.c | ||
| test-clang.cpp | ||
| test-compile.c | ||
| test-cplus-demangle.c | ||
| test-cxa-demangle.cpp | ||
| test-cxx.cpp | ||
| test-disassembler-four-args.c | ||
| test-disassembler-init-styled.c | ||
| test-dwarf_getlocations.c | ||
| test-dwarf.c | ||
| test-eventfd.c | ||
| test-file-handle.c | ||
| test-fortify-source.c | ||
| test-get_cpuid.c | ||
| test-get_current_dir_name.c | ||
| test-gettid.c | ||
| test-glibc.c | ||
| test-gtk2-infobar.c | ||
| test-gtk2.c | ||
| test-hello.c | ||
| test-jvmti-cmlr.c | ||
| test-jvmti.c | ||
| test-libaio.c | ||
| test-libaudit.c | ||
| test-libbabeltrace.c | ||
| test-libbfd-buildid.c | ||
| test-libbfd.c | ||
| test-libbpf.c | ||
| test-libcap.c | ||
| test-libcrypto.c | ||
| test-libdebuginfod.c | ||
| test-libdw-dwarf-unwind.c | ||
| test-libelf-gelf_getnote.c | ||
| test-libelf-getphdrnum.c | ||
| test-libelf-getshdrstrndx.c | ||
| test-libelf.c | ||
| test-libnuma.c | ||
| test-libopencsd.c | ||
| test-libperl.c | ||
| test-libpfm4.c | ||
| test-libpython.c | ||
| test-libslang-include-subdir.c | ||
| test-libslang.c | ||
| test-libtraceevent.c | ||
| test-libtracefs.c | ||
| test-libunwind-aarch64.c | ||
| test-libunwind-arm.c | ||
| test-libunwind-debug-frame-aarch64.c | ||
| test-libunwind-debug-frame-arm.c | ||
| test-libunwind-debug-frame.c | ||
| test-libunwind-x86_64.c | ||
| test-libunwind-x86.c | ||
| test-libunwind.c | ||
| test-libzstd.c | ||
| test-llvm-version.cpp | ||
| test-llvm.cpp | ||
| test-lzma.c | ||
| test-numa_num_possible_cpus.c | ||
| test-pthread-attr-setaffinity-np.c | ||
| test-pthread-barrier.c | ||
| test-reallocarray.c | ||
| test-scandirat.c | ||
| test-sched_getcpu.c | ||
| test-sdt.c | ||
| test-setns.c | ||
| test-stackprotector-all.c | ||
| test-timerfd.c | ||
| test-zlib.c | ||