All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/hotplug/Linux: Fix build
@ 2014-10-09 16:35 Anthony PERARD
  2014-10-09 16:53 ` Olaf Hering
  2014-10-09 16:54 ` Olaf Hering
  0 siblings, 2 replies; 20+ messages in thread
From: Anthony PERARD @ 2014-10-09 16:35 UTC (permalink / raw)
  To: Xen Devel; +Cc: Anthony PERARD, Olaf Hering, Ian Jackson, Ian Campbell

When building, it might happen that xen.conf in
tools/hotplug/Linux/systemd/Makefile is done twice, at the same time,
which leads to a not found file when calling move-if-changed.

Relevent part of an actual failed build:

make[6]: Entering directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux'
[...]
make -C systemd all
make -C systemd install
make[7]: Entering directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux/systemd'
make[7]: Entering directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux/systemd'
mv -f compat/.xlat/grant_table.h.new compat/.xlat/grant_table.h
rm -f xen.conf.tmp
for mod in xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback evtchn gntdev netbk blkbk xen-scsibk usbbk pciback xen-acpi-processor blktap2 blktap ; do \
  echo $mod ; \
  done > xen.conf.tmp
rm -f xen.conf.tmp
if ! cmp -s xen.conf.tmp xen.conf; then mv -f xen.conf.tmp xen.conf; else rm -f xen.conf.tmp; fi
for mod in xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback evtchn gntdev netbk blkbk xen-scsibk usbbk pciback xen-acpi-processor blktap2 blktap ; do \
  echo $mod ; \
  done > xen.conf.tmp
if ! cmp -s xen.conf.tmp xen.conf; then mv -f xen.conf.tmp xen.conf; else rm -f xen.conf.tmp; fi
[ -d /build/xen-unstable/src/xen-unstable/dist/install/usr/lib/systemd/system/ ] || \
  /build/xen-unstable/src/xen-unstable/tools/hotplug/Linux/systemd/../../../../tools/cross-install -d -m0755 -p /build/xen-unstable/src/xen-unstable/dist/install/usr/lib/systemd/system/
mv: cannot stat 'xen.conf.tmp': No such file or directory
Makefile:42: recipe for target 'xen.conf' failed
make[7]: *** [xen.conf] Error 1
make[7]: Leaving directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux/systemd'
/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux/../../../tools/Rules.mk:116: recipe for target 'subdir-install-systemd' failed
make[6]: *** [subdir-install-systemd] Error 2
make[6]: Leaving directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux'
/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux/../../../tools/Rules.mk:111: recipe for target 'subdirs-install' failed
make[5]: *** [subdirs-install] Error 2

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

---
build have been done with `make -j24`. Without the patch, the problem
always shows.
---
 tools/hotplug/Linux/systemd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/hotplug/Linux/systemd/Makefile b/tools/hotplug/Linux/systemd/Makefile
index 6950d24..2b3c559 100644
--- a/tools/hotplug/Linux/systemd/Makefile
+++ b/tools/hotplug/Linux/systemd/Makefile
@@ -21,7 +21,7 @@ ALL_XEN_SYSTEMD =	$(XEN_SYSTEMD_MODULES)  \
 			$(XEN_SYSTEMD_SERVICE)
 
 .PHONY: all
-all:	install
+all:
 
 .PHONY: clean
 clean:
-- 
Anthony PERARD

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-09 16:35 [PATCH] tools/hotplug/Linux: Fix build Anthony PERARD
@ 2014-10-09 16:53 ` Olaf Hering
  2014-10-09 16:54 ` Olaf Hering
  1 sibling, 0 replies; 20+ messages in thread
From: Olaf Hering @ 2014-10-09 16:53 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Ian Jackson, Ian Campbell, Xen Devel

On Thu, Oct 09, Anthony PERARD wrote:

> When building, it might happen that xen.conf in
> tools/hotplug/Linux/systemd/Makefile is done twice, at the same time,

This is what eac3f5122fd4769b2885d8ad78bcbcf5df2472c1 tried to fix. Too
bad my patch did not solve it.

Olaf

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-09 16:35 [PATCH] tools/hotplug/Linux: Fix build Anthony PERARD
  2014-10-09 16:53 ` Olaf Hering
@ 2014-10-09 16:54 ` Olaf Hering
  2014-10-09 16:58   ` Andrew Cooper
  1 sibling, 1 reply; 20+ messages in thread
From: Olaf Hering @ 2014-10-09 16:54 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Ian Jackson, Ian Campbell, Xen Devel

On Thu, Oct 09, Anthony PERARD wrote:

> make[6]: Entering directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux'
> [...]
> make -C systemd all
> make -C systemd install

I wonder why that happens anyway, isnt that the bug? Shouldnt some "all"
depend on "install", or whatever?

Olaf

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-09 16:54 ` Olaf Hering
@ 2014-10-09 16:58   ` Andrew Cooper
  2014-10-10  8:35     ` Ian Campbell
  0 siblings, 1 reply; 20+ messages in thread
From: Andrew Cooper @ 2014-10-09 16:58 UTC (permalink / raw)
  To: Olaf Hering, Anthony PERARD; +Cc: Ian Jackson, Ian Campbell, Xen Devel

On 09/10/14 17:54, Olaf Hering wrote:
> On Thu, Oct 09, Anthony PERARD wrote:
>
>> make[6]: Entering directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux'
>> [...]
>> make -C systemd all
>> make -C systemd install
> I wonder why that happens anyway, isnt that the bug? Shouldnt some "all"
> depend on "install", or whatever?
>
> Olaf

all: should never depend on install.

all: will be the default target from `make`, which is expected to build
components, and is specifically separate from `make install DESTDIR=$foo`

~Andrew

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-09 16:58   ` Andrew Cooper
@ 2014-10-10  8:35     ` Ian Campbell
  2014-10-10  8:44       ` Ian Campbell
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Campbell @ 2014-10-10  8:35 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Anthony PERARD, Olaf Hering, Ian Jackson, Xen Devel

On Thu, 2014-10-09 at 17:58 +0100, Andrew Cooper wrote:
> On 09/10/14 17:54, Olaf Hering wrote:
> > On Thu, Oct 09, Anthony PERARD wrote:
> >
> >> make[6]: Entering directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux'
> >> [...]
> >> make -C systemd all
> >> make -C systemd install
> > I wonder why that happens anyway, isnt that the bug? Shouldnt some "all"
> > depend on "install", or whatever?
> >
> > Olaf
> 
> all: should never depend on install.
> 
> all: will be the default target from `make`, which is expected to build
> components, and is specifically separate from `make install DESTDIR=$foo`

That's true, and as such Olaf's eac3f5122fd4769b2885d8ad78bcbcf5df2472c1
is of course not correct, somehow I didn't manage to notice this.

I intend to revert shortly...

Ian.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10  8:35     ` Ian Campbell
@ 2014-10-10  8:44       ` Ian Campbell
  2014-10-10  9:19         ` Wei Liu
  2014-10-10  9:59         ` Olaf Hering
  0 siblings, 2 replies; 20+ messages in thread
From: Ian Campbell @ 2014-10-10  8:44 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Anthony PERARD, Olaf Hering, Ian Jackson, Xen Devel

On Fri, 2014-10-10 at 09:35 +0100, Ian Campbell wrote:
> On Thu, 2014-10-09 at 17:58 +0100, Andrew Cooper wrote:
> > On 09/10/14 17:54, Olaf Hering wrote:
> > > On Thu, Oct 09, Anthony PERARD wrote:
> > >
> > >> make[6]: Entering directory '/build/xen-unstable/src/xen-unstable/tools/hotplug/Linux'
> > >> [...]
> > >> make -C systemd all
> > >> make -C systemd install
> > > I wonder why that happens anyway, isnt that the bug? Shouldnt some "all"
> > > depend on "install", or whatever?
> > >
> > > Olaf
> > 
> > all: should never depend on install.
> > 
> > all: will be the default target from `make`, which is expected to build
> > components, and is specifically separate from `make install DESTDIR=$foo`
> 
> That's true, and as such Olaf's eac3f5122fd4769b2885d8ad78bcbcf5df2472c1
> is of course not correct, somehow I didn't manage to notice this.
> 
> I intend to revert shortly...

I've just pushed the following.

I expect the actual problem is that the buildsystem is recusing into
this directory twice simultaneously for "all" and "install" at the same
time. That seems likely to be an issue with the Makefile in the parent
directory.

Should subdirs-install depend on subdirs-all perhaps?

commit 66bb8b04f0032ddf0aa007b0850be1ec15477d60
Author: Ian Campbell <ian.campbell@citrix.com>
Date:   Fri Oct 10 09:35:34 2014 +0100

    Revert "tools/hotplug: fix race during xen.conf creation"
    
    This reverts commit eac3f5122fd4769b2885d8ad78bcbcf5df2472c1.
    
    The "all" target should never depend on "install", it is supposed to only build
    not install.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff --git a/tools/hotplug/Linux/systemd/Makefile b/tools/hotplug/Linux/systemd/Makefile
index 6950d24..9c58b33 100644
--- a/tools/hotplug/Linux/systemd/Makefile
+++ b/tools/hotplug/Linux/systemd/Makefile
@@ -21,11 +21,10 @@ ALL_XEN_SYSTEMD =	$(XEN_SYSTEMD_MODULES)  \
 			$(XEN_SYSTEMD_SERVICE)
 
 .PHONY: all
-all:	install
+all:	$(ALL_XEN_SYSTEMD)
 
 .PHONY: clean
 clean:
-	rm -f $(ALL_XEN_SYSTEMD)
 
 .PHONY: install
 install: $(ALL_XEN_SYSTEMD)


> 
> Ian.
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10  8:44       ` Ian Campbell
@ 2014-10-10  9:19         ` Wei Liu
  2014-10-10  9:20           ` Ian Campbell
  2014-10-10  9:59         ` Olaf Hering
  1 sibling, 1 reply; 20+ messages in thread
From: Wei Liu @ 2014-10-10  9:19 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Olaf Hering, wei.liu2, Andrew Cooper, Ian Jackson, Xen Devel,
	Anthony PERARD

On Fri, Oct 10, 2014 at 09:44:38AM +0100, Ian Campbell wrote:
[...]
> Should subdirs-install depend on subdirs-all perhaps?
> 
> commit 66bb8b04f0032ddf0aa007b0850be1ec15477d60
> Author: Ian Campbell <ian.campbell@citrix.com>
> Date:   Fri Oct 10 09:35:34 2014 +0100
> 
>     Revert "tools/hotplug: fix race during xen.conf creation"
>     
>     This reverts commit eac3f5122fd4769b2885d8ad78bcbcf5df2472c1.
>     
>     The "all" target should never depend on "install", it is supposed to only build
>     not install.
>     
>     Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> 
> diff --git a/tools/hotplug/Linux/systemd/Makefile b/tools/hotplug/Linux/systemd/Makefile
> index 6950d24..9c58b33 100644
> --- a/tools/hotplug/Linux/systemd/Makefile
> +++ b/tools/hotplug/Linux/systemd/Makefile
> @@ -21,11 +21,10 @@ ALL_XEN_SYSTEMD =	$(XEN_SYSTEMD_MODULES)  \
>  			$(XEN_SYSTEMD_SERVICE)
>  
>  .PHONY: all
> -all:	install
> +all:	$(ALL_XEN_SYSTEMD)
>  
>  .PHONY: clean
>  clean:
> -	rm -f $(ALL_XEN_SYSTEMD)
>  

Now clean target just becomes empty...

Wei.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10  9:19         ` Wei Liu
@ 2014-10-10  9:20           ` Ian Campbell
  2014-10-10 10:03             ` Olaf Hering
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Campbell @ 2014-10-10  9:20 UTC (permalink / raw)
  To: Wei Liu
  Cc: Anthony PERARD, Andrew Cooper, Olaf Hering, Ian Jackson, Xen Devel

On Fri, 2014-10-10 at 10:19 +0100, Wei Liu wrote:
> On Fri, Oct 10, 2014 at 09:44:38AM +0100, Ian Campbell wrote:
> [...]
> > Should subdirs-install depend on subdirs-all perhaps?
> > 
> > commit 66bb8b04f0032ddf0aa007b0850be1ec15477d60
> > Author: Ian Campbell <ian.campbell@citrix.com>
> > Date:   Fri Oct 10 09:35:34 2014 +0100
> > 
> >     Revert "tools/hotplug: fix race during xen.conf creation"
> >     
> >     This reverts commit eac3f5122fd4769b2885d8ad78bcbcf5df2472c1.
> >     
> >     The "all" target should never depend on "install", it is supposed to only build
> >     not install.
> >     
> >     Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > 
> > diff --git a/tools/hotplug/Linux/systemd/Makefile b/tools/hotplug/Linux/systemd/Makefile
> > index 6950d24..9c58b33 100644
> > --- a/tools/hotplug/Linux/systemd/Makefile
> > +++ b/tools/hotplug/Linux/systemd/Makefile
> > @@ -21,11 +21,10 @@ ALL_XEN_SYSTEMD =	$(XEN_SYSTEMD_MODULES)  \
> >  			$(XEN_SYSTEMD_SERVICE)
> >  
> >  .PHONY: all
> > -all:	install
> > +all:	$(ALL_XEN_SYSTEMD)
> >  
> >  .PHONY: clean
> >  clean:
> > -	rm -f $(ALL_XEN_SYSTEMD)
> >  
> 
> Now clean target just becomes empty...

... the perils of lumping multiple changes into a single patch...

Ian.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10  8:44       ` Ian Campbell
  2014-10-10  9:19         ` Wei Liu
@ 2014-10-10  9:59         ` Olaf Hering
  2014-10-10 10:42           ` Anthony PERARD
  1 sibling, 1 reply; 20+ messages in thread
From: Olaf Hering @ 2014-10-10  9:59 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Anthony PERARD, Andrew Cooper, Ian Jackson, Xen Devel

On Fri, Oct 10, Ian Campbell wrote:

> I expect the actual problem is that the buildsystem is recusing into
> this directory twice simultaneously for "all" and "install" at the same
> time. That seems likely to be an issue with the Makefile in the parent
> directory.
> 
> Should subdirs-install depend on subdirs-all perhaps?

Anthony, how do you invoke make? While I have seen it often right now
I'm unable to reproduce. There are never 'all' and 'install' targets in
the log. I think my script always called make rpmball.

I think only the install rule should depend on ALL_XEN_SYSTEMD because
in the end thats the only place that matters. There is nothing to build,
and the single xen.conf file could also be generated on the fly during
install.

But still it would be nice to know what the root cause is.

Olaf

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10  9:20           ` Ian Campbell
@ 2014-10-10 10:03             ` Olaf Hering
  0 siblings, 0 replies; 20+ messages in thread
From: Olaf Hering @ 2014-10-10 10:03 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Anthony PERARD, Andrew Cooper, Wei Liu, Ian Jackson, Xen Devel

On Fri, Oct 10, Ian Campbell wrote:

> On Fri, 2014-10-10 at 10:19 +0100, Wei Liu wrote:
> > On Fri, Oct 10, 2014 at 09:44:38AM +0100, Ian Campbell wrote:
> > [...]
> > > Should subdirs-install depend on subdirs-all perhaps?
> > > 
> > > commit 66bb8b04f0032ddf0aa007b0850be1ec15477d60
> > > Author: Ian Campbell <ian.campbell@citrix.com>
> > > Date:   Fri Oct 10 09:35:34 2014 +0100
> > > 
> > >     Revert "tools/hotplug: fix race during xen.conf creation"
> > >     
> > >     This reverts commit eac3f5122fd4769b2885d8ad78bcbcf5df2472c1.
> > >     
> > >     The "all" target should never depend on "install", it is supposed to only build
> > >     not install.
> > >     
> > >     Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > > 
> > > diff --git a/tools/hotplug/Linux/systemd/Makefile b/tools/hotplug/Linux/systemd/Makefile
> > > index 6950d24..9c58b33 100644
> > > --- a/tools/hotplug/Linux/systemd/Makefile
> > > +++ b/tools/hotplug/Linux/systemd/Makefile
> > > @@ -21,11 +21,10 @@ ALL_XEN_SYSTEMD =	$(XEN_SYSTEMD_MODULES)  \
> > >  			$(XEN_SYSTEMD_SERVICE)
> > >  
> > >  .PHONY: all
> > > -all:	install
> > > +all:	$(ALL_XEN_SYSTEMD)
> > >  
> > >  .PHONY: clean
> > >  clean:
> > > -	rm -f $(ALL_XEN_SYSTEMD)
> > >  
> > 
> > Now clean target just becomes empty...
> 
> ... the perils of lumping multiple changes into a single patch...

And it was wrong anyway because it will wipe everything in that dir. If
at all, it should have been "rm -f $(XEN_SYSTEMD_MODULES)" to wipe the
generated files.


Olaf

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10  9:59         ` Olaf Hering
@ 2014-10-10 10:42           ` Anthony PERARD
  2014-10-10 11:19             ` Olaf Hering
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony PERARD @ 2014-10-10 10:42 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, Xen Devel

On Fri, Oct 10, 2014 at 11:59:08AM +0200, Olaf Hering wrote:
> On Fri, Oct 10, Ian Campbell wrote:
> 
> > I expect the actual problem is that the buildsystem is recusing into
> > this directory twice simultaneously for "all" and "install" at the same
> > time. That seems likely to be an issue with the Makefile in the parent
> > directory.
> > 
> > Should subdirs-install depend on subdirs-all perhaps?
> 
> Anthony, how do you invoke make? While I have seen it often right now
> I'm unable to reproduce. There are never 'all' and 'install' targets in
> the log. I think my script always called make rpmball.

There are a lot of things in my build script, but it should be done to
this:
git clone
./configure --enable-systemd --other-stuff
export MAKEFLAGS="-j24"
edit .config to use local git tree
make

And later in the process, a `make install` is called but the faillure
is before that.

> I think only the install rule should depend on ALL_XEN_SYSTEMD because
> in the end thats the only place that matters. There is nothing to build,
> and the single xen.conf file could also be generated on the fly during
> install.
>
> But still it would be nice to know what the root cause is.

It look like hotplug stuff are done like that:
make[2]: Entering directory '/build/xen-unstable/src/xen-unstable/tools'
make -C hotplug install

then calling make install on other subdir.
And after entering tools/Linux, I can see both rules "all" and
"install" been called on systemd directory (unfortunatly, at the same
time on this machine).


I think the problem is in tools/Linux/Makefile, where we have:
all: subdirs-all
install: all subdirs-install

Maybe the "install" rules should depend only on the things it need to
install, and not an "all".

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10 10:42           ` Anthony PERARD
@ 2014-10-10 11:19             ` Olaf Hering
  2014-10-10 14:20               ` Anthony PERARD
  0 siblings, 1 reply; 20+ messages in thread
From: Olaf Hering @ 2014-10-10 11:19 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, Xen Devel

On Fri, Oct 10, Anthony PERARD wrote:

> I think the problem is in tools/Linux/Makefile, where we have:
> all: subdirs-all
> install: all subdirs-install
> 
> Maybe the "install" rules should depend only on the things it need to
> install, and not an "all".

Does removing all fix the failure for you?

Olaf

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10 11:19             ` Olaf Hering
@ 2014-10-10 14:20               ` Anthony PERARD
  2014-10-10 14:28                 ` Olaf Hering
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony PERARD @ 2014-10-10 14:20 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, Xen Devel

On Fri, Oct 10, 2014 at 01:19:05PM +0200, Olaf Hering wrote:
> On Fri, Oct 10, Anthony PERARD wrote:
> 
> > I think the problem is in tools/Linux/Makefile, where we have:
> > all: subdirs-all
> > install: all subdirs-install
> > 
> > Maybe the "install" rules should depend only on the things it need to
> > install, and not an "all".
> 
> Does removing all fix the failure for you?

Yes, it does, no more weird two calls of make on the systemd/Makefile
(with all and install). There is only one call left: "make -C systemd
install". And make does not fail to make xen.conf.

I've did the test on top of staging, with ian revert commit.

Here is the patch that I have tested:


>From 41cfaf5318cb0346e31a8e97939b8805145eb182 Mon Sep 17 00:00:00 2001
From: Anthony PERARD <anthony.perard@citrix.com>
Date: Fri, 10 Oct 2014 12:22:34 +0100
Subject: [PATCH] tools/hotplug/Linux: Removing of "all" dependency from
 "install" rule.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

---
 tools/hotplug/Linux/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index 8cdaa9a..1706c05 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -43,7 +43,7 @@ all: subdirs-all
 build:
 
 .PHONY: install
-install: all install-initd install-scripts install-udev subdirs-install
+install: install-initd install-scripts install-udev subdirs-install
 
 # See docs/misc/distro_mapping.txt for INITD_DIR location
 .PHONY: install-initd
-- 
Anthony PERARD


-- 
Anthony PERARD

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10 14:20               ` Anthony PERARD
@ 2014-10-10 14:28                 ` Olaf Hering
  2014-10-10 14:31                   ` Ian Campbell
  0 siblings, 1 reply; 20+ messages in thread
From: Olaf Hering @ 2014-10-10 14:28 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, Xen Devel

On Fri, Oct 10, Anthony PERARD wrote:

> Yes, it does, no more weird two calls of make on the systemd/Makefile
> (with all and install). There is only one call left: "make -C systemd
> install". And make does not fail to make xen.conf.

I ran into this as well just now, and removing all works for me as well.

> From 41cfaf5318cb0346e31a8e97939b8805145eb182 Mon Sep 17 00:00:00 2001
> From: Anthony PERARD <anthony.perard@citrix.com>
> Date: Fri, 10 Oct 2014 12:22:34 +0100
> Subject: [PATCH] tools/hotplug/Linux: Removing of "all" dependency from
>  "install" rule.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Tested-by: Olaf Hering <olaf@aepfle.de>

> ---
>  tools/hotplug/Linux/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
> index 8cdaa9a..1706c05 100644
> --- a/tools/hotplug/Linux/Makefile
> +++ b/tools/hotplug/Linux/Makefile
> @@ -43,7 +43,7 @@ all: subdirs-all
>  build:
>  
>  .PHONY: install
> -install: all install-initd install-scripts install-udev subdirs-install
> +install: install-initd install-scripts install-udev subdirs-install
>  
>  # See docs/misc/distro_mapping.txt for INITD_DIR location
>  .PHONY: install-initd

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10 14:28                 ` Olaf Hering
@ 2014-10-10 14:31                   ` Ian Campbell
  2014-10-10 15:34                     ` Anthony PERARD
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Campbell @ 2014-10-10 14:31 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Anthony PERARD, Andrew Cooper, Ian Jackson, Xen Devel

On Fri, 2014-10-10 at 16:28 +0200, Olaf Hering wrote:
> On Fri, Oct 10, Anthony PERARD wrote:
> 
> > Yes, it does, no more weird two calls of make on the systemd/Makefile
> > (with all and install). There is only one call left: "make -C systemd
> > install". And make does not fail to make xen.conf.
> 
> I ran into this as well just now, and removing all works for me as well.
> 
> > From 41cfaf5318cb0346e31a8e97939b8805145eb182 Mon Sep 17 00:00:00 2001
> > From: Anthony PERARD <anthony.perard@citrix.com>
> > Date: Fri, 10 Oct 2014 12:22:34 +0100
> > Subject: [PATCH] tools/hotplug/Linux: Removing of "all" dependency from
> >  "install" rule.
> > 
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Tested-by: Olaf Hering <olaf@aepfle.de>

Great. Could someone supply a bit of explanatory text for the commit
message please.

Do these indicate a similar problem:
tools/hotplug/NetBSD/Makefile:install: all install-scripts install-rcd
tools/hotplug/common/Makefile:install: all install-scripts
?

I think not because no recursion is included.

Ian.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] tools/hotplug/Linux: Fix build
  2014-10-10 14:31                   ` Ian Campbell
@ 2014-10-10 15:34                     ` Anthony PERARD
  2014-10-13 14:31                       ` [PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule Anthony PERARD
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony PERARD @ 2014-10-10 15:34 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Andrew Cooper, Olaf Hering, Ian Jackson, Xen Devel

On Fri, Oct 10, 2014 at 03:31:10PM +0100, Ian Campbell wrote:
> On Fri, 2014-10-10 at 16:28 +0200, Olaf Hering wrote:
> > On Fri, Oct 10, Anthony PERARD wrote:
> > 
> > > Yes, it does, no more weird two calls of make on the systemd/Makefile
> > > (with all and install). There is only one call left: "make -C systemd
> > > install". And make does not fail to make xen.conf.
> > 
> > I ran into this as well just now, and removing all works for me as well.
> > 
> > > From 41cfaf5318cb0346e31a8e97939b8805145eb182 Mon Sep 17 00:00:00 2001
> > > From: Anthony PERARD <anthony.perard@citrix.com>
> > > Date: Fri, 10 Oct 2014 12:22:34 +0100
> > > Subject: [PATCH] tools/hotplug/Linux: Removing of "all" dependency from
> > >  "install" rule.
> > > 
> > > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> > 
> > Tested-by: Olaf Hering <olaf@aepfle.de>
> 
> Great. Could someone supply a bit of explanatory text for the commit
> message please.

The "install" rules depends on both "all" and "subdirs-install" and "all"
depends on "subdirs-all". This leads the "install" rules to call both
"subdirs-all" and "subdirs-install" which create a race with two
concurrent `make` within the same directory (systemd) trying to make the
same things (xen.conf) and failing.

Ultimatly, "install" should only depend on the things it needs to
install, and not on "all".

> Do these indicate a similar problem:
> tools/hotplug/NetBSD/Makefile:install: all install-scripts install-rcd
> tools/hotplug/common/Makefile:install: all install-scripts
> ?
> 
> I think not because no recursion is included.

I think this could be an issue, install does not need all. But since
there is no subdirs involves, there is no problem for now.

Shall I update the patch to change all "install" rules of
tools/hotplug/*/Makefile ?

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule.
  2014-10-10 15:34                     ` Anthony PERARD
@ 2014-10-13 14:31                       ` Anthony PERARD
  2014-10-13 15:26                         ` Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Anthony PERARD @ 2014-10-13 14:31 UTC (permalink / raw)
  To: Xen Devel; +Cc: Anthony PERARD, Olaf Hering, Ian Jackson, Ian Campbell

The "install" rules depends on both "all" and "subdirs-install" and
"all" depends on "subdirs-all". This leads the "install" rules to call
both "subdirs-all" and "subdirs-install" which create a race with two
concurrent `make` within the same directory (systemd) trying to make the
same things (xen.conf) and failing.

Ultimatly, "install" should only depend on the things it needs to
install, and not on "all".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Tested-by: Olaf Hering <olaf@aepfle.de>

---
Change in V2:
- Add an explanation in the commit message.
- Also change the other Makefiles under tools/hotplug
---
 tools/hotplug/FreeBSD/Makefile | 2 +-
 tools/hotplug/Linux/Makefile   | 2 +-
 tools/hotplug/NetBSD/Makefile  | 2 +-
 tools/hotplug/common/Makefile  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/hotplug/FreeBSD/Makefile b/tools/hotplug/FreeBSD/Makefile
index 169a124..6aba64a 100644
--- a/tools/hotplug/FreeBSD/Makefile
+++ b/tools/hotplug/FreeBSD/Makefile
@@ -15,7 +15,7 @@ all:
 build:
 
 .PHONY: install
-install: all install-scripts install-rcd
+install: install-scripts install-rcd
 
 .PHONY: install-scripts
 install-scripts:
diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index 8cdaa9a..1706c05 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -43,7 +43,7 @@ all: subdirs-all
 build:
 
 .PHONY: install
-install: all install-initd install-scripts install-udev subdirs-install
+install: install-initd install-scripts install-udev subdirs-install
 
 # See docs/misc/distro_mapping.txt for INITD_DIR location
 .PHONY: install-initd
diff --git a/tools/hotplug/NetBSD/Makefile b/tools/hotplug/NetBSD/Makefile
index 9084859..0a370b8 100644
--- a/tools/hotplug/NetBSD/Makefile
+++ b/tools/hotplug/NetBSD/Makefile
@@ -17,7 +17,7 @@ all:
 build:
 
 .PHONY: install
-install: all install-scripts install-rcd
+install: install-scripts install-rcd
 
 .PHONY: install-scripts
 install-scripts:
diff --git a/tools/hotplug/common/Makefile b/tools/hotplug/common/Makefile
index 657a8e3..5623abb 100644
--- a/tools/hotplug/common/Makefile
+++ b/tools/hotplug/common/Makefile
@@ -19,7 +19,7 @@ all: build
 build: $(HOTPLUGPATH)
 
 .PHONY: install
-install: all install-scripts
+install: install-scripts
 
 .PHONY: install-scripts
 install-scripts: build
-- 
Anthony PERARD

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule.
  2014-10-13 14:31                       ` [PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule Anthony PERARD
@ 2014-10-13 15:26                         ` Ian Jackson
  2014-10-14  9:58                           ` Ian Campbell
  2014-10-14  9:59                           ` Ian Campbell
  0 siblings, 2 replies; 20+ messages in thread
From: Ian Jackson @ 2014-10-13 15:26 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Olaf Hering, Ian Campbell, Xen Devel

Anthony PERARD writes ("[PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule."):
> The "install" rules depends on both "all" and "subdirs-install" and
> "all" depends on "subdirs-all". This leads the "install" rules to call
> both "subdirs-all" and "subdirs-install" which create a race with two
> concurrent `make` within the same directory (systemd) trying to make the
> same things (xen.conf) and failing.

Thanks for the investigation.  I think this demonstrates that our
approach to subdirs is, at the very least, excessively fragile.  But
this fix (or workaround, if we prefer) will do.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule.
  2014-10-13 15:26                         ` Ian Jackson
@ 2014-10-14  9:58                           ` Ian Campbell
  2014-10-14  9:59                           ` Ian Campbell
  1 sibling, 0 replies; 20+ messages in thread
From: Ian Campbell @ 2014-10-14  9:58 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Anthony PERARD, Olaf Hering, Xen Devel

On Mon, 2014-10-13 at 16:26 +0100, Ian Jackson wrote:
> Anthony PERARD writes ("[PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule."):
> > The "install" rules depends on both "all" and "subdirs-install" and
> > "all" depends on "subdirs-all". This leads the "install" rules to call
> > both "subdirs-all" and "subdirs-install" which create a race with two
> > concurrent `make` within the same directory (systemd) trying to make the
> > same things (xen.conf) and failing.
> 
> Thanks for the investigation.  I think this demonstrates that our
> approach to subdirs is, at the very least, excessively fragile.  But
> this fix (or workaround, if we prefer) will do.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Likewise, and applied.

Ian.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule.
  2014-10-13 15:26                         ` Ian Jackson
  2014-10-14  9:58                           ` Ian Campbell
@ 2014-10-14  9:59                           ` Ian Campbell
  1 sibling, 0 replies; 20+ messages in thread
From: Ian Campbell @ 2014-10-14  9:59 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Anthony PERARD, Olaf Hering, Xen Devel

On Mon, 2014-10-13 at 16:26 +0100, Ian Jackson wrote:
> Anthony PERARD writes ("[PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule."):
> > The "install" rules depends on both "all" and "subdirs-install" and
> > "all" depends on "subdirs-all". This leads the "install" rules to call
> > both "subdirs-all" and "subdirs-install" which create a race with two
> > concurrent `make` within the same directory (systemd) trying to make the
> > same things (xen.conf) and failing.
> 
> Thanks for the investigation.  I think this demonstrates that our
> approach to subdirs is, at the very least, excessively fragile.  But
> this fix (or workaround, if we prefer) will do.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Likewise, and applied.

Ian.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-10-14  9:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-09 16:35 [PATCH] tools/hotplug/Linux: Fix build Anthony PERARD
2014-10-09 16:53 ` Olaf Hering
2014-10-09 16:54 ` Olaf Hering
2014-10-09 16:58   ` Andrew Cooper
2014-10-10  8:35     ` Ian Campbell
2014-10-10  8:44       ` Ian Campbell
2014-10-10  9:19         ` Wei Liu
2014-10-10  9:20           ` Ian Campbell
2014-10-10 10:03             ` Olaf Hering
2014-10-10  9:59         ` Olaf Hering
2014-10-10 10:42           ` Anthony PERARD
2014-10-10 11:19             ` Olaf Hering
2014-10-10 14:20               ` Anthony PERARD
2014-10-10 14:28                 ` Olaf Hering
2014-10-10 14:31                   ` Ian Campbell
2014-10-10 15:34                     ` Anthony PERARD
2014-10-13 14:31                       ` [PATCH V2] tools/hotplug: Removing of "all" dependency from "install" rule Anthony PERARD
2014-10-13 15:26                         ` Ian Jackson
2014-10-14  9:58                           ` Ian Campbell
2014-10-14  9:59                           ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.