zsh-workers
 help / color / mirror / code / Atom feed
* Building zsh should work with "make -j2"
@ 2007-01-12 23:58 Vincent Lefevre
  2007-01-13 18:21 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Lefevre @ 2007-01-12 23:58 UTC (permalink / raw)
  To: zsh-workers

Hi,

When building zsh with make -j2, in fact

make () {
        command make -j2 "$@" 2>&1 | eet -f make -m bold
}

with a colorizing script, I had the following problem:

make[1]: Entering directory `/home/vlefevre/software/zsh-4.3.2/Src'
rm -f stamp-modobjs.tmp
cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod
creating Src/Makemod.in
config.status: creating Src/Makemod
make[2]: Entering directory `/home/vlefevre/software/zsh-4.3.2/Src'
echo 'timestamp for *.mdd files' > ../Src/modules.stamp
creating Src/Builtins/Makefile.in
config.status: creating Src/Builtins/Makefile
make[3]: Entering directory `/home/vlefevre/software/zsh-4.3.2/Src/Builtins'
make[3]: Leaving directory `/home/vlefevre/software/zsh-4.3.2/Src/Builtins'
creating Src/Modules/Makefile.in
config.status: creating Src/Modules/Makefile
make[3]: Entering directory `/home/vlefevre/software/zsh-4.3.2/Src/Modules'
make[3]: Leaving directory `/home/vlefevre/software/zsh-4.3.2/Src/Modules'
creating Src/Zle/Makefile.in
config.status: creating Src/Zle/Makefile
make[3]: Entering directory `/home/vlefevre/software/zsh-4.3.2/Src/Zle'
make[3]: Leaving directory `/home/vlefevre/software/zsh-4.3.2/Src/Zle'
make[2]: Leaving directory `/home/vlefevre/software/zsh-4.3.2/Src'
make[2]: Entering directory `/home/vlefevre/software/zsh-4.3.2/Src'
mawk -f ./signames1.awk /usr/include/bits/signum.h >sigtmp.c
make[2]: Entering directory `/home/vlefevre/software/zsh-4.3.2/Src'
mawk -f ./signames1.awk /usr/include/bits/signum.h >sigtmp.c
gcc -E sigtmp.c >sigtmp.out
gcc -E sigtmp.c >sigtmp.out
mawk -f ./signames2.awk sigtmp.out > signames.c
rm -f sigtmp.c sigtmp.out
mawk -f ./signames2.awk sigtmp.out > signames.c
mawk: cannot open sigtmp.out (No such file or directory)
[...]

A dependency bug in the Makefile?

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


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

* Re: Building zsh should work with "make -j2"
  2007-01-12 23:58 Building zsh should work with "make -j2" Vincent Lefevre
@ 2007-01-13 18:21 ` Bart Schaefer
  2007-01-14 20:10   ` Vincent Lefevre
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2007-01-13 18:21 UTC (permalink / raw)
  To: Vincent Lefevre, zsh-workers

On Jan 13, 12:58am, Vincent Lefevre wrote:
}
} When building zsh with make -j2, in fact
} 
} A dependency bug in the Makefile?

Yes, but it's a really insidious one -- it's an implicit dependency on a
sequential build rather than a true file-to-file dependency that can be
expressed in make syntax.

I've tried several different ways to introduce dummy build targets to
force the one portion of the build that is required to be sequetial to
really be sequential, and failed every time.  The problem is related
to the way that zsh uses recursive invocations of make with makefiles
that are (re)compiled as part of the outer invocation; it appears to be
truly impossible to create a description of this in make syntax because
the necessary parts of the syntax can't even exist until the outer make
has already decided that it's OK to parallelize the recurive make.

That's not the whole story, but it's a large subset of it ...


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

* Re: Building zsh should work with "make -j2"
  2007-01-13 18:21 ` Bart Schaefer
@ 2007-01-14 20:10   ` Vincent Lefevre
  2007-01-14 20:30     ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Lefevre @ 2007-01-14 20:10 UTC (permalink / raw)
  To: zsh-workers

On 2007-01-13 10:21:41 -0800, Bart Schaefer wrote:
> I've tried several different ways to introduce dummy build targets to
> force the one portion of the build that is required to be sequetial to
> really be sequential, and failed every time.  The problem is related
> to the way that zsh uses recursive invocations of make with makefiles
> that are (re)compiled as part of the outer invocation; it appears to be
> truly impossible to create a description of this in make syntax because
> the necessary parts of the syntax can't even exist until the outer make
> has already decided that it's OK to parallelize the recurive make.

Since it is not supported, isn't there a way to disable the parallel
build completely in the Makefile? I use the -j2 option systematically.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


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

* Re: Building zsh should work with "make -j2"
  2007-01-14 20:10   ` Vincent Lefevre
@ 2007-01-14 20:30     ` Bart Schaefer
  2007-01-15  0:26       ` Vincent Lefevre
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2007-01-14 20:30 UTC (permalink / raw)
  To: zsh-workers

On Jan 14,  9:10pm, Vincent Lefevre wrote:
}
} Since it is not supported, isn't there a way to disable the parallel
} build completely in the Makefile?

In a way that's not GNUmake-specific?  I don't know of one.  There's
the ".NOTPARALLEL" target, which could be added to the end of
Config/defs.mk.in to control GNUmake; I suppose that might be worth
doing.  However, it doesn't really solve the general problem.

Index: Config/defs.mk.in
===================================================================
--- Config/defs.mk.in	31 May 2006 14:11:59 -0000	1.7
+++ Config/defs.mk.in	14 Jan 2007 20:26:28 -0000
@@ -97,3 +98,6 @@
 
 # override built-in suffix list
 .SUFFIXES:
+
+# parallel build is not supported
+.NOTPARALLEL:

-- 


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

* Re: Building zsh should work with "make -j2"
  2007-01-14 20:30     ` Bart Schaefer
@ 2007-01-15  0:26       ` Vincent Lefevre
  2007-01-15  1:57         ` Dan Nelson
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Lefevre @ 2007-01-15  0:26 UTC (permalink / raw)
  To: zsh-workers

On 2007-01-14 12:30:47 -0800, Bart Schaefer wrote:
> In a way that's not GNUmake-specific?  I don't know of one.  There's
> the ".NOTPARALLEL" target, which could be added to the end of
> Config/defs.mk.in to control GNUmake; I suppose that might be worth
> doing.  However, it doesn't really solve the general problem.

Yes, this is better than nothing. I generally use GNU make.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


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

* Re: Building zsh should work with "make -j2"
  2007-01-15  0:26       ` Vincent Lefevre
@ 2007-01-15  1:57         ` Dan Nelson
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Nelson @ 2007-01-15  1:57 UTC (permalink / raw)
  To: zsh-workers

In the last episode (Jan 15), Vincent Lefevre said:
> On 2007-01-14 12:30:47 -0800, Bart Schaefer wrote:
> > In a way that's not GNUmake-specific?  I don't know of one.  There's
> > the ".NOTPARALLEL" target, which could be added to the end of
> > Config/defs.mk.in to control GNUmake; I suppose that might be worth
> > doing.  However, it doesn't really solve the general problem.
> 
> Yes, this is better than nothing. I generally use GNU make.

BSD Make and other pmake variants recognize .NO_PARALLEL and
.NOTPARALLEL;  Solaris' dmake only knows .NO_PARALLEL, so adding both
is probably a good idea.

-- 
	Dan Nelson
	dnelson@allantgroup.com


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

end of thread, other threads:[~2007-01-15  1:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-12 23:58 Building zsh should work with "make -j2" Vincent Lefevre
2007-01-13 18:21 ` Bart Schaefer
2007-01-14 20:10   ` Vincent Lefevre
2007-01-14 20:30     ` Bart Schaefer
2007-01-15  0:26       ` Vincent Lefevre
2007-01-15  1:57         ` Dan Nelson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).