Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp620758ybx; Wed, 6 Nov 2019 06:01:53 -0800 (PST) X-Google-Smtp-Source: APXvYqztqp2ucihd42jtR9x0TK2Pc4ajJ/04awpixsAYk7jIfZysYhFBeBGQoXlCZ07qCLEmYOCn X-Received: by 2002:a50:e60d:: with SMTP id y13mr2776521edm.199.1573048913099; Wed, 06 Nov 2019 06:01:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573048913; cv=none; d=google.com; s=arc-20160816; b=xSAmLp1944PiEaeX139Z/cBQkRqOqCsUEk99OjuBTE2VfxiSiPbmDdVvyEVL2TVKNM EAF6onztDUUD0NCKIvmUrJiFb4WZYxPVIiEumaa5LiIvjpmuBZEei3ia6nMIwifHE2Qy vhibujzSoMC0VyW777ki/CVL5GJ4SsBRloyLGikawznHbXBh9tmiD9k5kteu3otl1MFk fXHStWlhvKT4pBs2VZ4c6oSHh2RLOeClTP9bpS/tMky6e+gK+1DmFtFS7V2qX+Eq7M+H wG3S//2oq7OKIvQ/LAX68Vfnd9oGwo+HW5hZLQzwKpr5JmmVomou2KtwjRwdw+bNNMwn up5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=e8GY1rXwBKcb+Lwe+YcPDTUeq1DMxubTmclRXFMT0T0=; b=k4q9bzo1GEhfJJKlYvhuyJIV4m/OSROsTXFJKwK7D6fSrrC+X7eShyNmI9u5FhXrfn TiE1u4W90W2MNpTSXLpKGxD7iGvmhmUYq+76RUtOwYaV07IrO+7wI/PCNaJ+F+4QHrrn xDesDqtvVizS2VWP8jAViTCcDBNZqHPM7gW6O4jiQ9mA+8skf8b3fEyvzAYmeGHMljlQ Om6tAJsJQ5AVP2nRHV3dsRJyw+XX3aYSgOp6yPWSTroh2tUCT05fR9xadRZL2EKUnxT0 ppkZ9Ss6N5dflLypRpfh7B7U9iRgl0qQpMMX38nqmxrw/Dl2hKpf2s6C3zN/kOZ2nZGK 8OOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PViz45aM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l11si7697385ejq.208.2019.11.06.06.01.26; Wed, 06 Nov 2019 06:01:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PViz45aM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727447AbfKFOAk (ORCPT + 99 others); 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-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