From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cantor2.suse.de ([195.135.220.15]:49227 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751741Ab3IROvV (ORCPT ); Wed, 18 Sep 2013 10:51:21 -0400 Date: Wed, 18 Sep 2013 16:51:17 +0200 From: David Sterba To: rongqing.li@windriver.com Cc: linux-btrfs@vger.kernel.org, sandeen@redhat.com Subject: Re: [PATCH] btrfs-progs: Add dependencies explicitly to fix a parallel build issue Message-ID: <20130918145117.GC6810@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <1379466661-27973-1-git-send-email-rongqing.li@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1379466661-27973-1-git-send-email-rongqing.li@windriver.com> Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Wed, Sep 18, 2013 at 09:11:01AM +0800, rongqing.li@windriver.com wrote: > From: Roy Li > > The dependencies of "all: version.h" or other similar ones can not > fix the parallel build failure, only reduce the times; In fact, > many *.o files require version.h file. > > #grep '#include "version.h"' ./ -r > ./btrfs-corrupt-block.c:#include "version.h" > ./btrfs.c:#include "version.h" > ./btrfs-image.c:#include "version.h" > ./cmds-filesystem.c:#include "version.h" > ./btrfs-show-super.c:#include "version.h" > ./btrfs-select-super.c:#include "version.h" > ./cmds-restore.c:#include "version.h" > ./btrfs-find-root.c:#include "version.h" > ./mkfs.c:#include "version.h" > ./btrfs-zero-log.c:#include "version.h" > ./btrfs-defrag.c:#include "version.h" > ./cmds-chunk.c:#include "version.h" > ./btrfstune.c:#include "version.h" > ./btrfs-calc-size.c:#include "version.h" > ./btrfs-map-logical.c:#include "version.h" > ./cmds-check.c:#include "version.h" > ./btrfs-debug-tree.c:#include "version.h" > > Signed-off-by: Roy Li > --- > Sorry, The patch [btrfs-progs: fix parallel build] sent by me on Sep 3 > can not fix the build failure, when build enough times on a 16 core cpu, > the build failure happens again, so I refix it again. I'm running make -j all the time but haven't seen the build fail due to missing version.h for a long time. With this patch or the previous one or with Eric's, all fine. The generated dependency files contain version.h so make has complete information how to order the rules. The dependency files are generated by an implicit rule .c -> .o.d, so there should be no problem for any of the files listed above. If you think the patch "btrfs-progs: fix parallel build" does not help much I'll drop it. david