Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init_disassemble_info() signature changes causes compile failures #30

Closed
qmonnet opened this issue Jun 24, 2022 · 1 comment
Closed

Comments

@qmonnet
Copy link
Member

qmonnet commented Jun 24, 2022

https://lore.kernel.org/bpf/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de/

binutils changed the signature of init_disassemble_info(), which now causes
perf and bpftool to fail to compile (e.g. on debian unstable).

Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac

util/annotate.c: In function ‘symbol__disassemble_bpf’:
util/annotate.c:1765:9: error: too few arguments to function ‘init_disassemble_info’
 1765 |         init_disassemble_info(&info, s,
      |         ^~~~~~~~~~~~~~~~~~~~~
In file included from util/annotate.c:1718:
/usr/include/dis-asm.h:472:13: note: declared here
  472 | extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream,
      |             ^~~~~~~~~~~~~~~~~~~~~

with equivalent failures in

tools/bpf/bpf_jit_disasm.c
tools/bpf/bpftool/jit_disasm.c

This is being discussed on the mailing list. See email thread for more details.

jow- pushed a commit to openwrt/openwrt that referenced this issue Aug 14, 2022
This reverts commit cc24c4e.

binutils does not compile with glibc:
Package binutils is missing dependencies for the following libraries:
libgprofng.so.0
libmsgpackc.so.2
libstdc++.so.6

libbpf does not compile against binutils 2.39 any more, see:
libbpf/bpftool#30

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
PolynomialDivision added a commit to PolynomialDivision/openwrt that referenced this issue Aug 14, 2022
Binutils was updated to 2.39. However, it changed the signature of
init_disassemble_info() so bpftools does not compile anymore. This is a
known issue already discussed on the kernel mailinglist [0,1]. Copy
and paste the needed code snippets fixing the bpftools compilation.

Needs to be replaced by the real patch when it is released:
libbpf/bpftool#30

[0] - https://lore.kernel.org/bpf/20220801013834.156015-4-andres@anarazel.de/
[1] - https://lore.kernel.org/bpf/20220801013834.156015-8-andres@anarazel.de/

Signed-off-by: Nick Hainke <vincent@systemli.org>
@qmonnet
Copy link
Member Author

qmonnet commented Sep 1, 2022

Fixed upstream in https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=600b7b26c07a070d0153daa76b3806c1e52c9e00, should be pulled in this repo at the next sync.

@qmonnet qmonnet closed this as completed Sep 1, 2022
devendranaga pushed a commit to devendra-naga-labs/bsp_build that referenced this issue Sep 8, 2022
This reverts commit cc24c4e.

binutils does not compile with glibc:
Package binutils is missing dependencies for the following libraries:
libgprofng.so.0
libmsgpackc.so.2
libstdc++.so.6

libbpf does not compile against binutils 2.39 any more, see:
libbpf/bpftool#30

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant