Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1385832imm; Sun, 2 Sep 2018 21:50:58 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb/iXa2D9SmndOuHFTx821klfpayu2GOGV3vKXDrqeFxP/Gmf1fLd8ARS+SsCNMc+i40XaT X-Received: by 2002:a63:4f64:: with SMTP id p36-v6mr9886251pgl.210.1535950258873; Sun, 02 Sep 2018 21:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535950258; cv=none; d=google.com; s=arc-20160816; b=YZPC05+lYNk3w7JbmGBhwHzccBbSi8mOEPYUMoEKD6dL1nnb8Ux7wTwU1CP79xIHQS DV62D9nLvDO/aeLl1aJOexKrSog/CBB1Jwkcwi2CtWMf6o2iZwbaIFQ6IOTO53wlxliT 9sjiZC+4Yb19ugdqDG+aKJumTIdGgmdNkm9w7ZICmymEr/8IHCYWQYcqB3vmG4DcxYmV VdK+7V0SMZk/MLMqV7TzVXuihy97NNK2kDlBg7uypdT8GUl9OLdClLsVzomZGEkcdOnB +AqeFvQ1VCJJuNK9DcY2lvAgSwoiz1UqRcIO055UOehJgU8kLS/zvjcVeQRKZFPQHDcR Ro8A== 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:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=RW+baRy/dlTZq43tGI5/Z5iaXT053A2ps7XgM4gRPa8=; b=oIIpaVZ15PdhWwPCC/ukGLVVN0xsYs+aUF8M6FRPeEs5LyPQTrHuNrFtkaHLIHVP3b aA/VEM9kNNYNPmyqFGQgJQLXVfLACv8g4MibcgEIvp8qx95PLmqnGWzCwTBv3H4ywEeP mZTvjj/paT4+FEQzZse5eytlrS3aTejO0+0rGeNskgN0lM6/GKVGvlF4z1ICdx41vJBG M64u9RaFHu7lqvy6c3xBQn7w6Gj4RhOI7EEzZimguW0ozd6lUeliKPG7b+pJN9R7BEeo vZOWi5Ifur5Xk6GA0GuzT1HcJFevl6dkquc5ZOD7tiNOcLxN97OFEGFHgpFlc1xOGR9+ y84A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=evd4ongI; 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 s68-v6si17613818pgc.16.2018.09.02.21.50.43; Sun, 02 Sep 2018 21:50:58 -0700 (PDT) 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=evd4ongI; 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 S1726011AbeICJIF (ORCPT + 99 others); Mon, 3 Sep 2018 05:08:05 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:55571 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbeICJIE (ORCPT ); Mon, 3 Sep 2018 05:08:04 -0400 Received: by mail-it0-f67.google.com with SMTP id d10-v6so13940606itj.5 for ; Sun, 02 Sep 2018 21:49:38 -0700 (PDT) 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 :content-transfer-encoding; bh=RW+baRy/dlTZq43tGI5/Z5iaXT053A2ps7XgM4gRPa8=; b=evd4ongIT+6dx5ApfMtzb1g3kkOItAhH38U/zUVXUptyHpOVayvlVgBpxUK7lgFEGP B52+hpTtlPwLha8Te+AQvDEfKPvW+M79LndTynXg2sVxB08D7+3+k5dB7PTcLw7lbf3c IZ7DQmTp3s8OnIIvCSDrnXbfpgWc2LR5gYK5v9jDKa8mGwqGv1Rib1bo1gv/BrlC5btL suy8QSqfO20wSBjGllGrragA+L5SCbT6ZVJPCCy7Jwzi2iVYsNA5GYrZYG7nKjOnQVM0 JmTqbHFP4oe+tPv8KKFpaVfKaCG5zdfXCPRidSAPlINhDJVYqGQA2l1aUqYkxgeXEmCK Jvow== 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:content-transfer-encoding; bh=RW+baRy/dlTZq43tGI5/Z5iaXT053A2ps7XgM4gRPa8=; b=DPKSBwlqSqUAg+B4Bmka+f7LUmy/BG/yPvlSyaaYEmfQU4HxX6+sPr0fRZdYpeECBC UgWYBFLfsZKzg6PbNikjc7/kfNEPP0E9IBTQXt6n+rbRh2m256cBPH3LxyCXO6WfOVNd 5TV3V1tR2x3NiHnhy4y0g3+79DWCKUBmcsOlVqZiLwiwa/s7FtFvH3VwXsep/eCRXOPj wQ/Ytv+8TxhELvqLaAqDFZtKvr3BvVEi0MgORqNB8hW7SrKmCTicrcgjz7wybOM+3KQZ 7PtC6vTeBHJFBhb3/IkuqDXKLBsMbqiwkgcLA/yX1xCVsyElc+AwqwIboipS0L7z47Mh +xkQ== X-Gm-Message-State: APzg51DH349DBlL2t7oBXHUTVVbEd3OGILHw+MalCJasKDefQldXGyCs LV+2x/vc7zSkqADHtO0TyNk+cOkGYgZ/nkNoyc0= X-Received: by 2002:a24:85c6:: with SMTP id r189-v6mr4311767itd.83.1535950178385; Sun, 02 Sep 2018 21:49:38 -0700 (PDT) MIME-Version: 1.0 References: <1535943028-60049-1-git-send-email-mine260309@gmail.com> In-Reply-To: <1535943028-60049-1-git-send-email-mine260309@gmail.com> From: Lei YU Date: Mon, 3 Sep 2018 12:49:26 +0800 Message-ID: Subject: Re: [PATCH v2] perf: Fix clean error To: Philippe Ombredanne , Kate Stewart , Laura Abbott , Masahiro Yamada , Thomas Gleixner , Greg Kroah-Hartman , Linux Kernel Mailing List , Joel Stanley Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just find out that da15fc2fa9c07b23db8f5e479bd8a9f0d741ca07 (introduced in v4.19-rc1) already fixes the issue by specifying -j1 on make clean. So this commit is not needed anymore, though I think it does fix the root cause. But if we do want parallel clean, we could revert that and merge this commi= t. On Mon, Sep 3, 2018 at 10:50 AM Lei YU wrote: > > When make perf with -O, it gets error when make clean with below log: > > $ make -C tools/perf O=3D # OK > $ make -C tools/perf O=3D clean # Got below error > > find: cannot delete =E2=80=98/builtin-script.o=E2=80=99: = No such file or directory > find: cannot delete =E2=80=98/.subcmd-config.o.cmd=E2=80= =99: No such file or directory > ... > Makefile:38: recipe for target 'clean' failed > make[2]: *** [clean] Error 1 > make[1]: *** [fixdep-clean] Error 2 > Makefile:90: recipe for target 'clean' failed > make: *** [clean] Error 2 > > It happens because both fixdep-clean and libsubcmd-clean will delete > files by `find`, where libsubcmd-clean uses `| xargs $(RM)` and > fixdep-clean uses `-delete`. > When a file is find by fixdep-clean, and tries to delete it, it's found > that the file does not exist because it is deleted by libsubcmd-clean. > > This commit changes the delete method of fixdep-clean to use > `| xargs $(RM)` as well, where RM is defined as `rm -f` so it does not > return error when file does not exist. > > Signed-off-by: Lei YU > > --- > v2: Fix missing "make clean" in commit message > --- > tools/build/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/build/Makefile b/tools/build/Makefile > index 5edf65e..ae38db2 100644 > --- a/tools/build/Makefile > +++ b/tools/build/Makefile > @@ -18,6 +18,7 @@ $(call allow-override,LD,$(CROSS_COMPILE)ld) > HOSTCC ?=3D gcc > HOSTLD ?=3D ld > HOSTAR ?=3D ar > +RM =3D rm -f > > export HOSTCC HOSTLD HOSTAR > > @@ -36,7 +37,7 @@ all: $(OUTPUT)fixdep > > clean: > $(call QUIET_CLEAN, fixdep) > - $(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name= '\.*.cmd' -delete -o -name '\.*.d' -delete > + $(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -o -name '\.*.cm= d' -o -name '\.*.d' | xargs $(RM) > $(Q)rm -f $(OUTPUT)fixdep > > $(OUTPUT)fixdep-in.o: FORCE > -- > 2.7.4 >