All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Luca Boccassi <bluca@debian.org>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
	Deepak Kumar Mishra <deepakkumar.mishra@arm.com>,
	dwarves@vger.kernel.org, Qais Yousef <qais.yousef@arm.com>,
	Jiri Olsa <jolsa@kernel.org>,
	siudin@fb.com, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] CMakeLists.txt: enable SHARED and STATIC lib creation
Date: Sat, 12 Jun 2021 07:53:51 +0900	[thread overview]
Message-ID: <YMPpfzNCSE8DxvOA@codewreck.org> (raw)
In-Reply-To: <8471df5c1e5aa52bedb032b2fcb3b6ce7722de6b.camel@debian.org>

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

  reply	other threads:[~2021-06-11 22:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 19:20 [PATCH v2 0/2] dwarves: enable-SHARED-and-STATIC-lib-creation Deepak Kumar Mishra
2021-06-07 19:20 ` [PATCH v2 1/2] CMakeLists.txt: enable SHARED and STATIC lib creation Deepak Kumar Mishra
2021-06-10 17:31   ` Arnaldo Carvalho de Melo
2021-06-11 19:34     ` Andrii Nakryiko
2021-06-11 19:54       ` Andrii Nakryiko
2021-06-11 20:00       ` Arnaldo Carvalho de Melo
2021-06-11 20:08         ` Andrii Nakryiko
2021-06-11 22:17           ` Luca Boccassi
2021-06-11 22:20             ` Luca Boccassi
2021-06-11 22:45               ` Luca Boccassi
2021-06-11 22:53                 ` Dominique Martinet [this message]
2021-06-11 23:06                   ` Dominique Martinet
2021-06-11 23:07                   ` Luca Boccassi
2021-06-11 23:43                     ` Andrii Nakryiko
2021-06-07 19:20 ` [PATCH v2 2/2] README: add documentation for -DBUILD_SHARED_LIBS Deepak Kumar Mishra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YMPpfzNCSE8DxvOA@codewreck.org \
    --to=asmadeus@codewreck.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=bluca@debian.org \
    --cc=bpf@vger.kernel.org \
    --cc=deepakkumar.mishra@arm.com \
    --cc=dwarves@vger.kernel.org \
    --cc=jolsa@kernel.org \
    --cc=qais.yousef@arm.com \
    --cc=siudin@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.