From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Luca Boccassi <bluca@debian.org>
Cc: Frank Heckenbach <f.heckenbach@fh-soft.de>, dwarves@vger.kernel.org
Subject: pahole: Problems with lib/include/bpf symlink in a tarball with --transform
Date: Thu, 12 Aug 2021 16:00:38 -0300 [thread overview]
Message-ID: <YRVv1iAX48euE5MO@kernel.org> (raw)
Hi Luca,
When I generate a tarball I'm not being able to build, as it
can't find bpf/btf.h, for instance, see this cset where I tried to fix
it:
commit 00cb89fb9af0355b8b4b64e26d3afa2348efb80d (HEAD -> next, five/next)
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Thu Aug 12 15:29:28 2021 -0300
MANIFEST: Add lib/include/bpf
The tarball wasn't working without this file:
[ 32%] Building C object CMakeFiles/dwarves.dir/btf_encoder.c.o
/tmp/dwarves-1.22/btf_encoder.c:18:10: fatal error: bpf/btf.h: No such file or directory
#include <bpf/btf.h>
^~~~~~~~~~~
compilation terminated.
Cc: Luca Boccassi <bluca@debian.org>
Fixes: 82756ea3eaf1f6e7 ("libbpf: Fixup patch to allow to use packaged version")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/MANIFEST b/MANIFEST
index 67f382e6f8f9..88f6193d5bc0 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -68,3 +68,4 @@ libctf.c
libctf.h
regtest
lib/bpf/
+lib/include/bpf
[acme@seventh pahole]$
But this doesn't help as well, as to prepare the tarball I use
tar --transform option (see README.tarball), and with lib/include/bpf
(the symlink pointing to ../bpf/src) we end up with:
[acme@seventh pahole]$ tar xvf ~/rpmbuild/SOURCES/dwarves-1.22.tar.xz | tail
dwarves-1.22/lib/bpf/include/linux/compiler.h
dwarves-1.22/lib/bpf/include/linux/list.h
dwarves-1.22/lib/bpf/include/linux/kernel.h
dwarves-1.22/lib/bpf/include/linux/err.h
dwarves-1.22/lib/bpf/CHECKPOINT-COMMIT
dwarves-1.22/lib/bpf/LICENSE
dwarves-1.22/lib/bpf/LICENSE.BSD-2-Clause
dwarves-1.22/lib/bpf/README.md
dwarves-1.22/lib/bpf/BPF-CHECKPOINT-COMMIT
dwarves-1.22/lib/include/bpf
[acme@seventh pahole]$ ls -la dwarves-1.22/lib/include/
total 8
drwxr-xr-x. 2 acme acme 4096 Aug 12 15:54 .
drwxr-xr-x. 4 acme acme 4096 Aug 12 15:54 ..
lrwxrwxrwx. 1 acme acme 23 Jun 18 17:56 bpf -> dwarves-1.22/../bpf/src
[acme@seventh pahole]$
Without the 'tar --transform' that is, on a checked out git repo:
⬢[acme@toolbox pahole]$ ls -la lib/include/bpf
lrwxrwxrwx. 1 acme acme 10 Aug 11 08:55 lib/include/bpf -> ../bpf/src
⬢[acme@toolbox pahole]$ ls -la lib/bpf/src
total 892
drwxr-xr-x. 1 acme acme 692 Aug 5 16:12 .
drwxr-xr-x. 1 acme acme 280 Jun 14 15:51 ..
<SNIP>
-rw-r--r--. 1 acme acme 123802 Jun 14 15:51 btf.c
-rw-r--r--. 1 acme acme 40953 Jun 14 15:51 btf_dump.c
-rw-r--r--. 1 acme acme 11796 Jun 14 15:51 btf.h
<SNIP>
⬢[acme@toolbox pahole]$
The problem is described in this old Debian ticket:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775247
I'm now trying to figure out what Frank meant when referring to that
"S" flag.
This is all on the 'next' branch, but I guess it affects master as well:
https://git.kernel.org/pub/scm/devel/pahole/pahole.git/log/?h=next
libbpf-devel has it on /usr/include/bpf/btf.h so its all ok there, but
when building it from the tarball I'm stuck with that symlink trick not
working ;-\
I have to figure out what is this 'S' flag (local symlinks, etc) or stop
using this --transform mechanism to have the dwarves-${version} top
level directory added when generating the tarball :-\
- Arnaldo
next reply other threads:[~2021-08-12 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 19:00 Arnaldo Carvalho de Melo [this message]
2021-08-12 19:06 ` pahole: Problems with lib/include/bpf symlink in a tarball with --transform Arnaldo Carvalho de Melo
2021-08-12 21:50 ` Luca Boccassi
2021-08-13 0:05 ` Arnaldo Carvalho de Melo
2021-08-13 18:15 ` Frank Heckenbach
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=YRVv1iAX48euE5MO@kernel.org \
--to=acme@kernel.org \
--cc=bluca@debian.org \
--cc=dwarves@vger.kernel.org \
--cc=f.heckenbach@fh-soft.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).