* [PATCH] perf jit: Fix build issue on Ubuntu
@ 2016-10-13 2:20 Anton Blanchard
2016-10-13 7:41 ` Stephane Eranian
2016-10-17 14:53 ` [tip:perf/urgent] " tip-bot for Anton Blanchard
0 siblings, 2 replies; 3+ messages in thread
From: Anton Blanchard @ 2016-10-13 2:20 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Alexander Shishkin, Stephane Eranian
Cc: linux-kernel
From: Anton Blanchard <anton@samba.org>
When building on Ubuntu 16.04, I get the following error:
Makefile:49: *** the openjdk development package appears to me missing, install and try again. Stop.
The problem is that update-java-alternatives has multiple spaces between
fields, and cut treats each space as a new delimiter:
java-1.8.0-openjdk-ppc64el 1081 /usr/lib/jvm/java-1.8.0-openjdk-ppc64el
Fix this by using awk, which handles this fine.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
tools/perf/jvmti/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/jvmti/Makefile b/tools/perf/jvmti/Makefile
index 5ce61a1..df14e6b 100644
--- a/tools/perf/jvmti/Makefile
+++ b/tools/perf/jvmti/Makefile
@@ -36,7 +36,7 @@ SOLIBEXT=so
# The following works at least on fedora 23, you may need the next
# line for other distros.
ifneq (,$(wildcard /usr/sbin/update-java-alternatives))
-JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d ' ' -f 3)
+JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}')
else
ifneq (,$(wildcard /usr/sbin/alternatives))
JDIR=$(shell alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g')
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf jit: Fix build issue on Ubuntu
2016-10-13 2:20 [PATCH] perf jit: Fix build issue on Ubuntu Anton Blanchard
@ 2016-10-13 7:41 ` Stephane Eranian
2016-10-17 14:53 ` [tip:perf/urgent] " tip-bot for Anton Blanchard
1 sibling, 0 replies; 3+ messages in thread
From: Stephane Eranian @ 2016-10-13 7:41 UTC (permalink / raw)
To: Anton Blanchard
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Alexander Shishkin, LKML
On Wed, Oct 12, 2016 at 7:20 PM, Anton Blanchard <anton@ozlabs.org> wrote:
>
> From: Anton Blanchard <anton@samba.org>
>
> When building on Ubuntu 16.04, I get the following error:
>
> Makefile:49: *** the openjdk development package appears to me missing, install and try again. Stop.
>
> The problem is that update-java-alternatives has multiple spaces between
> fields, and cut treats each space as a new delimiter:
>
> java-1.8.0-openjdk-ppc64el 1081 /usr/lib/jvm/java-1.8.0-openjdk-ppc64el
>
> Fix this by using awk, which handles this fine.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
Works for me. Thanks.
Reviewed-by: Stephane Eranian <eranian@google.com>
>
> ---
> tools/perf/jvmti/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/jvmti/Makefile b/tools/perf/jvmti/Makefile
> index 5ce61a1..df14e6b 100644
> --- a/tools/perf/jvmti/Makefile
> +++ b/tools/perf/jvmti/Makefile
> @@ -36,7 +36,7 @@ SOLIBEXT=so
> # The following works at least on fedora 23, you may need the next
> # line for other distros.
> ifneq (,$(wildcard /usr/sbin/update-java-alternatives))
> -JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d ' ' -f 3)
> +JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}')
> else
> ifneq (,$(wildcard /usr/sbin/alternatives))
> JDIR=$(shell alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g')
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/urgent] perf jit: Fix build issue on Ubuntu
2016-10-13 2:20 [PATCH] perf jit: Fix build issue on Ubuntu Anton Blanchard
2016-10-13 7:41 ` Stephane Eranian
@ 2016-10-17 14:53 ` tip-bot for Anton Blanchard
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Anton Blanchard @ 2016-10-17 14:53 UTC (permalink / raw)
To: linux-tip-commits
Cc: peterz, tglx, acme, mingo, hpa, eranian, anton, linux-kernel,
alexander.shishkin
Commit-ID: 53613e005496234bb684e5db551fbcededa73999
Gitweb: http://git.kernel.org/tip/53613e005496234bb684e5db551fbcededa73999
Author: Anton Blanchard <anton@samba.org>
AuthorDate: Thu, 13 Oct 2016 13:20:43 +1100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 17 Oct 2016 11:25:34 -0300
perf jit: Fix build issue on Ubuntu
When building on Ubuntu 16.04, I get the following error:
Makefile:49: *** the openjdk development package appears to me missing, install and try again. Stop.
The problem is that update-java-alternatives has multiple spaces between
fields, and cut treats each space as a new delimiter:
java-1.8.0-openjdk-ppc64el 1081 /usr/lib/jvm/java-1.8.0-openjdk-ppc64el
Fix this by using awk, which handles this fine.
Signed-off-by: Anton Blanchard <anton@samba.org>
Reviewed-by: Stephane Eranian <eranian@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1476325243-15788-1-git-send-email-anton@ozlabs.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/jvmti/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/jvmti/Makefile b/tools/perf/jvmti/Makefile
index 5ce61a1..df14e6b 100644
--- a/tools/perf/jvmti/Makefile
+++ b/tools/perf/jvmti/Makefile
@@ -36,7 +36,7 @@ SOLIBEXT=so
# The following works at least on fedora 23, you may need the next
# line for other distros.
ifneq (,$(wildcard /usr/sbin/update-java-alternatives))
-JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d ' ' -f 3)
+JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}')
else
ifneq (,$(wildcard /usr/sbin/alternatives))
JDIR=$(shell alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g')
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-17 14:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-13 2:20 [PATCH] perf jit: Fix build issue on Ubuntu Anton Blanchard
2016-10-13 7:41 ` Stephane Eranian
2016-10-17 14:53 ` [tip:perf/urgent] " tip-bot for Anton Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome