Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6040883ybl; Sun, 22 Dec 2019 21:46:31 -0800 (PST) X-Google-Smtp-Source: APXvYqzUOBNGpWEAbzIDQtmz4cNdVhO5FtUI2a5fui/Hx5goDOiKq/SJcnl3abZe4VNeUw0h4cb+ X-Received: by 2002:a9d:3e16:: with SMTP id a22mr30325307otd.259.1577079991261; Sun, 22 Dec 2019 21:46:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577079991; cv=none; d=google.com; s=arc-20160816; b=Qonxuuacj0PjsurL+FZf1b5PPkL8UuYNXSy6HwH7NP4/fqDnamQ9LDn70t4bwzqiMT CWCCd0DanQe5Oh/QUoB55IdRgYRFsCeAiSOlRU44Ao3rSfceHOwLr8y0fIXVT/FZYPvb 6SYlEO65/fDQ7vzWPxe4/B/5k4ZQHsUK9Vc3KdeQPyOuv4ylCKWEBtES5zxealjYibwZ ZopkgmPNCg4PMBjVHie5qcBsFayN1S1u/1VnKfj2lw2G0ThgypdslLTXyRZhDpaDUfTn sEjUp8ha4llgf6EiQ0WPuUW60+74pEj7TPPs7HO1EiB0T+T6Ohgo95ojNtrFz9xjz72O T+bA== 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=14r7Jxv6ILUGdSVz71xwC9kfft75l4E8nJpVYH9WWxY=; b=oM74LkYcPIP9wf9C0F9phnEHwBZ9UQlDdBBAsIT74GgFKv0CT3qftjibx1dIHeF8Rb yIMhfcB/lTkyik4DKM4PmI1v4yF9PsjTlBYWtbmsIotx53IrO7adqD07WsTHg9o+cQ2a lQKS4/koQHjmnpvbMkYADnUbVscdOsUnzf/Vq1e8dish1QiWrRgnJxWOPA2PKsrJbWJd pjSqUNWC3fnHnpiIvQVIDaTHvx56x+K3+M5nAwVI1N5RazwUCE/P/Bb9Qptxpy/3z+/j EwCPzZs+DVUnr6u9Q9USlXPkqEcX52g84aLOgaMJ9persHgR7qmVH33GkH03OY0PO2Ht gmhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=thXcged9; 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 o187si8968133oig.107.2019.12.22.21.46.19; Sun, 22 Dec 2019 21:46:31 -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=thXcged9; 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 S1726007AbfLWFpm (ORCPT + 99 others); Mon, 23 Dec 2019 00:45:42 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:45929 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725822AbfLWFpm (ORCPT ); Mon, 23 Dec 2019 00:45:42 -0500 Received: by mail-qt1-f193.google.com with SMTP id l12so14486847qtq.12; Sun, 22 Dec 2019 21:45:41 -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=14r7Jxv6ILUGdSVz71xwC9kfft75l4E8nJpVYH9WWxY=; b=thXcged9wpzyNLdEezN6APmldUIlcRCNCGUSymSV8otBk2BGTYwQErN8YLse95uzYg s7mJJE3P8vraOtSpyaq9JooUQ3XWtI5cOWzwjHnVamWRyvqPxObuHYaujDnNrzrHRHSN BbsazzCsd50bAaSDuawk58uuzu9YNPAl3DkUVKC3KgT7u4X+xkQ58apLnTrq5w1PyulD dJ3frOdqI+tq2gz3OxssF+xecN91WoTnu1EiZFUQTdDJkmUfJW0YjAZObLTh8Qa4uVye JIFwszmSNRtihloTOJOB/wFtKoM0k1DO7Nh4j7FRy6ak+XeQVo8Pvg/oMou8IYYNP0j2 4A2g== 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=14r7Jxv6ILUGdSVz71xwC9kfft75l4E8nJpVYH9WWxY=; b=TG9/bMMdY683QOy/V5eNEhwUYcZrG4gCVvKjabCSi1ZMc3ydz+O15F0GVEo2sTqqyq yIIB7pp0Mr/ZDWJhXpYpstSqD6X3E6YI+sdtrA/zehCXWNXRr3zh3RVxQhfJcnR61L/E og/RMIOWDwKkMt4xePBl4x0SAq0EUbqJ2yrGEHtizhrEJqhzTlCcxz2r+CEQi8rKKaGy Y6aTLQAgQVWeh4ape1cmIsLHMR6ItoKWLZ4g7nL7A5GhkdzALVhbHbUX+3sethiLN4kI nQMgcQJBMrNJwOvlIzcyTy1ni/amSOx/IhG5XKPo2ph4wfuvQjO9p7G6HCN+bORuG4zB 3AAQ== X-Gm-Message-State: APjAAAUH1glcZ1abjW/x6DyBZlOSg0RrZkxpZCoSwhGe16YIFJG2TNto yMyXpAzML9Hwti1Kq3vdSFkjEd0AxiY5f6UgsUg= X-Received: by 2002:ac8:4050:: with SMTP id j16mr21075945qtl.171.1577079941253; Sun, 22 Dec 2019 21:45:41 -0800 (PST) MIME-Version: 1.0 References: <20191221162158.rw6xqqktubozg6fg@ast-mbp.dhcp.thefacebook.com> <20191223030530.725937-1-namhyung@kernel.org> In-Reply-To: <20191223030530.725937-1-namhyung@kernel.org> From: Andrii Nakryiko Date: Sun, 22 Dec 2019 21:45:30 -0800 Message-ID: Subject: Re: [PATCH bpf] 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 , 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 7:05 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 > --- Looks good, thanks! Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko > tools/lib/bpf/Makefile | 15 ++++++++------- > tools/testing/selftests/bpf/Makefile | 6 +++--- > 2 files changed, 11 insertions(+), 10 deletions(-) > [...]