Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6485229ybl; Mon, 23 Dec 2019 06:40:40 -0800 (PST) X-Google-Smtp-Source: APXvYqzqUkT5C3erFCHkLjK8FfrkvqVCDLIpqB13/SVVEU4uNV2VJQq/rAyS4Xj1kEcEYbN7cCTS X-Received: by 2002:aca:31c8:: with SMTP id x191mr5713674oix.25.1577112040237; Mon, 23 Dec 2019 06:40:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577112040; cv=none; d=google.com; s=arc-20160816; b=Be49S5DKHlZ5XdpCCkA/oQEY1aPI9SqFJTvMGPBRf8Tby0HvJBRVSqZ+/tKrWXmK6H 4SDcHEoYRXf8XqnwVwQk0Asccuao/xU9vDui/U3kw5ftcLx7B1jf/uYQgY6ChRX9Fa/v pxavB1llHkz5JOkKkVn4ObKswhVtp4pk1ZNDhAlfnRpUXq82TeTzCnhGyFIYrodxnuCw msat/I+6ZmewyZPvXqwDlchEiicPbucsxbOyg9JiBA2CeEHmJm04it+20NDy47zMfwuv XmvuhC/P91Q85hqEovMd5S3WIf5BLL5R6pRyClAbU1JNVUwU4a7lO3GNNIeDWByieKBe 51kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=7qBSrI5umgui3z9iL3dzCimD/+DpOYzDa+bPgz5mGxQ=; b=JKJzGtvvfjEuSxHOsxTvCsPfZTIjtnnJda6ls3Zw2UqZw37uT0JNJU5hIFf8uPbzRw vMCDAQIyRXWwM4xz7QVBFOVB4zjzl4dxpAirSQCBGz+pDIMzgiBlGCj1BnOBNiENOIbD AdxQL/v8IDSfTPyW58OiY84jblC/+SCYubo0FuDKHVU5IpBhyd7qsei4weiP888rtsjF zYIRQFNmSmeg1CEZjFVruEqETaxOBOygGaT28K/lFbYkVKpkDqysmhqQvGHk4ceWkHVe pHrpEOPVhC3bfj/En4Bd2m3etZcJ/LP4y2D77k1f+ZjPQkRDhWVEHgMTBw5kWnFUHzJp J97A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si4824631oiw.55.2019.12.23.06.40.27; Mon, 23 Dec 2019 06:40:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726889AbfLWOjt (ORCPT + 99 others); Mon, 23 Dec 2019 09:39:49 -0500 Received: from www62.your-server.de ([213.133.104.62]:41776 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbfLWOjs (ORCPT ); Mon, 23 Dec 2019 09:39:48 -0500 Received: from sslproxy02.your-server.de ([78.47.166.47]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1ijOs2-0006DU-Ro; Mon, 23 Dec 2019 15:39:42 +0100 Received: from [185.105.41.126] (helo=linux-9.fritz.box) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ijOs2-000Dco-CN; Mon, 23 Dec 2019 15:39:42 +0100 Subject: Re: [PATCH bpf v3] libbpf: Fix build on read-only filesystems To: Andrii Nakryiko , Namhyung Kim Cc: Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , bpf , Arnaldo Carvalho de Melo , Jiri Olsa , LKML , Shuah Khan , "open list:KERNEL SELFTEST FRAMEWORK" , Networking , linux-perf-users@vger.kernel.org References: <20191223061326.843366-1-namhyung@kernel.org> From: Daniel Borkmann Message-ID: <2d6767c6-ff4c-8f88-f186-23cddbb4969a@iogearbox.net> Date: Mon, 23 Dec 2019 15:39:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25672/Mon Dec 23 10:53:10 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/23/19 7:29 AM, Andrii Nakryiko wrote: > On Sun, Dec 22, 2019 at 10:14 PM Namhyung Kim wrote: >> >> I got the following error when I tried to build perf on a read-only >> filesystem with O=dir option. >> >> $ cd /some/where/ro/linux/tools/perf >> $ make O=$HOME/build/perf >> ... >> CC /home/namhyung/build/perf/lib.o >> /bin/sh: bpf_helper_defs.h: Read-only file system >> make[3]: *** [Makefile:184: bpf_helper_defs.h] Error 1 >> make[2]: *** [Makefile.perf:778: /home/namhyung/build/perf/libbpf.a] Error 2 >> make[2]: *** Waiting for unfinished jobs.... >> LD /home/namhyung/build/perf/libperf-in.o >> AR /home/namhyung/build/perf/libperf.a >> PERF_VERSION = 5.4.0 >> make[1]: *** [Makefile.perf:225: sub-make] Error 2 >> make: *** [Makefile:70: all] Error 2 >> >> It was becaused bpf_helper_defs.h was generated in current directory. >> Move it to OUTPUT directory. >> >> Tested-by: Andrii Nakryiko >> Acked-by: Andrii Nakryiko >> Signed-off-by: Namhyung Kim >> --- >> tools/lib/bpf/Makefile | 15 ++++++++------- >> tools/testing/selftests/bpf/.gitignore | 1 + >> tools/testing/selftests/bpf/Makefile | 6 +++--- >> 3 files changed, 12 insertions(+), 10 deletions(-) >> > > [...] > >> diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore >> index 419652458da4..1ff0a9f49c01 100644 >> --- a/tools/testing/selftests/bpf/.gitignore >> +++ b/tools/testing/selftests/bpf/.gitignore >> @@ -40,3 +40,4 @@ xdping >> test_cpp >> /no_alu32 >> /bpf_gcc >> +bpf_helper_defs.h > > looks good, thanks! Applied, thanks!