perf build broken in 5.1-rc7
Building perf in 5.1-rc5/6/7 fails:
Build start:
make -s -C tools/perf NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 all BUILD: Doing 'make -j32' parallel build
HOSTCC fixdep.o
HOSTLD fixdep-in.o
LINK fixdep
Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h
Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... disassembler-four-args: [ OFF ]
Makefile.config:473: No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
And breaks with:
CC ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'
disassemble = disassembler(bfdf);
^~~~
In file included from util/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enum bfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'} extern disassembler_ftype disassembler (enum bfd_architecture arc,
~~~~~~~~~~~~~~~~~~~~~~^~~util/annotate.c:1767:16: error: too few arguments to function 'disassembler'
disassemble = disassembler(bfdf);
^~~~~~~~~~~~
In file included from util/annotate.c:1689:/usr/include/dis-asm.h:325:27: note: declared here
extern disassembler_ftype disassembler (enum bfd_architecture arc,
^~~~~~~~~~~~
CC arch/x86/util/header.o
CC arch/x86/util/tsc.o
CC arch/x86/util/pmu.o
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
CC bench/futex-requeue.o
CC arch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97: util/annotate.o] Error 1 make[4]: *** Waiting for unfinished jobs....
CC util/build-id.o
--
Thomas
Den 30-04-2019 kl. 10:26, skrev Thomas Backlund:
Quoted 63 lines
Building perf in 5.1-rc5/6/7 fails:
Build start:
make -s -C
tools/perfNO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1
WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 all
BUILD: Doing 'make -j32' parallel build
HOSTCC fixdep.o
HOSTLD fixdep-in.o
LINK fixdep
Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -utools/arch/x86/include/uapi/asm/vmx.harch/x86/include/uapi/asm/vmx.hAuto-detecting system features:
... dwarf: [ on ]
...dwarf_getlocations: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
...numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
...get_cpuid: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... disassembler-four-args: [ OFF ]Makefile.config:473: No
sys/sdt.hfound, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-devAnd breaks with:
CC
ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'
disassemble = disassembler(bfdf);
^~~~
In file included fromutil/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enumbfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'}
externdisassembler_ftypedisassembler (enumbfd_architecturearc,
~~~~~~~~~~~~~~~~~~~~~~^~~util/annotate.c:1767:16: error: too few arguments to function 'disassembler'
disassemble = disassembler(bfdf);
^~~~~~~~~~~~
In file included fromutil/annotate.c:1689:/usr/include/dis-asm.h:325:27: note: declared here
externdisassembler_ftypedisassembler (enumbfd_architecturearc,
^~~~~~~~~~~~
CCarch/x86/util/header.o
Quoted 11 lines
CC
arch/x86/util/tsc.o
CCarch/x86/util/pmu.o
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
CCbench/futex-requeue.o
CCarch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97:util/annotate.o] Error 1 make[4]: *** Waiting for unfinished jobs....
CCutil/build-id.o
And I forgot...
Reverting:
From 6987561c9e86eace45f2dbb0c564964a63f4150a Mon Sep 17 00:00:00 2001
From: Song Liu <[email protected]>
Date: Mon, 11 Mar 2019 22:30:48 -0700
Subject: perf annotate: Enable annotation of BPF programs
Makes it build again.
--
Thomas
Quoted 96 lines · Thomas Backlund
Den 30-04-2019 kl. 10:26, skrev Thomas Backlund:
Quoted 73 lines
Building perf in 5.1-rc5/6/7 fails:
Build start:
make -s -C
tools/perfNO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1
WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 allBUILD: Doing 'make -j32' parallel build HOSTCC fixdep.o HOSTLD fixdep-in.o LINK fixdepWarning: Kernel ABI header at '
tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -utools/arch/x86/include/uapi/asm/vmx.harch/x86/include/uapi/asm/vmx.hAuto-detecting system features:
... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ]... disassembler-four-args: [ OFF ]
Makefile.config:473: No
sys/sdt.hfound, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-devAnd breaks with:
CC
ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'disassemble = disassembler(bfdf); ^~~~In file included from
util/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enumbfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'}
externdisassembler_ftypedisassembler (enumbfd_architecturearc,~~~~~~~~~~~~~~~~~~~~~~^~~ util/annotate.c:1767:16: error: too few arguments to function 'disassembler' disassemble = disassembler(bfdf); ^~~~~~~~~~~~ In file included from util/annotate.c:1689: /usr/include/dis-asm.h:325:27: note: declared here extern disassembler_ftype disassembler (enum bfd_architecture arc, ^~~~~~~~~~~~ CC arch/x86/util/header.o CC arch/x86/util/tsc.o CC arch/x86/util/pmu.oQuoted 11 lines
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
CCbench/futex-requeue.o
CCarch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97:util/annotate.o] Error 1
make[4]: *** Waiting for unfinished jobs....
CCutil/build-id.oAnd I forgot...
Reverting:
From6987561c9e86eace45f2dbb0c564964a63f4150aMon Sep 17 00:00:00 2001
From: Song Liu <[email protected]>
Date: Mon, 11 Mar 2019 22:30:48 -0700
Subject: perf annotate: Enable annotation of BPF programs
Quoted 5 lines
Makes it build again.
--
Thomas
Hi Thomas,
Which system are you running this test on? I would like to repro it in a VM.
Thanks,
Song
Den 30-04-2019 kl. 16:06, skrev Song Liu:
Quoted 99 lines · Thomas Backlund
Quoted 93 lines
Den 30-04-2019 kl. 10:26, skrev Thomas Backlund:
Quoted 72 lines
Building perf in 5.1-rc5/6/7 fails:
Build start:
make -s -C tools/perf NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 all BUILD: Doing 'make -j32' parallel build HOSTCC fixdep.o HOSTLD fixdep-in.o LINK fixdepWarning: Kernel ABI header at '
tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -utools/arch/x86/include/uapi/asm/vmx.harch/x86/include/uapi/asm/vmx.hAuto-detecting system features:
... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ]... disassembler-four-args: [ OFF ]
Makefile.config:473: No
sys/sdt.hfound, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-devAnd breaks with:
CC
ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'disassemble = disassembler(bfdf); ^~~~In file included from
util/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enumbfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'}
externdisassembler_ftypedisassembler (enumbfd_architecturearc,~~~~~~~~~~~~~~~~~~~~~~^~~ util/annotate.c:1767:16: error: too few arguments to function 'disassembler' disassemble = disassembler(bfdf); ^~~~~~~~~~~~ In file included from util/annotate.c:1689: /usr/include/dis-asm.h:325:27: note: declared here extern disassembler_ftype disassembler (enum bfd_architecture arc, ^~~~~~~~~~~~ CC arch/x86/util/header.o CC arch/x86/util/tsc.o CC arch/x86/util/pmu.oQuoted 11 lines
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
CCbench/futex-requeue.o
CCarch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97:util/annotate.o] Error 1
make[4]: *** Waiting for unfinished jobs....
CCutil/build-id.oAnd I forgot...
Reverting:
From6987561c9e86eace45f2dbb0c564964a63f4150aMon Sep 17 00:00:00 2001
From: Song Liu <[email protected]>
Date: Mon, 11 Mar 2019 22:30:48 -0700
Subject: perf annotate: Enable annotation of BPF programsQuoted 5 lines
Makes it build again.
--
Thomas
Quoted 6 lines
Hi Thomas,
Which system are you running this test on? I would like to repro it in a VM.
Thanks,
Song
Mageia Cauldron currently stabilizing to become Mageia 7 in ~1 month.
Basesystem is:
binutils-2.32-5.mga7
(includes all fixes from upstream binutils-2_32-branch)
gcc-8.3.1-0.20190419.2.mga7
glibc-2.29-7.mga7
(includes all fixes from upstream glibc release/2.29/master branch up to 2019-04-15 for now)
kernel-desktop-5.1.0-0.rc7.1.mga7
kernel-userspace-headers-5.1.0-0.rc7.1.mga7
--
Thomas
Quoted 125 lines · Thomas Backlund
Den 30-04-2019 kl. 16:06, skrev Song Liu:
Quoted 99 lines · Thomas Backlund
Quoted 93 lines
Den 30-04-2019 kl. 10:26, skrev Thomas Backlund:
Quoted 72 lines
Building perf in 5.1-rc5/6/7 fails:
Build start:
make -s -C tools/perf NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 all BUILD: Doing 'make -j32' parallel build HOSTCC fixdep.o HOSTLD fixdep-in.o LINK fixdepWarning: Kernel ABI header at '
tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -utools/arch/x86/include/uapi/asm/vmx.harch/x86/include/uapi/asm/vmx.hAuto-detecting system features:
... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ]... disassembler-four-args: [ OFF ]
Makefile.config:473: No
sys/sdt.hfound, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-devAnd breaks with:
CC
ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'disassemble = disassembler(bfdf); ^~~~In file included from
util/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enumbfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'}
externdisassembler_ftypedisassembler (enumbfd_architecturearc,~~~~~~~~~~~~~~~~~~~~~~^~~ util/annotate.c:1767:16: error: too few arguments to function 'disassembler' disassemble = disassembler(bfdf); ^~~~~~~~~~~~ In file included from util/annotate.c:1689: /usr/include/dis-asm.h:325:27: note: declared here extern disassembler_ftype disassembler (enum bfd_architecture arc, ^~~~~~~~~~~~ CC arch/x86/util/header.o CC arch/x86/util/tsc.o CC arch/x86/util/pmu.oQuoted 11 lines
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
CCbench/futex-requeue.o
CCarch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97:util/annotate.o] Error 1
make[4]: *** Waiting for unfinished jobs....
CCutil/build-id.oAnd I forgot...
Reverting:
From6987561c9e86eace45f2dbb0c564964a63f4150aMon Sep 17 00:00:00 2001
From: Song Liu <[email protected]>
Date: Mon, 11 Mar 2019 22:30:48 -0700
Subject: perf annotate: Enable annotation of BPF programsQuoted 5 lines
Makes it build again.
--
ThomasQuoted 6 lines
Hi Thomas,
Which system are you running this test on? I would like to repro it in a VM.
Thanks,
SongMageia Cauldron currently stabilizing to become Mageia 7 in ~1 month.
Basesystem is:
binutils-2.32-5.mga7
(includes all fixes from upstream binutils-2_32-branch)gcc-8.3.1-0.20190419.2.mga7
glibc-2.29-7.mga7
(includes all fixes from upstream glibc release/2.29/master branch up to 2019-04-15 for now)
Quoted 9 lines
kernel-desktop-5.1.0-0.rc7.1.mga7
kernel-userspace-headers-5.1.0-0.rc7.1.mga7--
Thomas
I am trying to install Mageia 7 beta 3, but hit some issue. While I try fix it, could you please try clean everything under tools/ and retry:
make -C tools/ clean
make -C tools/perf -j
If it still fails, how about building bpftool?
make -C tools/bpf -j
Thanks,
Song
Den 01-05-2019 kl. 06:37, skrev Song Liu:
Quoted 129 lines · Thomas Backlund
Quoted 128 lines
Den 30-04-2019 kl. 16:06, skrev Song Liu:
Quoted 98 lines · Thomas Backlund
Quoted 88 lines
Den 30-04-2019 kl. 10:26, skrev Thomas Backlund:
Quoted 65 lines
Building perf in 5.1-rc5/6/7 fails:
Build start:
make -s -C tools/perf NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 all BUILD: Doing 'make -j32' parallel build HOSTCC fixdep.o HOSTLD fixdep-in.o LINK fixdepWarning: Kernel ABI header at '
tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -utools/arch/x86/include/uapi/asm/vmx.harch/x86/include/uapi/asm/vmx.hAuto-detecting system features:
... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ]... disassembler-four-args: [ OFF ]
Makefile.config:473: No
sys/sdt.hfound, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-devAnd breaks with:
CC
ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'disassemble = disassembler(bfdf); ^~~~In file included from
util/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enumbfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'}
externdisassembler_ftypedisassembler (enumbfd_architecturearc,
~~~~~~~~~~~~~~~~~~~~~~^~~util/annotate.c:1767:16: error: too few arguments to function 'disassembler'disassemble = disassembler(bfdf); ^~~~~~~~~~~~Quoted 18 lines
In file included from
util/annotate.c:1689:/usr/include/dis-asm.h:325:27: note: declared here
externdisassembler_ftypedisassembler (enumbfd_architecturearc,
^~~~~~~~~~~~
CCarch/x86/util/header.o
CCarch/x86/util/tsc.o
CCarch/x86/util/pmu.o
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
CCbench/futex-requeue.o
CCarch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97:util/annotate.o] Error 1
make[4]: *** Waiting for unfinished jobs....
CCutil/build-id.oAnd I forgot...
Reverting:
From 6987561c9e86eace45f2dbb0c564964a63f4150a Mon Sep 17 00:00:00 2001Quoted 9 lines
From: Song Liu <[email protected]>
Date: Mon, 11 Mar 2019 22:30:48 -0700
Subject: perf annotate: Enable annotation of BPF programsMakes it build again.
--
ThomasQuoted 6 lines
Hi Thomas,
Which system are you running this test on? I would like to repro it in a VM.
Thanks,
SongMageia Cauldron currently stabilizing to become Mageia 7 in ~1 month.
Basesystem is:
binutils-2.32-5.mga7
(includes all fixes from upstream binutils-2_32-branch)gcc-8.3.1-0.20190419.2.mga7
glibc-2.29-7.mga7
(includes all fixes from upstream glibc release/2.29/master branch up to 2019-04-15 for now)kernel-desktop-5.1.0-0.rc7.1.mga7
kernel-userspace-headers-5.1.0-0.rc7.1.mga7--
Quoted 8 lines
Quoted 3 lines
Thomas
I am trying to install Mageia 7 beta 3, but hit some issue. While I try fix it, could you please try clean everything under
tools/and retry:make -C
tools/clean
make -Ctools/perf-j
Still fails:
util/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'
disassemble = disassembler(bfdf);
^~~~
In file included from util/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enum bfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'} extern disassembler_ftype disassembler (enum bfd_architecture arc,
~~~~~~~~~~~~~~~~~~~~~~^~~util/annotate.c:1767:16: error: too few arguments to function 'disassembler'
disassemble = disassembler(bfdf);
^~~~~~~~~~~~
In file included from util/annotate.c:1689:/usr/include/dis-asm.h:325:27: note: declared here
extern disassembler_ftype disassembler (enum bfd_architecture arc,
^~~~~~~~~~~~
CC scripts/python/Perf-Trace-Util/Context.o
CC bench/mem-memcpy-x86-64-lib.o
CC tests/parse-events.o
CC util/block-range.o
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
make[4]: *** [/work/5.1/linux-5.1-rc7-mga07/tools/build/Makefile.build:97: util/annotate.o] Error 1 make[4]: *** Waiting for unfinished jobs....
CC ui/util.o
Quoted 4 lines
If it still fails, how about building bpftool?
make -C
tools/bpf-j
Also fails:
Auto-detecting system features:
... libbfd: [ on ]
... disassembler-four-args: [ OFF ]
CC bpf_jit_disasm.o
CC bpf_dbg.o
CC bpf_asm.o
BISON bpf_exp.yacc.c
DESCEND bpftool
make[1]: Entering directory '/work/5.1/linux-5.1-rc7-mga07/tools/bpf/bpftool' /work/5.1/linux-5.1-rc7-mga07/tools/bpf/bpf_jit_disasm.c: In function 'get_asm_insns':
/work/5.1/linux-5.1-rc7-mga07/tools/bpf/bpf_jit_disasm.c:81:29: error: incompatible type for argument 1 of 'disassembler' disassemble = disassembler(bfdf);
^~~~
In file included from /work/5.1/linux-5.1-rc7-mga07/tools/bpf/bpf_jit_disasm.c:24:/usr/include/dis-asm.h:325:63: note: expected 'enum bfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'} extern disassembler_ftype disassembler (enum bfd_architecture arc,
~~~~~~~~~~~~~~~~~~~~~~^~~ /work/5.1/linux-5.1-rc7-mga07/tools/bpf/bpf_jit_disasm.c:81:16: error: too few arguments to function 'disassembler' disassemble = disassembler(bfdf);
^~~~~~~~~~~~
In file included from /work/5.1/linux-5.1-rc7-mga07/tools/bpf/bpf_jit_disasm.c:24:/usr/include/dis-asm.h:325:27: note: declared here
extern disassembler_ftype disassembler (enum bfd_architecture arc,
^~~~~~~~~~~~
make: *** [Makefile:57: bpf_jit_disasm.o] Error 1
make: *** Waiting for unfinished jobs....
So is this a bug in feature misdetection?
In your commit message you state:
"And making all this dependent on HAVE_LIBBFD_SUPPORT and HAVE_LIBBPF_SUPPORT:"
Now we obviously have libbfd.
But if the HAVE_LIBBPF_SUPPORT means tools/lib/bpf, then I havent packaged that yet, so why is it detecting it as available ?
--
Thomas
Em Tue, Apr 30, 2019 at 04:31:14PM +0300, Thomas Backlund escreveu:
Quoted 117 lines
Den 30-04-2019 kl. 16:06, skrev Song Liu:
Quoted 97 lines · Thomas Backlund
Quoted 91 lines
Den 30-04-2019 kl. 10:26, skrev Thomas Backlund:
Quoted 70 lines
Building perf in 5.1-rc5/6/7 fails:
Build start:
make -s -C tools/perf NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 all BUILD: Doing 'make -j32' parallel build HOSTCC fixdep.o HOSTLD fixdep-in.o LINK fixdepWarning: Kernel ABI header at '
tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -utools/arch/x86/include/uapi/asm/vmx.harch/x86/include/uapi/asm/vmx.hAuto-detecting system features:
... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ]... disassembler-four-args: [ OFF ]
Makefile.config:473: No
sys/sdt.hfound, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-devAnd breaks with:
CC
ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'disassemble = disassembler(bfdf); ^~~~In file included from
util/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enumbfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'}
externdisassembler_ftypedisassembler (enumbfd_architecturearc,~~~~~~~~~~~~~~~~~~~~~~^~~ util/annotate.c:1767:16: error: too few arguments to function 'disassembler' disassemble = disassembler(bfdf); ^~~~~~~~~~~~ In file included from util/annotate.c:1689: /usr/include/dis-asm.h:325:27: note: declared here extern disassembler_ftype disassembler (enum bfd_architecture arc, ^~~~~~~~~~~~ CC arch/x86/util/header.o CC arch/x86/util/tsc.o CC arch/x86/util/pmu.oQuoted 11 lines
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
CCbench/futex-requeue.o
CCarch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97:util/annotate.o] Error 1
make[4]: *** Waiting for unfinished jobs....
CCutil/build-id.oAnd I forgot...
Reverting:
From6987561c9e86eace45f2dbb0c564964a63f4150aMon Sep 17 00:00:00 2001
From: Song Liu <[email protected]>
Date: Mon, 11 Mar 2019 22:30:48 -0700
Subject: perf annotate: Enable annotation of BPF programsQuoted 5 lines
Makes it build again.
--
ThomasQuoted 6 lines
Hi Thomas,
Which system are you running this test on? I would like to repro it in a VM.
Thanks,
SongMageia Cauldron currently stabilizing to become Mageia 7 in ~1 month.
Basesystem is:
binutils-2.32-5.mga7
(includes all fixes from upstream binutils-2_32-branch)gcc-8.3.1-0.20190419.2.mga7
Quoted 7 lines
glibc-2.29-7.mga7
(includes all fixes from upstream glibc release/2.29/master branch up to 2019-04-15 for now)kernel-desktop-5.1.0-0.rc7.1.mga7
kernel-userspace-headers-5.1.0-0.rc7.1.mga7
Ok, so the steps are:
1) the feature test, the small C program that we try to build is:
[acme@quaco perf]$ cat tools/build/feature/test-disassembler-four-args.c // SPDX-License-Identifier: GPL-2.0
#include <bfd.h>
#include <dis-asm.h>
int main(void)
{
bfd *abfd = bfd_openr(NULL, NULL);
disassembler(bfd_get_arch(abfd),
bfd_big_endian(abfd),
bfd_get_mach(abfd),
abfd);
return 0;
}[acme@quaco perf]$
And here in my fedora29 system it ends up producing the following file, when built with:
$ make O=/tmp/build/perf -C tools/perf install-bin
[acme@quaco perf]$ cat /tmp/build/perf/feature/test-disassembler-four-args.make.output
[acme@quaco perf]$
[acme@quaco perf]$ file /tmp/build/perf/feature/test-disassembler-four-args.bin/tmp/build/perf/feature/test-disassembler-four-args.bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=c9bd83db766a620c5cb6d756b0cd6991527641ff, not stripped, too many notes (256) [acme@quaco perf]$ ldd /tmp/build/perf/feature/test-disassembler-four-args.bin
linux-vdso.so.1 (0x00007ffebc5f9000) libz.so.1 => /lib64/libz.so.1 (0x00007fed2da04000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fed2d9fe000) libc.so.6 => /lib64/libc.so.6 (0x00007fed2d838000) /lib64/ld-linux-x86-64.so.2 (0x00007fed2da3e000)
[acme@quaco perf]$
Meaning it built properly, so in this sytem the disassembler() function has indeed four args, so we end up with:
[acme@quaco perf]$ grep disassembler /tmp/build/perf/FEATURE-DUMP feature-disassembler-four-args=1
[acme@quaco perf]$
Can you check the output for /tmp/build/perf/feature/test-disassembler-four-args.make.output in your system? And also check what is the prototype for the disassembler() routine on mageia7?
Here I have:
[acme@quaco perf]$ rpm -q binutils
binutils-2.31.1-25.fc29.x86_64
[acme@quaco perf]$
Perhaps binutils 2.32 changed that prototype again and instead of falling back to using just one arg we need to use some other number of args, or even a different type for the N args it now maybe have?
- Arnaldo
Den 01-05-2019 kl. 16:07, skrev Arnaldo Carvalho de Melo:
Quoted 162 lines
Em Tue, Apr 30, 2019 at 04:31:14PM +0300, Thomas Backlund escreveu:
Quoted 112 lines
Den 30-04-2019 kl. 16:06, skrev Song Liu:
Quoted 94 lines · Thomas Backlund
Quoted 84 lines
Den 30-04-2019 kl. 10:26, skrev Thomas Backlund:
Quoted 61 lines
Building perf in 5.1-rc5/6/7 fails:
Build start:make -s -C tools/perf NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 all BUILD: Doing 'make -j32' parallel build HOSTCC fixdep.o HOSTLD fixdep-in.o LINK fixdepWarning: Kernel ABI header at '
tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -utools/arch/x86/include/uapi/asm/vmx.harch/x86/include/uapi/asm/vmx.hAuto-detecting system features:
... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ]... disassembler-four-args: [ OFF ]
Makefile.config:473: No
sys/sdt.hfound, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-devAnd breaks with:
CC
ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'disassemble = disassembler(bfdf); ^~~~In file included from
util/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enumbfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'}
externdisassembler_ftypedisassembler (enumbfd_architecturearc,
~~~~~~~~~~~~~~~~~~~~~~^~~util/annotate.c:1767:16: error: too few arguments to function 'disassembler'disassemble = disassembler(bfdf); ^~~~~~~~~~~~Quoted 18 lines
In file included from
util/annotate.c:1689:/usr/include/dis-asm.h:325:27: note: declared here
externdisassembler_ftypedisassembler (enumbfd_architecturearc,
^~~~~~~~~~~~
CCarch/x86/util/header.o
CCarch/x86/util/tsc.o
CCarch/x86/util/pmu.o
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory
CCbench/futex-requeue.o
CCarch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97:util/annotate.o] Error 1
make[4]: *** Waiting for unfinished jobs....
CCutil/build-id.oAnd I forgot...
Reverting:
From 6987561c9e86eace45f2dbb0c564964a63f4150a Mon Sep 17 00:00:00 2001Quoted 9 lines
From: Song Liu <[email protected]>
Date: Mon, 11 Mar 2019 22:30:48 -0700
Subject: perf annotate: Enable annotation of BPF programsMakes it build again.
--
ThomasQuoted 6 lines
Hi Thomas,
Which system are you running this test on? I would like to repro it in a VM.
Thanks,
SongMageia Cauldron currently stabilizing to become Mageia 7 in ~1 month.
Basesystem is:
binutils-2.32-5.mga7
(includes all fixes from upstream binutils-2_32-branch)gcc-8.3.1-0.20190419.2.mga7
Quoted 7 lines
glibc-2.29-7.mga7
(includes all fixes from upstream glibc release/2.29/master branch up to 2019-04-15 for now)kernel-desktop-5.1.0-0.rc7.1.mga7
kernel-userspace-headers-5.1.0-0.rc7.1.mga7Ok, so the steps are:
1) the feature test, the small C program that we try to build is:
[acme@quaco perf]$ cat
tools/build/feature/test-disassembler-four-args.c// SPDX-License-Identifier: GPL-2.0
#include <bfd.h>
#include <dis-asm.h>int main(void)
{ bfd *abfd = bfd_openr(NULL, NULL); disassembler(bfd_get_arch(abfd), bfd_big_endian(abfd), bfd_get_mach(abfd), abfd); return 0; }[acme@quaco perf]$
And here in my fedora29 system it ends up producing the following file, when built with:
$ make O=/tmp/build/perf -C tools/perf install-bin[acme@quaco perf]$ cat
/tmp/build/perf/feature/test-disassembler-four-args.make.output
[acme@quaco perf]$
[acme@quaco perf]$ file/tmp/build/perf/feature/test-disassembler-four-args.bin/tmp/build/perf/feature/test-disassembler-four-args.bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter/lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=c9bd83db766a620c5cb6d756b0cd6991527641ff, not stripped, too many notes (256) [acme@quaco perf]$ ldd/tmp/build/perf/feature/test-disassembler-four-args.binlinux-vdso.so.1 (0x00007ffebc5f9000) libz.so.1 => /lib64/libz.so.1 (0x00007fed2da04000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fed2d9fe000) libc.so.6 => /lib64/libc.so.6 (0x00007fed2d838000) /lib64/ld-linux-x86-64.so.2 (0x00007fed2da3e000)[acme@quaco perf]$
Meaning it built properly, so in this sytem the
disassembler()function has indeed four args, so we end up with:
Quoted 8 lines
[acme@quaco perf]$ grep disassembler
/tmp/build/perf/FEATURE-DUMPfeature-disassembler-four-args=1
[acme@quaco perf]$Can you check the output for
/tmp/build/perf/feature/test-disassembler-four-args.make.outputin your system? And also check what is the prototype for thedisassembler()routine on mageia7?
I guess this is what fails the test:
cat /tmp/build/perf/feature/test-disassembler-four-args.make.output/usr/bin/ld: /usr/lib64/libbfd.a(plugin.o): in function `try_load_plugin':/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:243: undefined reference to dlopen' /usr/bin/ld: /home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:271: undefined reference to dlsym' /usr/bin/ld: /home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:256: undefined reference to dlclose' /usr/bin/ld: /home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:246: undefined reference to dlerror'
as we allow dynamic linking and loading
And we use linker flags:
rpm --eval %ldflags
-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags
So it reports:
disassembler-four-args: [ OFF ]
And falls back to one single command.
Quoted 11 lines
Here I have:
[acme@quaco perf]$ rpm -q binutils
binutils-2.31.1-25.fc29.x86_64
[acme@quaco perf]$Perhaps binutils 2.32 changed that prototype again and instead of falling back to using just one arg we need to use some other number of args, or even a different type for the N args it now maybe have?
- Arnaldo
There is no change in 2.32
disassembler_ftype
disassembler (enum bfd_architecture a, bfd_boolean big ATTRIBUTE_UNUSED, unsigned long mach ATTRIBUTE_UNUSED, bfd *abfd ATTRIBUTE_UNUSED)
Is there a way to force it to "detect" / use 4 args ?
--
Thomas
Den 01-05-2019 kl. 17:09, skrev Thomas Backlund:
Quoted 223 lines
Den 01-05-2019 kl. 16:07, skrev Arnaldo Carvalho de Melo:
Quoted 163 lines
Em Tue, Apr 30, 2019 at 04:31:14PM +0300, Thomas Backlund escreveu:
Quoted 113 lines
Den 30-04-2019 kl. 16:06, skrev Song Liu:
Quoted 95 lines · Thomas Backlund
Quoted 83 lines
Den 30-04-2019 kl. 10:26, skrev Thomas Backlund:
Quoted 74 lines
Building perf in 5.1-rc5/6/7 fails:
Build start:
make -s -Ctools/perfNO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=/usr lib=lib64 all
BUILD: Doing 'make -j32' parallel build
HOSTCC fixdep.o
HOSTLD fixdep-in.o
LINK fixdep
Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -utools/arch/x86/include/uapi/asm/vmx.harch/x86/include/uapi/asm/vmx.hAuto-detecting system features:
... dwarf: [ on ]
...dwarf_getlocations: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
...numa_num_possible_cpus: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libcrypto: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
...get_cpuid: [ on ]
... bpf: [ on ]
... libaio: [ on ]
... disassembler-four-args: [ OFF ]Makefile.config:473: No
sys/sdt.hfound, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev Makefile.config:853: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-devAnd breaks with:
CC
ui/setup.outil/annotate.c: In function 'symbol__disassemble_bpf':util/annotate.c:1767:29: error: incompatible type for argument 1 of 'disassembler'
disassemble = disassembler(bfdf);
^~~~
In file included fromutil/annotate.c:1689:/usr/include/dis-asm.h:325:63: note: expected 'enumbfd_architecture' but argument is of type 'bfd *' {aka 'struct bfd *'}
externdisassembler_ftypedisassembler (enumbfd_architecturearc, ~~~~~~~~~~~~~~~~~~~~~~^~~util/annotate.c:1767:16: error: too few arguments to function 'disassembler'
disassemble = disassembler(bfdf);
^~~~~~~~~~~~
In file included fromutil/annotate.c:1689:/usr/include/dis-asm.h:325:27: note: declared here
externdisassembler_ftypedisassembler (enumbfd_architecturearc, ^~~~~~~~~~~~
CCarch/x86/util/header.o
CCarch/x86/util/tsc.o
CCarch/x86/util/pmu.o
mv: cannot stat 'util/.annotate.o.tmp': No such file or directory CCbench/futex-requeue.o
CCarch/x86/util/kvm-stat.o
make[4]: *** [/work/rpmbuild/BUILD/kernel-x86_64/linux-5.0/tools/build/Makefile.build:97:Quoted 6 lines
util/annotate.o] Error 1
make[4]: *** Waiting for unfinished jobs....
CCutil/build-id.oAnd I forgot...
Quoted 11 lines
Reverting:
From6987561c9e86eace45f2dbb0c564964a63f4150aMon Sep 17 00:00:00 2001
From: Song Liu <[email protected]>
Date: Mon, 11 Mar 2019 22:30:48 -0700
Subject: perf annotate: Enable annotation of BPF programsMakes it build again.
Signature · 1 line
ThomasQuoted 6 lines
Hi Thomas,
Which system are you running this test on? I would like to repro it in a VM.
Thanks,
SongMageia Cauldron currently stabilizing to become Mageia 7 in ~1 month.
Basesystem is:
binutils-2.32-5.mga7
(includes all fixes from upstream binutils-2_32-branch)gcc-8.3.1-0.20190419.2.mga7
Quoted 7 lines
glibc-2.29-7.mga7
(includes all fixes from upstream glibc release/2.29/master branch up to 2019-04-15 for now)kernel-desktop-5.1.0-0.rc7.1.mga7
kernel-userspace-headers-5.1.0-0.rc7.1.mga7Ok, so the steps are:
1) the feature test, the small C program that we try to build is:
[acme@quaco perf]$ cat
tools/build/feature/test-disassembler-four-args.c// SPDX-License-Identifier: GPL-2.0
#include <bfd.h>
#include <dis-asm.h>int main(void)
{
bfd *abfd =bfd_openr(NULL, NULL);disassembler(bfd_get_arch(abfd),
bfd_big_endian(abfd),
bfd_get_mach(abfd),
abfd);return 0;
}
[acme@quaco perf]$And here in my fedora29 system it ends up producing the following file, when built with:
$ make O=/tmp/build/perf -C tools/perf install-bin[acme@quaco perf]$ cat
/tmp/build/perf/feature/test-disassembler-four-args.make.output
[acme@quaco perf]$
[acme@quaco perf]$ file/tmp/build/perf/feature/test-disassembler-four-args.bin/tmp/build/perf/feature/test-disassembler-four-args.bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter/lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=c9bd83db766a620c5cb6d756b0cd6991527641ff, not stripped, too many notes (256) [acme@quaco perf]$ ldd/tmp/build/perf/feature/test-disassembler-four-args.bin
linux-vdso.so.1 (0x00007ffebc5f9000)
libz.so.1 =>/lib64/libz.so.1(0x00007fed2da04000)
libdl.so.2 =>/lib64/libdl.so.2(0x00007fed2d9fe000)
libc.so.6 =>/lib64/libc.so.6(0x00007fed2d838000)
/lib64/ld-linux-x86-64.so.2 (0x00007fed2da3e000)
[acme@quaco perf]$Meaning it built properly, so in this sytem the
disassembler()function has indeed four args, so we end up with:Quoted 8 lines
[acme@quaco perf]$ grep disassembler
/tmp/build/perf/FEATURE-DUMPfeature-disassembler-four-args=1
[acme@quaco perf]$Can you check the output for
/tmp/build/perf/feature/test-disassembler-four-args.make.outputin your system? And also check what is the prototype for thedisassembler()routine on mageia7?I guess this is what fails the test:
cat
/tmp/build/perf/feature/test-disassembler-four-args.make.output/usr/bin/ld: /usr/lib64/libbfd.a(plugin.o): in function `try_load_plugin':/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:243: undefined reference todlopen' /usr/bin/ld: /home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:271: undefined reference todlsym'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:256: undefined reference todlclose' /usr/bin/ld: /home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:246: undefined reference todlerror'as we allow dynamic linking and loading
And we use linker flags:
rpm --eval %ldflags
-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtagsSo it reports:
disassembler-four-args: [ OFF ]
And falls back to one single command.
Quoted 11 lines
Here I have:
[acme@quaco perf]$ rpm -q binutils
binutils-2.31.1-25.fc29.x86_64
[acme@quaco perf]$Perhaps binutils 2.32 changed that prototype again and instead of falling back to using just one arg we need to use some other number of args, or even a different type for the N args it now maybe have?
- Arnaldo
There is no change in 2.32
disassembler_ftype
disassembler (enumbfd_architecturea,bfd_booleanbigATTRIBUTE_UNUSED, unsigned long machATTRIBUTE_UNUSED, bfd *abfdATTRIBUTE_UNUSED)
Quoted 3 lines
Is there a way to force it to "detect" / use 4 args ?
And just to confirm, disabling the test with:
tools/perf/Makefile.config 2019-05-01 17:18:25.328312186 +0300 renamed from tools/perf/Makefile.config.orig 2019-04-29 11:45:54.168627795 +0300 +0 -0
@@ -813,9 +813,9 @@ ifdef HAVE_KVM_STAT_SUPPORT
CFLAGS += -DHAVE_KVM_STAT_SUPPORT
endif
-ifeq ($(feature-disassembler-four-args), 1)
+#ifeq ($(feature-disassembler-four-args), 1)
CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE
-endif
+#endif
makes the perf build work again.
--
Thomas
Em Wed, May 01, 2019 at 05:09:59PM +0300, Thomas Backlund escreveu:
Quoted 24 lines
Den 01-05-2019 kl. 16:07, skrev Arnaldo Carvalho de Melo:
Quoted 5 lines
Em Tue, Apr 30, 2019 at 04:31:14PM +0300, Thomas Backlund escreveu:
Can you check the output for/tmp/build/perf/feature/test-disassembler-four-args.make.outputin your system? And also check what is the prototype for thedisassembler()routine on mageia7?I guess this is what fails the test:
cat
/tmp/build/perf/feature/test-disassembler-four-args.make.output/usr/bin/ld: /usr/lib64/libbfd.a(plugin.o): in function `try_load_plugin':/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:243:
undefined reference to `dlopen'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:271:
undefined reference to `dlsym'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:256:
undefined reference to `dlclose'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:246:
undefined reference to `dlerror'
Quoted 7 lines
as we allow dynamic linking and loading
And we use linker flags:
rpm --eval %ldflags
-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags
Would this help?
tools/perf/Makefile.config +1 -1
@@ -227,7 +227,7 @@ FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) EATURE_CHECK_LDFLAGS-libaio = -lrt -FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes +FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl CFLAGS += -fno-omit-frame-pointer CFLAGS += -ggdb3
Thomas Backlund
Tested-byDen 01-05-2019 kl. 20:31, skrev Arnaldo Carvalho de Melo:
Quoted 38 lines
Em Wed, May 01, 2019 at 05:09:59PM +0300, Thomas Backlund escreveu:
Quoted 22 lines
Den 01-05-2019 kl. 16:07, skrev Arnaldo Carvalho de Melo:
Quoted 5 lines
Em Tue, Apr 30, 2019 at 04:31:14PM +0300, Thomas Backlund escreveu:
Can you check the output for/tmp/build/perf/feature/test-disassembler-four-args.make.outputin your system? And also check what is the prototype for thedisassembler()routine on mageia7?I guess this is what fails the test:
cat
/tmp/build/perf/feature/test-disassembler-four-args.make.output/usr/bin/ld: /usr/lib64/libbfd.a(plugin.o): in function `try_load_plugin':/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:243:
undefined reference to `dlopen'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:271:
undefined reference to `dlsym'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:256:
undefined reference to `dlclose'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:246:
undefined reference to `dlerror'Quoted 7 lines
as we allow dynamic linking and loading
And we use linker flags:
rpm --eval %ldflags
-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id
-Wl,--enable-new-dtagsWould this help?
tools/perf/Makefile.config +0
-0
tools/perf/Makefile.config FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) · line 233
Quoted 8 lines
tools/perf/Makefile.config +1
-1@@ -227,7 +227,7 @@ FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) EATURE_CHECK_LDFLAGS-libaio = -lrt -FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes +FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl CFLAGS += -fno-omit-frame-pointer CFLAGS += -ggdb3
Yeah, that fixes it
and /tmp/build/perf/feature/test-disassembler-four-args.make.output is now empty as wanted.
So I guess:
Thanks!
--
Thomas
Em Wed, May 01, 2019 at 11:20:02PM +0300, Thomas Backlund escreveu:
Quoted 44 lines
Den 01-05-2019 kl. 20:31, skrev Arnaldo Carvalho de Melo:
Quoted 33 lines
Em Wed, May 01, 2019 at 05:09:59PM +0300, Thomas Backlund escreveu:
Quoted 17 lines
Den 01-05-2019 kl. 16:07, skrev Arnaldo Carvalho de Melo:
Quoted 5 lines
Em Tue, Apr 30, 2019 at 04:31:14PM +0300, Thomas Backlund escreveu:
Can you check the output for/tmp/build/perf/feature/test-disassembler-four-args.make.outputin your system? And also check what is the prototype for thedisassembler()routine on mageia7?I guess this is what fails the test:
cat/tmp/build/perf/feature/test-disassembler-four-args.make.output/usr/bin/ld: /usr/lib64/libbfd.a(plugin.o): in function `try_load_plugin':/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:243:
undefined reference to `dlopen'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:271:
undefined reference to `dlsym'/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:256:
undefined reference to `dlclose'Quoted 8 lines
/usr/bin/ld:/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:246:
undefined reference to `dlerror'
as we allow dynamic linking and loading
And we use linker flags:
rpm --eval %ldflags
-Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id
-Wl,--enable-new-dtagsWould this help?
tools/perf/Makefile.config +0
-0tools/perf/Makefile.config FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) · line 231
Quoted 6 lines
tools/perf/Makefile.config +1
-1@@ -227,7 +227,7 @@ FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) EATURE_CHECK_LDFLAGS-libaio = -lrt -FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes +FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl CFLAGS += -fno-omit-frame-pointer CFLAGS += -ggdb3Yeah, that fixes it
Quoted 8 lines
and
/tmp/build/perf/feature/test-disassembler-four-args.make.outputis now empty as wanted.So I guess:
Reported-by Thomas Backlund <[email protected]>Tested-by Thomas Backlund <[email protected]>
Great, thanks for testing!
- Arnaldo
Quoted 9 lines
Thanks!
--
Thomas
Signature · 1 line
- Arnaldo
tip-bot for Arnaldo Carvalho de Melo
merge bot[tip:perf/urgent] tools build: Add -ldl to the disassembler-four-args feature test
In reply to Arnaldo Carvalho de Melotools build: Add -ldl to the disassembler-four-args feature test
Commit-ID: c638417e1a64b1f43ebab589e697d1cd1a127a74 Gitweb: https://git.kernel.org/tip/c638417e1a64b1f43ebab589e697d1cd1a127a74 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Wed, 1 May 2019 16:27:00 -0400 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 2 May 2019 16:00:20 -0400
tools build: Add -ldl to the disassembler-four-args feature test
Thomas Backlund reported that the perf build was failing on the Mageia 7 distro, that is because it uses:
cat /tmp/build/perf/feature/test-disassembler-four-args.make.output /usr/bin/ld: /usr/lib64/libbfd.a(plugin.o): in function `try_load_plugin':
/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:243:
undefined reference to `dlopen'
/usr/bin/ld:
/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:271:
undefined reference to `dlsym'
/usr/bin/ld:
/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:256:
undefined reference to `dlclose'
/usr/bin/ld:
/home/iurt/rpmbuild/BUILD/binutils-2.32/objs/bfd/../../bfd/plugin.c:246:
undefined reference to `dlerror'
as we allow dynamic linking and loading
Mageia 7 uses these linker flags:
$ rpm --eval %ldflags -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags
So add -ldl to this feature LDFLAGS.
--- tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.config +1 -1
@@ -227,7 +227,7 @@ FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) FEATURE_CHECK_LDFLAGS-libaio = -lrt -FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes +FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl CFLAGS += -fno-omit-frame-pointer CFLAGS += -ggdb3