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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22D57C433F5 for ; Sun, 7 Nov 2021 00:21:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 036BC610FD for ; Sun, 7 Nov 2021 00:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233412AbhKGAYL (ORCPT ); Sat, 6 Nov 2021 20:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231869AbhKGAYI (ORCPT ); Sat, 6 Nov 2021 20:24:08 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81456C061570 for ; Sat, 6 Nov 2021 17:21:26 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id n29so8251677wra.11 for ; Sat, 06 Nov 2021 17:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=si5tlyn6HjXs/k2N6uFM1eCM7PYGPBsMizUHEFvUaTA=; b=S0RjQ23foC6IYzsZDlw+lK8l00W9mxKm+R635i1iCUBTIpIUbJwCrIGfT5JS7d/GX+ 1IbNy7RZT87Uq2uS/lmB66/uxowtaFIQbePZ/h5sB9mGemv2jgOd361tM+pu7QAX3TLX Thk+VZUQKE0zvEE8GrHcc6wvI68sTqzu/Xl/36PRUklAFcvnz7TslNtmFjn7HpeA+RuU RtJx5z6La8yxz/FSOGd+J1Nlc30bW3FMMp5Wp8UIyreUfIU9RFVv5YiZJN4J5G7nmjMJ isizlRjHMQKDZ/EUihY+m6fsAmqsgRU+QNWYYg/lqp9T4A9tKi2AscfL5gvkZwdtdpbz cgyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=si5tlyn6HjXs/k2N6uFM1eCM7PYGPBsMizUHEFvUaTA=; b=GvXeVbVo3gsxckVskvRxpGJ4jCY7H/tZX5SsNBrd7TGkieLXCHzrLPjMUN4lhMUyeM Z1uy4CDJe58iB4bf25JlFJePHhCRU1I7pNNA+CVOMPoVs65w3cFNm4hDpLZ2MNEp9ri4 d2HUWdLEEDHWyFfYrPiP4THdVrkJjmmMjDeGXgkyuVQJrSM3+CxtzqzZUEPOZj113uxA hiLEB1X0aIMdu4EseRbD1h/3xEYMw90Kc0c7/M/GMmM7R7X/V8GGp4VNtIZDLlLA0WJ/ DAeBc0SldY8PPY+fPe81UTJS7q0KHuIjIxTPqgUcqtC0/xZNxpsDcMufB8/YFxiiihpt P7iw== X-Gm-Message-State: AOAM5325kXmrjzg0EpKQwyi8PNEP3jpqrGQX75MT5WdBzEse76rvgYXi +YMppXpT59hNFycrcSRwrt4kkA== X-Google-Smtp-Source: ABdhPJw0BPZlS9F5R6uB1wvtU2kjB0wbgQMfPuogrmeglxKThlY1fHRZcYgV0FvfCa8lUw8tUPF+rw== X-Received: by 2002:adf:fe8e:: with SMTP id l14mr50633476wrr.177.1636244485013; Sat, 06 Nov 2021 17:21:25 -0700 (PDT) Received: from [192.168.1.11] ([149.86.67.25]) by smtp.gmail.com with ESMTPSA id o9sm11979624wrs.4.2021.11.06.17.21.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Nov 2021 17:21:24 -0700 (PDT) Message-ID: <813cc0db-51d0-65b3-70f4-f1a823b0d029@isovalent.com> Date: Sun, 7 Nov 2021 00:21:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [BUG] Re: [PATCH bpf-next] perf build: Install libbpf headers locally when building Content-Language: en-GB To: Arnaldo Carvalho de Melo Cc: Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Networking , bpf , Song Liu , Jiri Olsa , Namhyung Kim , Linux Kernel Mailing List References: <20211105020244.6869-1-quentin@isovalent.com> From: Quentin Monnet In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2021-11-06 18:20 UTC-0300 ~ Arnaldo Carvalho de Melo > Em Sat, Nov 06, 2021 at 06:05:07PM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Sat, Nov 06, 2021 at 05:12:48PM -0300, Arnaldo Carvalho de Melo escreveu: >>> Em Sat, Nov 06, 2021 at 04:29:16PM -0300, Arnaldo Carvalho de Melo escreveu: >>>> Em Fri, Nov 05, 2021 at 11:38:50AM -0700, Andrii Nakryiko escreveu: >>>>> On Thu, Nov 4, 2021 at 7:02 PM Quentin Monnet wrote: >>>>>> >>>>>> API headers from libbpf should not be accessed directly from the >>>>>> library's source directory. Instead, they should be exported with "make >>>>>> install_headers". Let's adjust perf's Makefile to install those headers >>>>>> locally when building libbpf. >>>>>> >>>>>> Signed-off-by: Quentin Monnet >>>>>> --- >>>>>> Note: Sending to bpf-next because it's directly related to libbpf, and >>>>>> to similar patches merged through bpf-next, but maybe Arnaldo prefers to >>>>>> take it? >>>>> >>>>> Arnaldo would know better how to thoroughly test it, so I'd prefer to >>>>> route this through perf tree. Any objections, Arnaldo? >>>> >>>> Preliminary testing passed for 'BUILD_BPF_SKEL=1' with without >>>> LIBBPF_DYNAMIC=1 (using the system's libbpf-devel to build perf), so far >>>> so good, so I tentatively applied it, will see with the full set of >>>> containers. >>> >>> Because all the preliminary tests used O= to have that OUTPUT variable >>> set, when we do simply: >>> >>> make -C tools/perf >> >> So I'll have to remove it now as my container builds test both O= and >> in-place builds (make -C tools/perf), I know many people (Jiri for >> instance) don't use O=. >> >> I tried to fix this but run out of time today, visits arriving soon, so >> I'll try to come back to this tomorrow early morning, to push what I >> have in to Linus, that is blocked by this now :-\ > > What I have, with your patch, is at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tmp.perf/core > > It has both patches, as its needed for the BUILD_BPF_SKEL=1 mode to > build correctly with/without LIBBPF_DYNAMIC=1. Hi Arnaldo, thanks for the review and testing. Apologies, I missed that the recipe for the $(LIBBPF_OUTPUT) directory was located under the "ifdef BUILD_BPF_SKEL". I'm sending a v2 that will handle this case better. Quentin