Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3622408ybl; Fri, 20 Dec 2019 12:30:39 -0800 (PST) X-Google-Smtp-Source: APXvYqzs3xTGqSzvkYrrLafOBhTd9GKZZsjty1PG2nWLsT5Xxq8Xq747iREhhjzgr0KyRH8nG8sa X-Received: by 2002:aca:3a06:: with SMTP id h6mr4679877oia.137.1576873839729; Fri, 20 Dec 2019 12:30:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576873839; cv=none; d=google.com; s=arc-20160816; b=nHP3TmjLA7KPMJK3ANP+xSvJxjoZAHiFbQQ3H9FeLioR483K2or9pWCJbLHBaTo1YZ nzSKtmPi0yB4FZTnq/LvzyzPzdGR4vW4YMaPZFVZuntV+Gudch1SrCwTSPnw7/7/bcnQ ZyV6xCyqC66sPJzxud7xKY/wQRUgIg+zQjPJcvH5zzejfu5e+zqz3NzUfV6xM6t2/JGE b6cRjyjg/kLZZw2LEZGZXZSCaaasUCnhXnU+lu77Je/SvrJTQl+WvxATwt/MDX1x52nJ 6aDIB0wUYQGlBzHQPgTk3/DxdyAlrtGuvUtaKgfgKyGMY/Beb8f3xwJlZXmckhjeKowg DW0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ALZvCGRBc2l/q2Q2l/6VTahATMuAjJCgu9dbrx9svio=; b=0esTLDilR1/6SVj0AB8GHtydjAXGQdUaeZYWtw4P0L/7GbR7R8Y3LCtZIHez11QB8S a0m1Fmg9VwyuRrqek2/QR8PNUh4kka/h//kGxXNeXr3ABWwjBInRF6gz6b2wmkX3+bDU 8xkPjTGaYwMa0vvHuA4XlmpfPLEeJeIpnP4sVFMSAedsmIlaBngnbC2hiW/FKvxw6Ye1 onU8HWEZRTqgU9ok9IiYWmJpZIzZ2jse/onOl7qwnHFjetsx+iLKmtleIS8e86rkomkr GkFXlHMAXrQMffQ/TMD6Qpp4uyijE1FS+Vzziiizhcw2CWxWYFCXu5wmRxRsV0l2xakE oLcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hlzU591v; 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 n85si5296752oig.191.2019.12.20.12.30.27; Fri, 20 Dec 2019 12:30:39 -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=hlzU591v; 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 S1727498AbfLTU3s (ORCPT + 99 others); Fri, 20 Dec 2019 15:29:48 -0500 Received: from mail-qv1-f67.google.com ([209.85.219.67]:40488 "EHLO mail-qv1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726525AbfLTU3s (ORCPT ); Fri, 20 Dec 2019 15:29:48 -0500 Received: by mail-qv1-f67.google.com with SMTP id dp13so4118814qvb.7; Fri, 20 Dec 2019 12:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ALZvCGRBc2l/q2Q2l/6VTahATMuAjJCgu9dbrx9svio=; b=hlzU591vBI0dQ5OldfwXjC4lkf6yQYUI+OpfOSPwBwodSgsqJVidpsnzPfgxiqkl0n zF/bDm3YWERMac79EU9o0yhIzqstQyyNp2z+5cH91T8PgTZV4VBr3Q+AQTdS55e6xNKK FcCOLMo26IG6GRrzS/XjF/6Sg6Eksxg4rdNrn15DjjWJqscybnLR75zNoMonNOnW1QAm ziqlRVsGc0CGnKKI4SRWg0NXU8xR6qhkkreE0tTskS25gNGCbHGnOXNZUoDj6E98ldED 5ytXg+a2qbzrCa9lbm97QnfJ26+9NO5OqD4Z6LL0LwZM/tnqre3+eFHRU27TjvIkZ803 8Kow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ALZvCGRBc2l/q2Q2l/6VTahATMuAjJCgu9dbrx9svio=; b=GhgQ/PkEewMCN8RG0l+IhxRcDsl/fULE/ZF71y2BDi44uHcQP+Y1riTm0tbEjq8M3S tiyhKJDIL4m2If6qnb+2JAnMAc6WGtqGHCHSRGPnkXEPM4eI8AMNkz/Kjd3YbVXS+Tet zeaOAylPBzz0JoZ56bBBmEDrvu0nu5tDAdMfryicLO/4UJmU1WPsYivwuf4v8YqRVJYd BN//Tt3gHbCgi8j7xLrfDmMkwNEhp8k4UOwdQExZeO3iAN1zCDu6q9/sG55GZm5v1FbV z3B4P6mUkdVTlQEUgp2VEPiJDG0/B6eTP8xY1mOXYfN1AbCb4bc5g9KkIGauX7r/jxlb Wihg== X-Gm-Message-State: APjAAAW7zBm3mRSzwgXeuX4Kpt8aWZJGL+80MOJ4wfeiQeY/g+5tU98t 37qSHRcfnW13b48n8yFemVGngN3f8+u8Ceo+EbY= X-Received: by 2002:a0c:990d:: with SMTP id h13mr13853458qvd.247.1576873787480; Fri, 20 Dec 2019 12:29:47 -0800 (PST) MIME-Version: 1.0 References: <20191220032558.3259098-1-namhyung@kernel.org> In-Reply-To: <20191220032558.3259098-1-namhyung@kernel.org> From: Andrii Nakryiko Date: Fri, 20 Dec 2019 12:29:36 -0800 Message-ID: Subject: Re: [PATCH] libbpf: Fix build on read-only filesystems To: Namhyung Kim Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , bpf , Arnaldo Carvalho de Melo , Jiri Olsa , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 19, 2019 at 7:26 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. > > Signed-off-by: Namhyung Kim > --- Overall nothing is obviously broken, except you need to fix up selftests/bpf's Makefile as well. BTW, this patch doesn't apply cleanly to latest bpf-next, so please rebase. Also subject prefix should look like [PATCH bpf-next] if it's meant to be applied against bpf-next. > tools/lib/bpf/Makefile | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > [...]