Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1018906: dwarves: FTBFS with libbpf 1.0.0

59 views
Skip to first unread message

Sudip Mukherjee

unread,
Sep 1, 2022, 4:10:04 PM9/1/22
to
Package: dwarves
Version: 1.23-2
Severity: important
Tags: ftbfs
X-Debbugs-Cc: sudipm.m...@gmail.com
Usertags: libbpf1

Dear Maintainer,

dwarves FTBFS with libbpf 1.0.0 (available in experimental).
Hopefully this is the error from the build log:

In file included from /home/sudip/test/dwarves-1.23/btf_encoder.c:18:
/usr/include/bpf/btf.h: In function 'btf_enum64_value':
/usr/include/bpf/btf.h:496:25: error: invalid use of undefined type 'const struct btf_enum64'
496 | return ((__u64)e->val_hi32 << 32) | e->val_lo32;
| ^~
/usr/include/bpf/btf.h:496:46: error: invalid use of undefined type 'const struct btf_enum64'
496 | return ((__u64)e->val_hi32 << 32) | e->val_lo32;
| ^~
/home/sudip/test/dwarves-1.23/btf_encoder.c: In function 'btf__log_err':
/home/sudip/test/dwarves-1.23/btf_encoder.c:175:39: warning: implicit declaration of function 'btf__get_nr_types' [-Wimplicit-function-declaration]
175 | fprintf(stderr, "[%u] %s %s", btf__get_nr_types(btf) + 1,
| ^~~~~~~~~~~~~~~~~
/home/sudip/test/dwarves-1.23/btf_encoder.c: In function 'btf_encoder__encode':
/home/sudip/test/dwarves-1.23/btf_encoder.c:1049:13: error: too many arguments to function 'btf__dedup'
1049 | if (btf__dedup(encoder->btf, NULL, NULL)) {
| ^~~~~~~~~~
/usr/include/bpf/btf.h:232:16: note: declared here
232 | LIBBPF_API int btf__dedup(struct btf *btf, const struct btf_dedup_opts *opts);
| ^~~~~~~~~~


--
Regards
Sudip

Domenico Andreoli

unread,
Sep 4, 2022, 1:01:19 PM9/4/22
to
On Thu, Sep 01, 2022 at 08:57:21PM +0100, Sudip Mukherjee wrote:
>
> Dear Maintainer,

Hi Sudip,

>
> dwarves FTBFS with libbpf 1.0.0 (available in experimental).
> Hopefully this is the error from the build log:
>
> In file included from /home/sudip/test/dwarves-1.23/btf_encoder.c:18:
> /usr/include/bpf/btf.h: In function 'btf_enum64_value':
> /usr/include/bpf/btf.h:496:25: error: invalid use of undefined type 'const struct btf_enum64'
> 496 | return ((__u64)e->val_hi32 << 32) | e->val_lo32;
> | ^~
> /usr/include/bpf/btf.h:496:46: error: invalid use of undefined type 'const struct btf_enum64'
> 496 | return ((__u64)e->val_hi32 << 32) | e->val_lo32;
> | ^~

Which version of linux-libc-dev are you using? I see that struct
btf_enum64 is introduced only in kernel 6.0, not yet packaged.


> /home/sudip/test/dwarves-1.23/btf_encoder.c: In function 'btf__log_err':
> /home/sudip/test/dwarves-1.23/btf_encoder.c:175:39: warning: implicit declaration of function 'btf__get_nr_types' [-Wimplicit-function-declaration]
> 175 | fprintf(stderr, "[%u] %s %s", btf__get_nr_types(btf) + 1,
> | ^~~~~~~~~~~~~~~~~
> /home/sudip/test/dwarves-1.23/btf_encoder.c: In function 'btf_encoder__encode':
> /home/sudip/test/dwarves-1.23/btf_encoder.c:1049:13: error: too many arguments to function 'btf__dedup'
> 1049 | if (btf__dedup(encoder->btf, NULL, NULL)) {
> | ^~~~~~~~~~
> /usr/include/bpf/btf.h:232:16: note: declared here
> 232 | LIBBPF_API int btf__dedup(struct btf *btf, const struct btf_dedup_opts *opts);
> | ^~~~~~~~~~
>

These probably require the new dwarves 1.24.


Thanks,
Dom

--
rsa4096: 3B10 0CA1 8674 ACBA B4FE FCD2 CE5B CF17 9960 DE13
ed25519: FFB4 0CC3 7F2E 091D F7DA 356E CC79 2832 ED38 CB05
signature.asc

Sudip Mukherjee

unread,
Sep 6, 2022, 6:00:03 AM9/6/22
to
Hi Dom,

On Sun, Sep 4, 2022 at 5:54 PM Domenico Andreoli <ca...@debian.org> wrote:
>
> On Thu, Sep 01, 2022 at 08:57:21PM +0100, Sudip Mukherjee wrote:
> >
> > Dear Maintainer,
>
> Hi Sudip,
>
> >
> > dwarves FTBFS with libbpf 1.0.0 (available in experimental).
> > Hopefully this is the error from the build log:
> >
> > In file included from /home/sudip/test/dwarves-1.23/btf_encoder.c:18:
> > /usr/include/bpf/btf.h: In function 'btf_enum64_value':
> > /usr/include/bpf/btf.h:496:25: error: invalid use of undefined type 'const struct btf_enum64'
> > 496 | return ((__u64)e->val_hi32 << 32) | e->val_lo32;
> > | ^~
> > /usr/include/bpf/btf.h:496:46: error: invalid use of undefined type 'const struct btf_enum64'
> > 496 | return ((__u64)e->val_hi32 << 32) | e->val_lo32;
> > | ^~
>
> Which version of linux-libc-dev are you using? I see that struct
> btf_enum64 is introduced only in kernel 6.0, not yet packaged.

It does look like libbpf has now added a hard dependency on v6.0+
kernel even though they said it will have "transparent handling of
older kernels".
I have mentioned it in
https://github.com/libbpf/libbpf/issues/562#issuecomment-1237299951.
So, we either need to wait for some fix from libbpf upstream or wait
for the Debian kernel team to update to v6.0 after its released next
month.


--
Regards
Sudip

Domenico Andreoli

unread,
Sep 6, 2022, 10:21:12 AM9/6/22
to
This already happened in the past, I solved it by adding linux-libc-dev
to dwarves' build depends.

It's not obvious why this is visible only when building dwarves and
not libbpf itself. I nevertheless think it should be libbpf to depend
on the right linux-libc-dev, not the packages using it.

What do you think?
signature.asc

Sudip Mukherjee

unread,
Sep 6, 2022, 11:10:04 AM9/6/22
to
On Tue, Sep 6, 2022 at 3:16 PM Domenico Andreoli <ca...@debian.org> wrote:
>
> On Tue, Sep 06, 2022 at 10:47:44AM +0100, Sudip Mukherjee wrote:
> > Hi Dom,
> >
> > On Sun, Sep 4, 2022 at 5:54 PM Domenico Andreoli <ca...@debian.org> wrote:
> > >
> > > On Thu, Sep 01, 2022 at 08:57:21PM +0100, Sudip Mukherjee wrote:
> > > >
> > > > Dear Maintainer,
> > >
> > > Hi Sudip,
> > >
> > > >
> > > > dwarves FTBFS with libbpf 1.0.0 (available in experimental).
> > > > Hopefully this is the error from the build log:
> > > >

<snip>

> > It does look like libbpf has now added a hard dependency on v6.0+
> > kernel even though they said it will have "transparent handling of
> > older kernels".
> > I have mentioned it in
> > https://github.com/libbpf/libbpf/issues/562#issuecomment-1237299951.
> > So, we either need to wait for some fix from libbpf upstream or wait
> > for the Debian kernel team to update to v6.0 after its released next
> > month.
>
> This already happened in the past, I solved it by adding linux-libc-dev
> to dwarves' build depends.
>
> It's not obvious why this is visible only when building dwarves and
> not libbpf itself. I nevertheless think it should be libbpf to depend
> on the right linux-libc-dev, not the packages using it.
>
> What do you think?

yes, if libbpf upstream can not fix it then I will need to update
libbpf with a dependency like
linux-libc-dev (>= 6.0)


--
Regards
Sudip
0 new messages