* [Qemu-devel] [PATCH] build: Fix dtc-checkout race condition in Makefile
@ 2017-10-18 18:40 Aaron Lindsay
2017-10-18 21:41 ` Philippe Mathieu-Daudé
2017-10-19 9:15 ` Daniel P. Berrange
0 siblings, 2 replies; 4+ messages in thread
From: Aaron Lindsay @ 2017-10-18 18:40 UTC (permalink / raw)
To: qemu-devel
Cc: Gerd Hoffmann, Peter Maydell, Fam Zheng, Paolo Bonzini,
Daniel P. Berrange, Aaron Lindsay
This was introduced by:
commit aef45d51d1204f3335fb99de6658e0c5612c2b67
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Fri Sep 29 11:11:56 2017 +0100
build: automatically handle GIT submodule checkout for dtc
On my system, I see the following with a fresh clone:
% ./configure --disable-gtk --target-list=aarch64-softmmu
% make -j8
GEN aarch64-softmmu/config-devices.mak.tmp
GEN config-host.h
mkdir -p dtc/libfdt
GIT ui/keycodemapdb dtc
mkdir -p dtc/tests
GEN qemu-options.def
[snip]
GEN migration/trace.h
make: *** [git-submodule-update] Error 1
make: *** Waiting for unfinished jobs....
Upon closer inspection, the root cause of the error is:
% git submodule update --init ui/keycodemapdb dtc
fatal: destination path 'dtc' already exists and is not an empty directory.
Clone of 'git://git.qemu-project.org/dtc.git' into submodule path 'dtc' failed
This patch fixes this race condition by forcing the 'dtc/%' rule which caused
'dtc' to be non-empty to wait on '.git-submodule-status'.
Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 90f91e5..ffa82e8 100644
--- a/Makefile
+++ b/Makefile
@@ -380,7 +380,7 @@ DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests
$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
-dtc/%:
+dtc/%: .git-submodule-status
mkdir -p $@
$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
--
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] build: Fix dtc-checkout race condition in Makefile
2017-10-18 18:40 [Qemu-devel] [PATCH] build: Fix dtc-checkout race condition in Makefile Aaron Lindsay
@ 2017-10-18 21:41 ` Philippe Mathieu-Daudé
2017-10-19 9:15 ` Daniel P. Berrange
1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-10-18 21:41 UTC (permalink / raw)
To: Aaron Lindsay, qemu-devel
Cc: Peter Maydell, Gerd Hoffmann, Paolo Bonzini, Fam Zheng
On 10/18/2017 03:40 PM, Aaron Lindsay wrote:
> This was introduced by:
> commit aef45d51d1204f3335fb99de6658e0c5612c2b67
> Author: Daniel P. Berrange <berrange@redhat.com>
> Date: Fri Sep 29 11:11:56 2017 +0100
>
> build: automatically handle GIT submodule checkout for dtc
>
> On my system, I see the following with a fresh clone:
>
> % ./configure --disable-gtk --target-list=aarch64-softmmu
> % make -j8
> GEN aarch64-softmmu/config-devices.mak.tmp
> GEN config-host.h
> mkdir -p dtc/libfdt
> GIT ui/keycodemapdb dtc
> mkdir -p dtc/tests
> GEN qemu-options.def
> [snip]
> GEN migration/trace.h
> make: *** [git-submodule-update] Error 1
> make: *** Waiting for unfinished jobs....
>
> Upon closer inspection, the root cause of the error is:
>
> % git submodule update --init ui/keycodemapdb dtc
> fatal: destination path 'dtc' already exists and is not an empty directory.
> Clone of 'git://git.qemu-project.org/dtc.git' into submodule path 'dtc' failed
>
> This patch fixes this race condition by forcing the 'dtc/%' rule which caused
> 'dtc' to be non-empty to wait on '.git-submodule-status'.
>
> Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org>
Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 90f91e5..ffa82e8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -380,7 +380,7 @@ DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
> subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests
> $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
>
> -dtc/%:
> +dtc/%: .git-submodule-status
> mkdir -p $@
>
> $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] build: Fix dtc-checkout race condition in Makefile
2017-10-18 18:40 [Qemu-devel] [PATCH] build: Fix dtc-checkout race condition in Makefile Aaron Lindsay
2017-10-18 21:41 ` Philippe Mathieu-Daudé
@ 2017-10-19 9:15 ` Daniel P. Berrange
2017-10-19 17:05 ` Peter Maydell
1 sibling, 1 reply; 4+ messages in thread
From: Daniel P. Berrange @ 2017-10-19 9:15 UTC (permalink / raw)
To: Aaron Lindsay
Cc: qemu-devel, Gerd Hoffmann, Peter Maydell, Fam Zheng,
Paolo Bonzini
On Wed, Oct 18, 2017 at 02:40:23PM -0400, Aaron Lindsay wrote:
> This was introduced by:
> commit aef45d51d1204f3335fb99de6658e0c5612c2b67
> Author: Daniel P. Berrange <berrange@redhat.com>
> Date: Fri Sep 29 11:11:56 2017 +0100
>
> build: automatically handle GIT submodule checkout for dtc
>
> On my system, I see the following with a fresh clone:
>
> % ./configure --disable-gtk --target-list=aarch64-softmmu
> % make -j8
> GEN aarch64-softmmu/config-devices.mak.tmp
> GEN config-host.h
> mkdir -p dtc/libfdt
> GIT ui/keycodemapdb dtc
> mkdir -p dtc/tests
> GEN qemu-options.def
> [snip]
> GEN migration/trace.h
> make: *** [git-submodule-update] Error 1
> make: *** Waiting for unfinished jobs....
>
> Upon closer inspection, the root cause of the error is:
>
> % git submodule update --init ui/keycodemapdb dtc
> fatal: destination path 'dtc' already exists and is not an empty directory.
> Clone of 'git://git.qemu-project.org/dtc.git' into submodule path 'dtc' failed
>
> This patch fixes this race condition by forcing the 'dtc/%' rule which caused
> 'dtc' to be non-empty to wait on '.git-submodule-status'.
Yes this makes sense
>
> Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 90f91e5..ffa82e8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -380,7 +380,7 @@ DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
> subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests
> $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
>
> -dtc/%:
> +dtc/%: .git-submodule-status
> mkdir -p $@
>
> $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] build: Fix dtc-checkout race condition in Makefile
2017-10-19 9:15 ` Daniel P. Berrange
@ 2017-10-19 17:05 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2017-10-19 17:05 UTC (permalink / raw)
To: Daniel P. Berrange
Cc: Aaron Lindsay, QEMU Developers, Gerd Hoffmann, Fam Zheng,
Paolo Bonzini
On 19 October 2017 at 10:15, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Wed, Oct 18, 2017 at 02:40:23PM -0400, Aaron Lindsay wrote:
>> This was introduced by:
>> commit aef45d51d1204f3335fb99de6658e0c5612c2b67
>> Author: Daniel P. Berrange <berrange@redhat.com>
>> Date: Fri Sep 29 11:11:56 2017 +0100
>>
>> build: automatically handle GIT submodule checkout for dtc
>>
>> On my system, I see the following with a fresh clone:
>>
>> % ./configure --disable-gtk --target-list=aarch64-softmmu
>> % make -j8
>> GEN aarch64-softmmu/config-devices.mak.tmp
>> GEN config-host.h
>> mkdir -p dtc/libfdt
>> GIT ui/keycodemapdb dtc
>> mkdir -p dtc/tests
>> GEN qemu-options.def
>> [snip]
>> GEN migration/trace.h
>> make: *** [git-submodule-update] Error 1
>> make: *** Waiting for unfinished jobs....
>>
>> Upon closer inspection, the root cause of the error is:
>>
>> % git submodule update --init ui/keycodemapdb dtc
>> fatal: destination path 'dtc' already exists and is not an empty directory.
>> Clone of 'git://git.qemu-project.org/dtc.git' into submodule path 'dtc' failed
>>
>> This patch fixes this race condition by forcing the 'dtc/%' rule which caused
>> 'dtc' to be non-empty to wait on '.git-submodule-status'.
>
> Yes this makes sense
>
>>
>> Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org>
> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Thanks; applied to master as a buildfix.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-19 17:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 18:40 [Qemu-devel] [PATCH] build: Fix dtc-checkout race condition in Makefile Aaron Lindsay
2017-10-18 21:41 ` Philippe Mathieu-Daudé
2017-10-19 9:15 ` Daniel P. Berrange
2017-10-19 17:05 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).