Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6072337ybl; Sun, 22 Dec 2019 22:36:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxgUaq+RFX8cAl1N729O4PjJiOoAccvZkMA+7k/qoIv04tGehrEI0zpylsci6kCRo4FDDq2 X-Received: by 2002:a9d:222f:: with SMTP id o44mr18055371ota.51.1577083014304; Sun, 22 Dec 2019 22:36:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577083014; cv=none; d=google.com; s=arc-20160816; b=jIT0c7mbBXhPBrZJtole/VpcoYHDom24AGZNyk2myzvZZEscHZjMQywnU1mbD9RqZ2 0CSL62tqgUGZcYdosNCD/lB7BI2Eh31RxJtxql1LS1YaP/wFRB1vAQy4E0cKz9D76a2d YdD5z8pDhB587WaNrNstPq2R+HpHd4d0JlNmzXlkI4IXkZhoXs4xMoiXakzs3faNX1Ew j4uCP5C6+F/6Vi5JFcBafUzYr+cjB5yUxaGsZDph3Num70mcXUgt9xRJGQlpGWhkXSiM +mTYTRmhC7n+/j+UkUWKcOYPpryYazTLQkZFumiMMrRxUWIhwx7oMEBwh6y0mLopQAq/ byig== 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=0DzjFSTk4GUARqFpDM4bTgDw2bbAI+/uJbZ7VnbMQBM=; b=xnCEFH/Cig8x6UwnDYG9SPJ5qHNRI7qtZqtd4ijNhJoBgoqoqUkakEd3pPb4snGTtY bPQxuWoM9P5M7laYTIqmV5TxvMk4BnlhEbP1cYEOrrKMXkOLMcUbNOOKOdA8HnEtezl9 +rwRahlI5XoCJcTjAFiT7FZb5/u16gPJ6RfklBuR+GE0/WcirWVxDVb1b9z0G4aN1r3c 997EjHu+ZbvyEsQxAX14ZyFVprwKhLUqLz1+99fbRPM5iGrUz0LIK2+06wZsNYEvyu9O neucRyEILmEmqhiMbqRovxdb/S7H+m+6NMjjKy+WGJt4f0/rtTtS2o/IvdoqmlhqDdNI 6+tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k9SUps3b; 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 s126si9291184oib.84.2019.12.22.22.36.41; Sun, 22 Dec 2019 22:36:54 -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=k9SUps3b; 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 S1726096AbfLWGgA (ORCPT + 99 others); Mon, 23 Dec 2019 01:36:00 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:40646 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbfLWGgA (ORCPT ); Mon, 23 Dec 2019 01:36:00 -0500 Received: by mail-qk1-f194.google.com with SMTP id c17so12781493qkg.7; Sun, 22 Dec 2019 22:35:59 -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=0DzjFSTk4GUARqFpDM4bTgDw2bbAI+/uJbZ7VnbMQBM=; b=k9SUps3bztjSi0wnFJmvXha09GFyi7e/mLC2GiTwovXmG3H8TZn49UpjMv4QPBsmYM v4Aw/1e2M00sEQwIQA00KtPxxwhD5mFNbisb/6cfhtxL5PmbwbWNqLv5P4Wzs2Rnmd4Q 79jJV316crdBAsLkoons6YqYHwgXPteVrP6HjpwmlKPRW7fc1kVVJ80b6wDu5ijXk3r1 Uzkj3Ju15esmX7j4q8CpYupcHO7LlYyrbfiiQeybklpjUJVO2LpNQbeD7b9LAQO1g5PI qJLLAu1tWyo18Z7RrT82q+v8dfDf8f/KUdI2GkgU9hNwpAinQpdYcsNrqFtRt6bRBwfL F+Qg== 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=0DzjFSTk4GUARqFpDM4bTgDw2bbAI+/uJbZ7VnbMQBM=; b=VRAMhfmwxbytMK69Yx1haUyymPbNxq75v559MhTNtyzgNPR8dTidSo9rD8/sl80WLA Mu6iL3H0oxjgJvLdl7Ro/gGN+0RK1X2ZrRN1KE609/mdiCk8zIjLRB0URUdvrp6QN5b+ dsLDgzI7Bu6g2Tw2QpH12sCcfeIhVTencBoLgKwWLn8XRWojpg+byRSoStAMmHDmBhWp mtvNGgugHIrIW7rgiZd4NeperrBpkUefg7TRWHoDdoUNvAapq4oEDuVQ8V1XEWNlykcq pb99I2wrvWLnm+Hs4pxs70eqGaGPBMjv+pNpgJ4GgcOhFNJFv88Vha9JHajKOTF5SAAW +JGg== X-Gm-Message-State: APjAAAVC/KFzqR9fPqUfSObJHvzbIqKvznYRQc+9N6iLGYJaDgb504Fm rAusfD05sWjTjFG0t3nR13vQzrqhSsJdWEh9Os0hvKy+ X-Received: by 2002:a37:e408:: with SMTP id y8mr24666444qkf.39.1577082558207; Sun, 22 Dec 2019 22:29:18 -0800 (PST) MIME-Version: 1.0 References: <20191223061326.843366-1-namhyung@kernel.org> In-Reply-To: <20191223061326.843366-1-namhyung@kernel.org> From: Andrii Nakryiko Date: Sun, 22 Dec 2019 22:29:07 -0800 Message-ID: Subject: Re: [PATCH bpf v3] libbpf: Fix build on read-only filesystems To: Namhyung Kim Cc: Alexei Starovoitov , Daniel Borkmann , 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 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 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! [...]