Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1364967 > unrolled thread
| Started by | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
|---|---|
| First post | 2016-03-26 19:10 +0100 |
| Last post | 2016-03-28 14:30 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] perf tools: Fix build break on powerpc Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> - 2016-03-26 19:10 +0100
Re: [PATCH 1/1] perf tools: Fix build break on powerpc Jiri Olsa <jolsa@redhat.com> - 2016-03-27 13:20 +0200
Re: [PATCH 1/1] perf tools: Fix build break on powerpc Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-28 14:40 +0200
Re: [PATCH 1/1] perf tools: Fix build break on powerpc Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-28 15:30 +0200
Re: [PATCH 1/1] perf tools: Fix build break on powerpc Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-28 15:50 +0200
Re: [PATCH 1/1] perf tools: Fix build break on powerpc Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-28 14:30 +0200
| From | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-03-26 19:10 +0100 |
| Subject | [PATCH 1/1] perf tools: Fix build break on powerpc |
| Message-ID | <rh0OT-4sQ-9@gated-at.bofh.it> |
From 502e8236082412db1d33abfad95aaf14b539502e Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Date: Sat, 26 Mar 2016 17:31:39 -0400
Subject: [PATCH 1/1] perf tools: Fix build break on powerpc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
'Commit 531d2410635c ("perf tools: Do not include stringify.h from the
kernel sources")' seems to have accidentially removed the inclusion of
"util/header.h" from "arch/powerpc/util/header.c".
"util/header.h" provides the prototype for get_cpuid() and is needed to
build perf on Powerpc.
arch/powerpc/util/header.c:17:1: error: no previous prototype for
‘get_cpuid’ [-Werror=missing-prototypes]
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
tools/perf/arch/powerpc/util/header.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
index 6138bde..5111e34 100644
--- a/tools/perf/arch/powerpc/util/header.c
+++ b/tools/perf/arch/powerpc/util/header.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <linux/stringify.h>
+#include "../../util/header.h"
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \
--
1.8.3.1
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-03-27 13:20 +0200 |
| Message-ID | <rhgTD-7rL-5@gated-at.bofh.it> |
| In reply to | #1364967 |
On Sat, Mar 26, 2016 at 11:01:47AM -0700, Sukadev Bhattiprolu wrote:
> From 502e8236082412db1d33abfad95aaf14b539502e Mon Sep 17 00:00:00 2001
> From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Date: Sat, 26 Mar 2016 17:31:39 -0400
> Subject: [PATCH 1/1] perf tools: Fix build break on powerpc
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> 'Commit 531d2410635c ("perf tools: Do not include stringify.h from the
> kernel sources")' seems to have accidentially removed the inclusion of
> "util/header.h" from "arch/powerpc/util/header.c".
>
> "util/header.h" provides the prototype for get_cpuid() and is needed to
> build perf on Powerpc.
>
> arch/powerpc/util/header.c:17:1: error: no previous prototype for
> ‘get_cpuid’ [-Werror=missing-prototypes]
>
> Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> ---
> tools/perf/arch/powerpc/util/header.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
> index 6138bde..5111e34 100644
> --- a/tools/perf/arch/powerpc/util/header.c
> +++ b/tools/perf/arch/powerpc/util/header.c
> @@ -4,6 +4,7 @@
> #include <stdlib.h>
> #include <string.h>
> #include <linux/stringify.h>
> +#include "../../util/header.h"
you could use just "header.h" right?
jirka
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-03-28 14:40 +0200 |
| Message-ID | <rhECB-74S-15@gated-at.bofh.it> |
| In reply to | #1365098 |
Em Sun, Mar 27, 2016 at 01:19:03PM +0200, Jiri Olsa escreveu:
> On Sat, Mar 26, 2016 at 11:01:47AM -0700, Sukadev Bhattiprolu wrote:
> > From 502e8236082412db1d33abfad95aaf14b539502e Mon Sep 17 00:00:00 2001
> > From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> > Date: Sat, 26 Mar 2016 17:31:39 -0400
> > Subject: [PATCH 1/1] perf tools: Fix build break on powerpc
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> >
> > 'Commit 531d2410635c ("perf tools: Do not include stringify.h from the
> > kernel sources")' seems to have accidentially removed the inclusion of
> > "util/header.h" from "arch/powerpc/util/header.c".
> >
> > "util/header.h" provides the prototype for get_cpuid() and is needed to
> > build perf on Powerpc.
> >
> > arch/powerpc/util/header.c:17:1: error: no previous prototype for
> > ‘get_cpuid’ [-Werror=missing-prototypes]
> >
> > Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> > Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> > ---
> > tools/perf/arch/powerpc/util/header.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
> > index 6138bde..5111e34 100644
> > --- a/tools/perf/arch/powerpc/util/header.c
> > +++ b/tools/perf/arch/powerpc/util/header.c
> > @@ -4,6 +4,7 @@
> > #include <stdlib.h>
> > #include <string.h>
> > #include <linux/stringify.h>
> > +#include "../../util/header.h"
>
> you could use just "header.h" right?
Like this? I'm trying to find a way to do ppc cross builds, one more
thing to have in the build-tests...
commit 150da025b7f135450ca833fb80d54d59f0ddf185
Author: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Date: Mon Mar 28 09:31:41 2016 -0300
perf tools: Fix build break on powerpc
Commit 531d2410635c ("perf tools: Do not include stringify.h from the
kernel sources") seems to have accidentially removed the inclusion of
"util/header.h" from "arch/powerpc/util/header.c".
"util/header.h" provides the prototype for get_cpuid() and is needed to
build perf on Powerpc:
arch/powerpc/util/header.c:17:1: error: no previous prototype for ‘get_cpuid’ [-Werror=missing-prototypes]
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Fixes: 531d2410635c ("perf tools: Do not include stringify.h from the kernel sources")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
index 6138bdef6e63..6de1a93241ae 100644
--- a/tools/perf/arch/powerpc/util/header.c
+++ b/tools/perf/arch/powerpc/util/header.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <linux/stringify.h>
+#include "header.h"
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-03-28 15:30 +0200 |
| Message-ID | <rhFp0-7Hz-27@gated-at.bofh.it> |
| In reply to | #1365468 |
Em Mon, Mar 28, 2016 at 09:35:31AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Sun, Mar 27, 2016 at 01:19:03PM +0200, Jiri Olsa escreveu:
> > On Sat, Mar 26, 2016 at 11:01:47AM -0700, Sukadev Bhattiprolu wrote:
> > > From 502e8236082412db1d33abfad95aaf14b539502e Mon Sep 17 00:00:00 2001
> > > From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> > > Date: Sat, 26 Mar 2016 17:31:39 -0400
> > > Subject: [PATCH 1/1] perf tools: Fix build break on powerpc
> > > MIME-Version: 1.0
> > > Content-Type: text/plain; charset=UTF-8
> > > Content-Transfer-Encoding: 8bit
> > >
> > > 'Commit 531d2410635c ("perf tools: Do not include stringify.h from the
> > > kernel sources")' seems to have accidentially removed the inclusion of
> > > "util/header.h" from "arch/powerpc/util/header.c".
> > >
> > > "util/header.h" provides the prototype for get_cpuid() and is needed to
> > > build perf on Powerpc.
> > >
> > > arch/powerpc/util/header.c:17:1: error: no previous prototype for
> > > ‘get_cpuid’ [-Werror=missing-prototypes]
> > >
> > > Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> > > Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> > > ---
> > > tools/perf/arch/powerpc/util/header.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
> > > index 6138bde..5111e34 100644
> > > --- a/tools/perf/arch/powerpc/util/header.c
> > > +++ b/tools/perf/arch/powerpc/util/header.c
> > > @@ -4,6 +4,7 @@
> > > #include <stdlib.h>
> > > #include <string.h>
> > > #include <linux/stringify.h>
> > > +#include "../../util/header.h"
> >
> > you could use just "header.h" right?
>
> Like this? I'm trying to find a way to do ppc cross builds, one more
> thing to have in the build-tests...
Argh, only kernel x-builds are supported on Fedora, checking if this is
the case with Debian, if this is supported there, one more Docker image
for building perf :-)
[acme@jouet linux]$ make ARCH=ppc64 CROSS_COMPILE=ppc64-linux-gnu-
O=/tmp/build/perf-ppc64/ -C tools/perf install-bin
make: Entering directory '/home/acme/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build
Auto-detecting system features:
... dwarf: [ OFF ]
... glibc: [ OFF ]
... gtk2: [ OFF ]
... libaudit: [ OFF ]
... libbfd: [ OFF ]
... libelf: [ OFF ]
... libnuma: [ OFF ]
... numa_num_possible_cpus: [ OFF ]
... libperl: [ OFF ]
... libpython: [ OFF ]
... libslang: [ OFF ]
... libcrypto: [ OFF ]
... libunwind: [ OFF ]
... libdw-dwarf-unwind: [ OFF ]
... zlib: [ OFF ]
... lzma: [ OFF ]
... get_cpuid: [ OFF ]
... bpf: [ OFF ]
config/Makefile:258: *** No gnu/libc-version.h found, please install
glibc-dev[el]. Stop.
Makefile:108: recipe for target 'install-bin' failed
make: *** [install-bin] Error 2
make: Leaving directory '/home/acme/git/linux/tools/perf'
[acme@jouet linux]$ rpm -q --qf "%{description}\n"
gcc-powerpc64-linux-gnu
Cross-build GNU C compiler.
Only building kernels is currently supported. Support for
cross-building user space programs is not currently provided as that
would massively multiply the number of packages.
[acme@jouet linux]$
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-03-28 15:50 +0200 |
| Message-ID | <rhFIl-7PN-7@gated-at.bofh.it> |
| In reply to | #1365490 |
Em Mon, Mar 28, 2016 at 10:21:45AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Mar 28, 2016 at 09:35:31AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Sun, Mar 27, 2016 at 01:19:03PM +0200, Jiri Olsa escreveu: > > > On Sat, Mar 26, 2016 at 11:01:47AM -0700, Sukadev Bhattiprolu wrote: > > > > +++ b/tools/perf/arch/powerpc/util/header.c > > > > @@ -4,6 +4,7 @@ > > > > #include <stdlib.h> > > > > #include <string.h> > > > > #include <linux/stringify.h> > > > > +#include "../../util/header.h" > > > > > > you could use just "header.h" right? > > > > Like this? I'm trying to find a way to do ppc cross builds, one more > > thing to have in the build-tests... > > Argh, only kernel x-builds are supported on Fedora, checking if this is > the case with Debian, if this is supported there, one more Docker image > for building perf :-) > > [acme@jouet linux]$ make ARCH=ppc64 CROSS_COMPILE=ppc64-linux-gnu- > O=/tmp/build/perf-ppc64/ -C tools/perf install-bin > make: Entering directory '/home/acme/git/linux/tools/perf' > BUILD: Doing 'make -j4' parallel build Ok, couldn't quickly find it on Debian, but found it for ppc64el on Ubuntu, this way I can reproduce the problem: root@df2c38ce15fe:/git/linux# make ARCH=ppc64el CROSS_COMPILE=powerpc64le-linux-gnu- -C tools/perf O=/tmp/build/perf install-bin make: Entering directory `/git/linux/tools/perf' BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ OFF ] ... glibc: [ on ] ... gtk2: [ OFF ] ... libaudit: [ OFF ] ... libbfd: [ OFF ] ... libelf: [ OFF ] ... libnuma: [ OFF ] ... numa_num_possible_cpus: [ OFF ] ... libperl: [ OFF ] ... libpython: [ OFF ] ... libslang: [ OFF ] ... libcrypto: [ OFF ] ... libunwind: [ OFF ] ... libdw-dwarf-unwind: [ OFF ] ... zlib: [ OFF ] ... lzma: [ OFF ] ... get_cpuid: [ OFF ] ... bpf: [ on ] config/Makefile:246: No libelf found, disables 'probe' tool and BPF support in 'perf record', please install elfutils-libelf-devel/libelf-dev config/Makefile:364: Disabling post unwind, no support found. config/Makefile:405: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev config/Makefile:416: No libcrypto.h found, disables jitted code injection, please install libssl-devel or libssl-dev config/Makefile:431: slang not found, disables TUI support. Please install slang-devel or libslang-dev config/Makefile:445: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev config/Makefile:473: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev config/Makefile:516: No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev config/Makefile:606: No liblzma found, disables xz kernel module decompression, please install xz-devel/liblzma-dev config/Makefile:619: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev config/Makefile:676: Your gcc lacks the __get_cpuid() builtin, disables support for auxtrace/Intel PT, please install a newer gcc CC /tmp/build/perf/arch/powerpc/util/header.o arch/powerpc/util/header.c:18:1: error: no previous prototype for 'get_cpuid' [-Werror=missing-prototypes] get_cpuid(char *buffer, size_t sz) ^ arch/powerpc/util/header.c: In function 'get_cpuid': arch/powerpc/util/header.c:25:2: error: implicit declaration of function 'scnprintf' [-Werror=implicit-function-declaration] nb = scnprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); ^ arch/powerpc/util/header.c:25:2: error: nested extern declaration of 'scnprintf' [-Werror=nested-externs] cc1: all warnings being treated as errors INSTALL binaries INSTALL tests INSTALL libexec INSTALL perf-archive INSTALL perf-with-kcore INSTALL perf_completion-script INSTALL perf-tip make: Leaving directory `/git/linux/tools/perf' root@df2c38ce15fe:/git/linux# ---------------------------------------------------------------- And test the fix: ---------------------------------------------------------------- root@df2c38ce15fe:/git/linux# make ARCH=ppc64el CROSS_COMPILE=powerpc64le-linux-gnu- -C tools/perf O=/tmp/build/perf install-bin make: Entering directory `/git/linux/tools/perf' BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ OFF ] ... glibc: [ on ] ... gtk2: [ OFF ] ... libaudit: [ OFF ] ... libbfd: [ OFF ] ... libelf: [ OFF ] ... libnuma: [ OFF ] ... numa_num_possible_cpus: [ OFF ] ... libperl: [ OFF ] ... libpython: [ OFF ] ... libslang: [ OFF ] ... libcrypto: [ OFF ] ... libunwind: [ OFF ] ... libdw-dwarf-unwind: [ OFF ] ... zlib: [ OFF ] ... lzma: [ OFF ] ... get_cpuid: [ OFF ] ... bpf: [ on ] config/Makefile:246: No libelf found, disables 'probe' tool and BPF support in 'perf record', please install elfutils-libelf-devel/libelf-dev config/Makefile:364: Disabling post unwind, no support found. config/Makefile:405: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev config/Makefile:416: No libcrypto.h found, disables jitted code injection, please install libssl-devel or libssl-dev config/Makefile:431: slang not found, disables TUI support. Please install slang-devel or libslang-dev config/Makefile:445: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev config/Makefile:473: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev config/Makefile:516: No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev config/Makefile:606: No liblzma found, disables xz kernel module decompression, please install xz-devel/liblzma-dev config/Makefile:619: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev config/Makefile:676: Your gcc lacks the __get_cpuid() builtin, disables support for auxtrace/Intel PT, please install a newer gcc CC /tmp/build/perf/arch/powerpc/util/header.o LD /tmp/build/perf/arch/powerpc/util/libperf-in.o LD /tmp/build/perf/arch/powerpc/libperf-in.o LD /tmp/build/perf/arch/libperf-in.o LD /tmp/build/perf/libperf-in.o AR /tmp/build/perf/libperf.a LINK /tmp/build/perf/perf INSTALL binaries INSTALL tests INSTALL libexec INSTALL perf-archive INSTALL perf-with-kcore INSTALL perf_completion-script INSTALL perf-tip make: Leaving directory `/git/linux/tools/perf' root@df2c38ce15fe:/git/linux# Adding this container to the set I run when testing perf csets, with this in place we'll catch such bugs sooner in the future. - Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-03-28 14:30 +0200 |
| Message-ID | <rhEsV-71c-1@gated-at.bofh.it> |
| In reply to | #1364967 |
Em Sat, Mar 26, 2016 at 11:01:47AM -0700, Sukadev Bhattiprolu escreveu:
> From 502e8236082412db1d33abfad95aaf14b539502e Mon Sep 17 00:00:00 2001
> From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Date: Sat, 26 Mar 2016 17:31:39 -0400
> Subject: [PATCH 1/1] perf tools: Fix build break on powerpc
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> 'Commit 531d2410635c ("perf tools: Do not include stringify.h from the
> kernel sources")' seems to have accidentially removed the inclusion of
> "util/header.h" from "arch/powerpc/util/header.c".
My bad, will push this via perf/urgent, after fixing what Jiri reported.
> "util/header.h" provides the prototype for get_cpuid() and is needed to
> build perf on Powerpc.
>
> arch/powerpc/util/header.c:17:1: error: no previous prototype for
> ‘get_cpuid’ [-Werror=missing-prototypes]
>
> Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> ---
> tools/perf/arch/powerpc/util/header.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
> index 6138bde..5111e34 100644
> --- a/tools/perf/arch/powerpc/util/header.c
> +++ b/tools/perf/arch/powerpc/util/header.c
> @@ -4,6 +4,7 @@
> #include <stdlib.h>
> #include <string.h>
> #include <linux/stringify.h>
> +#include "../../util/header.h"
>
> #define mfspr(rn) ({unsigned long rval; \
> asm volatile("mfspr %0," __stringify(rn) \
> --
> 1.8.3.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web