From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D2DEC5DF63 for ; Wed, 6 Nov 2019 14:00:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 082162178F for ; Wed, 6 Nov 2019 14:00:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QayAKT7m"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="uwDRkZtc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 082162178F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=67+FURp7pzbG9/tGAYbCI7CnNNuG4TE4glB9vpi6ilM=; b=QayAKT7mj8SpkR aRle5NgOFL3d2hizpIvGu7A+v0nEwCQayTO57WlI8iuAVcud9n5UfqyS/pQebsJRpH619naSrJcQz B3zdgOywvYJ6EbjO8AeH6FCoZ5jZx1JHjWGMrYzHZyHkstt3sy5ykxy6aTecq1+zVEfSL0QAXogG5 ymrTrEbpIfAY4B8pySFC3jf2T2sZliPFKR9Cf1QVCAEZwp6/LMmoB0bpWFDUayyyHcHCHQtImOVN4 t8fJF+v8Ix68pXGwvMH8ip6VZ4de9D2PxjUzjQsWKXvpEf3mmCUci9sPygib5R0B0x08KZupitJUJ qmtsY3G7U3JUwQzsoT3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSLrY-00029r-TQ; Wed, 06 Nov 2019 14:00:44 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSLrW-00029F-IP for linux-arm-kernel@bombadil.infradead.org; Wed, 06 Nov 2019 14:00:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e8GY1rXwBKcb+Lwe+YcPDTUeq1DMxubTmclRXFMT0T0=; b=uwDRkZtcnHSlTUsxuYN4iP+I1 +gmPtoMEjAlt2v8PlMNlj6GFTxxYB+wIJxgPsoQ2IUKbywS54mgPlFneltg6ZVyk7TgVJ9PcmBUTD h1Acxdm2iU0j65atb04ljscqND2hEBKHxOwfnpt2yAIj8zc2UE61CeGAQ1HLNcCuF6RsxssPx7k7R sADEJZJiFAYU3ot54Qb0tztiPZ6iU1ukHqjK4xxS8Mwlce1aGgY4MfQiA3BQnWGgkOdLLN+gEMMge wukKRAoDAZ6ufmrAM8mdMk+vTMhG8RqQ3cUo61FsjNSmzCGGBNy0TzeagirQfzS/uzJkf/ssP54Vq q4KxI1qIA==; Received: from [179.97.35.50] (helo=quaco.ghostprotocols.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSLrU-0007oL-QD; Wed, 06 Nov 2019 14:00:41 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 6A5F140B1D; Wed, 6 Nov 2019 11:00:36 -0300 (-03) Date: Wed, 6 Nov 2019 11:00:36 -0300 From: Arnaldo Carvalho de Melo To: John Garry Subject: Re: [RFC PATCH] perf tools: Fix cross compile for ARM64 Message-ID: <20191106140036.GA6259@kernel.org> References: <1573045254-39833-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1573045254-39833-1-git-send-email-john.garry@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.12.1 (2019-06-15) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, peterz@infradead.org, will@kernel.org, linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, mingo@redhat.com, namhyung@kernel.org, jolsa@redhat.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Wed, Nov 06, 2019 at 09:00:54PM +0800, John Garry escreveu: > Currently when cross compiling perf tool for ARM64 on my x86 machine I get > this error: > arch/arm64/util/sym-handling.c:9:10: fatal error: gelf.h: No such file or directory > #include > > For the build, libelf is reported off: > Auto-detecting system features: > ... > ... libelf: [ OFF ] Thanks, applied. - Arnaldo > Indeed, test-libelf is not built successfully: > more ./build/feature/test-libelf.make.output > test-libelf.c:2:10: fatal error: libelf.h: No such file or directory > #include > ^~~~~~~~~~ > compilation terminated. > > I have no such problems natively compiling on ARM64, and I did not > previously have this issue for cross compiling. Fix by relocating > the gelf.h include. > > Signed-off-by: John Garry > --- > > I marked this as RFC as I am suspicious that I have seen no other > reports, and whether fixing up the libelf.h include issue is the proper > approach. > > diff --git a/tools/perf/arch/arm64/util/sym-handling.c b/tools/perf/arch/arm64/util/sym-handling.c > index 5df788985130..8dfa3e5229f1 100644 > --- a/tools/perf/arch/arm64/util/sym-handling.c > +++ b/tools/perf/arch/arm64/util/sym-handling.c > @@ -6,9 +6,10 @@ > > #include "symbol.h" // for the elf__needs_adjust_symbols() prototype > #include > -#include > > #ifdef HAVE_LIBELF_SUPPORT > +#include > + > bool elf__needs_adjust_symbols(GElf_Ehdr ehdr) > { > return ehdr.e_type == ET_EXEC || > -- > 2.17.1 -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD203C5DF63 for ; Wed, 6 Nov 2019 14:00:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95E3E2178F for ; Wed, 6 Nov 2019 14:00:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PViz45aM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729960AbfKFOAk (ORCPT ); Wed, 6 Nov 2019 09:00:40 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:46222 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbfKFOAk (ORCPT ); Wed, 6 Nov 2019 09:00:40 -0500 Received: by mail-qk1-f194.google.com with SMTP id h15so14914007qka.13 for ; Wed, 06 Nov 2019 06:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=e8GY1rXwBKcb+Lwe+YcPDTUeq1DMxubTmclRXFMT0T0=; b=PViz45aMNMK1rfF9SBa7813o21Y/gwutBw9tMmMdUictdChdtRWKU8Gh7/XnW/bxkD bMJX3fIxJF41b50XbbdtINkEKbPPZjHUD2GunYz10ORPVF4bvnZjf0bhA8+C5WTyxsAg c4nywx/Q4cdxqvkNJmP6DuRZwd7qxO7yaaa7q85bpJ8ZlXSrbDrX+UT5b5K2NRij8JIn I26Fz3nPNtR83xiSd7bP9YbvXT1XI0D/sSxMRoxC3CiwjczD7bK5IqFFrej6zszY5/Vi L3nJSi/wg5sZg6DkRbTnObEJkotJX/weMSBKdbiY6XqOwt+qc8V4hv/RsVul62TIJ/Om Q+Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=e8GY1rXwBKcb+Lwe+YcPDTUeq1DMxubTmclRXFMT0T0=; b=XVPZ0J8bPDCf9cC9Fsh+RAsnmVkC+iZlm0xJzko7WGIjsGwbEacDiHCbTtSf8F36II tIX5oe+Wx0ejZsBsGu32RAbXRI4tT+yvLblXyAgJVbsTan0MaukraZ3/Kv4lJBJ64C9r Og9iHTqQZsfIe3cvEme9WFid4ZTXuiwGnETuzHz3IdbU/kPTQD4seH3tQqjFvCMoq7P3 MoafxesRnf5tI/g0mUwNasVy3ab5fJy6UFYwTkf/5b2riM3qQIY9s3QYCmY0GUngHKvS WF3ZDUODM8dwD5L22FAtFCoB5pd0s0vd0c4tI5Lk8aPKVffzhT8ZZLJREIsAoPeWkBHo /ZCw== X-Gm-Message-State: APjAAAXiK+cVkRRvA95YkzqJjlkVRW33eiWDXPHXhkXcTavfB/IV5aId 26XHGrnNHkbX3JBI7wnziuY= X-Google-Smtp-Source: APXvYqxHj2ckfpE0/WV/i5Zvo58qVZsKnwiS9WmeBMrPNo2oR7fqb9LJE46M3nZMzHWWXmuI5JM9Ow== X-Received: by 2002:ae9:f012:: with SMTP id l18mr2010858qkg.291.1573048838971; Wed, 06 Nov 2019 06:00:38 -0800 (PST) Received: from quaco.ghostprotocols.net ([179.97.35.50]) by smtp.gmail.com with ESMTPSA id o2sm12444965qte.79.2019.11.06.06.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 06:00:38 -0800 (PST) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 6A5F140B1D; Wed, 6 Nov 2019 11:00:36 -0300 (-03) Date: Wed, 6 Nov 2019 11:00:36 -0300 To: John Garry Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, will@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH] perf tools: Fix cross compile for ARM64 Message-ID: <20191106140036.GA6259@kernel.org> References: <1573045254-39833-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1573045254-39833-1-git-send-email-john.garry@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Nov 06, 2019 at 09:00:54PM +0800, John Garry escreveu: > Currently when cross compiling perf tool for ARM64 on my x86 machine I get > this error: > arch/arm64/util/sym-handling.c:9:10: fatal error: gelf.h: No such file or directory > #include > > For the build, libelf is reported off: > Auto-detecting system features: > ... > ... libelf: [ OFF ] Thanks, applied. - Arnaldo > Indeed, test-libelf is not built successfully: > more ./build/feature/test-libelf.make.output > test-libelf.c:2:10: fatal error: libelf.h: No such file or directory > #include > ^~~~~~~~~~ > compilation terminated. > > I have no such problems natively compiling on ARM64, and I did not > previously have this issue for cross compiling. Fix by relocating > the gelf.h include. > > Signed-off-by: John Garry > --- > > I marked this as RFC as I am suspicious that I have seen no other > reports, and whether fixing up the libelf.h include issue is the proper > approach. > > diff --git a/tools/perf/arch/arm64/util/sym-handling.c b/tools/perf/arch/arm64/util/sym-handling.c > index 5df788985130..8dfa3e5229f1 100644 > --- a/tools/perf/arch/arm64/util/sym-handling.c > +++ b/tools/perf/arch/arm64/util/sym-handling.c > @@ -6,9 +6,10 @@ > > #include "symbol.h" // for the elf__needs_adjust_symbols() prototype > #include > -#include > > #ifdef HAVE_LIBELF_SUPPORT > +#include > + > bool elf__needs_adjust_symbols(GElf_Ehdr ehdr) > { > return ehdr.e_type == ET_EXEC || > -- > 2.17.1 -- - Arnaldo