Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbcJMHnI (ORCPT ); Thu, 13 Oct 2016 03:43:08 -0400 Received: from mail-yb0-f178.google.com ([209.85.213.178]:36219 "EHLO mail-yb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbcJMHnB (ORCPT ); Thu, 13 Oct 2016 03:43:01 -0400 MIME-Version: 1.0 In-Reply-To: <1476325243-15788-1-git-send-email-anton@ozlabs.org> References: <1476325243-15788-1-git-send-email-anton@ozlabs.org> From: Stephane Eranian Date: Thu, 13 Oct 2016 00:41:05 -0700 Message-ID: Subject: Re: [PATCH] perf jit: Fix build issue on Ubuntu To: Anton Blanchard Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1484 Lines: 41 On Wed, Oct 12, 2016 at 7:20 PM, Anton Blanchard wrote: > > From: Anton Blanchard > > 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 Works for me. Thanks. Reviewed-by: Stephane Eranian > > --- > 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 >