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

linuxPackages_testing.perf (5.1.0-rc7) fails to compile #60891

Closed
thoughtpolice opened this issue May 3, 2019 · 3 comments
Closed

linuxPackages_testing.perf (5.1.0-rc7) fails to compile #60891

thoughtpolice opened this issue May 3, 2019 · 3 comments

Comments

@thoughtpolice
Copy link
Member

Issue description

  CC       ui/setup.o
  LINK     libtraceevent.a
  CC       scripts/perl/Perf-Trace-Util/Context.o
  CC       arch/x86/util/header.o
  CC       arch/x86/tests/regs_load.o
  CC       arch/x86/util/tsc.o
  CC       arch/x86/tests/dwarf-unwind.o
  CC       ui/helpline.o
util/annotate.c:1689:10: fatal error: dis-asm.h: No such file or directory
 #include <dis-asm.h>
          ^~~~~~~~~~~
compilation terminated.
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
make[4]: *** [/build/linux-5.1-rc7/tools/build/Makefile.build:97: util/annotate.o] Error 1
make[3]: *** [/build/linux-5.1-rc7/tools/build/Makefile.build:139: util] Error 2
make[3]: *** Waiting for unfinished jobs....

Steps to reproduce

nix build nixpkgs.linuxPackages_testing.perf, f40a559

Technical details

dis-asm.h should come from binutils, so presumably we're missing something here...

@thoughtpolice
Copy link
Member Author

See also torvalds/linux@6987561

@thoughtpolice
Copy link
Member Author

Easy fix: missing libopcodes in the buildInputs, which it would normally expect to be installed alongside/with libbfd (but we have them separate).

lheckemann pushed a commit that referenced this issue May 8, 2019
Newer versions of perf in Linux 5.1+ support disassembling and
annotating eBPF programs inside the kernel. In order to do this, it uses
libbfd's support for bpf disassembly. There are two parts: libopcodes
and libbfd.

The 'perf' build system seems to expect libopcodes/libbfd to go "hand in
hand" -- always together, if one or the other is installed. If the build
system detects libbfd is available, then an import of <dis-asm.h> is
performed, but this fails since it wasn't in the buildInput. Fixing this
should be an easy, backwards-compatible change.

Fixes #60891, allowing linuxPackages_testing.perf to build again
(currently kernel version 5.1.0-rc7).

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit c8cb015)
@PaulGrandperrin
Copy link
Contributor

Easy fix: missing libopcodes in the buildInputs, which it would normally expect to be installed alongside/with libbfd (but we have them separate).

Thank you so much @thoughtpolice from 3 years ago!
Got the same issue on another project (not related to perf) and I think I would have lost so much time debugging this :)

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

2 participants