Re: [PATCH v2 1/2] CMakeLists.txt: enable SHARED and STATIC lib creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luca Boccassi wrote on Fri, Jun 11, 2021 at 11:45:25PM +0100:
> Actually that was my mistake, used the wrong build tree (sorry, it's
> late!). I can however reproduce the issue in a chroot running the
> libbpf CI script. Still looking.

with the ci script I get

$ /usr/lib64/ccache/cc -DDWARVES_MAJOR_VERSION=1 -DDWARVES_MINOR_VERSION=21 -D_GNU_SOURCE -Ddwarves_EXPORTS -I/path/to/pahole/build -I/path/to/pahole -I/path/to/pahole/lib/include -I/path/to/pahole/lib/bpf/include/uapi -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DNDEBUG -fPIC -MD -MT CMakeFiles/dwarves.dir/btf_encoder.c.o -MF CMakeFiles/dwarves.dir/btf_encoder.c.o.d -o CMakeFiles/dwarves.dir/btf_encoder.c.o -c /path/to/pahole/btf_encoder.c
/path/to/pahole/btf_encoder.c: In function ‘btf_encoder__add_float’:
/path/to/pahole/btf_encoder.c:224:22: warning: implicit declaration of function ‘btf__add_float’; did you mean ‘btf__add_var’? [-Wimplicit-function-declaration]
  224 |         int32_t id = btf__add_float(encoder->btf, name, BITS_ROUNDUP_BYTES(bt->bit_size));
      |                      ^~~~~~~~~~~~~~
      |                      btf__add_var



with btf__add_float defined in .../pahole/lib/bpf/src/btf.h
and btf_encoder.c including linux/btf.h


changing btf_loader.c to include bpf/btf.h instead fixes the issue for me:

diff --git a/btf_loader.c b/btf_loader.c
index 75ec674b3b3e..272c73bca7fe 100644
--- a/btf_loader.c
+++ b/btf_loader.c
@@ -20,7 +20,7 @@
 #include <string.h>
 #include <limits.h>
 #include <libgen.h>
-#include <linux/btf.h>
+#include <bpf/btf.h>
 #include <bpf/libbpf.h>
 #include <zlib.h>
 


-- 
Dominique



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux