* Bootstrap failure using 'make -j4' [Cygwin]
@ 2010-05-21 14:53 Angelo Graziosi
2010-05-21 16:16 ` Eli Zaretskii
0 siblings, 1 reply; 27+ messages in thread
From: Angelo Graziosi @ 2010-05-21 14:53 UTC (permalink / raw)
To: Emacs
Today, trying to bootstrap Emacs trunk (rev. 100406), using 'make -j4',
fails always in the same manner:
[...]
gcc -c -Demacs -DHAVE_CONFIG_H -I. -I/tmp/emacs/src
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/freetype2 -I/usr/include/librsvg-2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DORBIT2=1
-D_REENTRANT -I/usr/include/gconf/2 -I/usr/include/orbit-2.0
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2
-Wdeclaration-after-statement -Wno-pointer-sign -MMD -MF
deps/frame.d /tmp/emacs/src/frame.c
make[2]: *** [dispnew.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/tmp/emacs/build/src'
make[3]: Leaving directory `/tmp/emacs/build/doc/lispref'
make[1]: *** [src] Error 2
make[1]: *** Waiting for unfinished jobs....
(cd doc/lispintro; /usr/bin/make -w --jobserver-fds=3,4 -
--jobserver-fds=3,4 - --jobserver-fds=3,4 - --jobserver-fds=3,4 -j info)
make[3]: Entering directory `/tmp/emacs/build/doc/lispintro'
cd /tmp/emacs/doc/lispintro; makeinfo emacs-lisp-intro.texi -o
../../info/eintr
make[3]: Leaving directory `/tmp/emacs/build/doc/lispintro'
make[2]: Leaving directory `/tmp/emacs/build'
make[1]: Leaving directory `/tmp/emacs/build'
make: *** [bootstrap] Error 2
This happens for the GTK build on Cygwin.
I have done many tries... It looks as if, with 'make -j4', it avoids to
compile dispnew.c. Indeed I obtain
$ grep dispnew build-emacs-gtk-24.0.50-r100405.log
make[2]: *** [dispnew.o] Error 1
Today I can bootstrap only using 'make -j2' :(
Ciao,
Angelo.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-21 14:53 Bootstrap failure using 'make -j4' [Cygwin] Angelo Graziosi
@ 2010-05-21 16:16 ` Eli Zaretskii
2010-05-21 16:57 ` Angelo Graziosi
0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-21 16:16 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: emacs-devel
> Date: Fri, 21 May 2010 16:53:15 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
>
> Today, trying to bootstrap Emacs trunk (rev. 100406), using 'make -j4',
> fails always in the same manner:
Thanks for the report, but where's the relevant data? It fails
compiling dispnew.c, but the portion of the build you show relates to
frame.c, not to dispnew.c. Please show more.
> I have done many tries... It looks as if, with 'make -j4', it avoids to
> compile dispnew.c. Indeed I obtain
>
> $ grep dispnew build-emacs-gtk-24.0.50-r100405.log
> make[2]: *** [dispnew.o] Error 1
It doesn't avoid. It tries to compile it, but the compilation fails
for some reason. The question is what is the reason. Seeing the
compiler command and its output might help.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-21 16:16 ` Eli Zaretskii
@ 2010-05-21 16:57 ` Angelo Graziosi
2010-05-21 17:43 ` Eli Zaretskii
2010-05-21 17:59 ` Eli Zaretskii
0 siblings, 2 replies; 27+ messages in thread
From: Angelo Graziosi @ 2010-05-21 16:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Il 21/05/2010 18.16, Eli Zaretskii ha scritto:
>> Date: Fri, 21 May 2010 16:53:15 +0200
>> From: Angelo Graziosi<angelo.graziosi@alice.it>
>>
>> Today, trying to bootstrap Emacs trunk (rev. 100406), using 'make -j4',
>> fails always in the same manner:
>
> Thanks for the report, but where's the relevant data? It fails
> compiling dispnew.c, but the portion of the build you show relates to
> frame.c, not to dispnew.c. Please show more.
>
>> I have done many tries... It looks as if, with 'make -j4', it avoids to
>> compile dispnew.c. Indeed I obtain
>>
>> $ grep dispnew build-emacs-gtk-24.0.50-r100405.log
>> make[2]: *** [dispnew.o] Error 1
>
> It doesn't avoid. It tries to compile it, but the compilation fails
> for some reason. The question is what is the reason. Seeing the
> compiler command and its output might help.
Hmm... perhaps I wasn't clear.
In the build log there is *not* track of the command to compile
dispnew.c: as you see 'grep' finds only
make[2]: *** [dispnew.o] Error 1
But this happens *only* with 'make -j4'! I one uses 'make -j2' the
bootstrap is completed and works, and 'dispnew.c' is compiled
successfully with:
gcc -c -Demacs -DHAVE_CONFIG_H -I. -I/tmp/emacs/src
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/freetype2 -I/usr/include/librsvg-2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DORBIT2=1
-D_REENTRANT -I/usr/include/gconf/2 -I/usr/include/orbit-2.0
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2
-Wdeclaration-after-statement -Wno-pointer-sign -MMD -MF
deps/dispnew.d /tmp/emacs/src/dispnew.c
I know that with '-j4' some time the build can fail, mainly if the CPU
is doing other things, and re-trying often solves. But in this case the
CPU was working only for Emacs bootstrap and trying many times did not
solve: it fails always in the same manner. Only using '-j2' did solve!
It is at least two years I use 'make -j4' on Cygwin to bootstrap Emacs
without problems (indeed it worked a week ago...)
Ciao,
Angelo.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-21 16:57 ` Angelo Graziosi
@ 2010-05-21 17:43 ` Eli Zaretskii
2010-05-21 17:59 ` Eli Zaretskii
1 sibling, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-21 17:43 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: emacs-devel
> Date: Fri, 21 May 2010 18:57:41 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> Cc: emacs-devel@gnu.org
>
> > It doesn't avoid. It tries to compile it, but the compilation fails
> > for some reason. The question is what is the reason. Seeing the
> > compiler command and its output might help.
>
> Hmm... perhaps I wasn't clear.
>
> In the build log there is *not* track of the command to compile
> dispnew.c: as you see 'grep' finds only
>
> make[2]: *** [dispnew.o] Error 1
What happens if you say "make -j4 -d 2>&1 | tee foo"? Do you see any
references to dispnew in the file `foo' created by this command?
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-21 16:57 ` Angelo Graziosi
2010-05-21 17:43 ` Eli Zaretskii
@ 2010-05-21 17:59 ` Eli Zaretskii
2010-05-21 18:45 ` Eli Zaretskii
2010-05-21 22:45 ` Angelo Graziosi
1 sibling, 2 replies; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-21 17:59 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: emacs-devel
> Date: Fri, 21 May 2010 18:57:41 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> Cc: emacs-devel@gnu.org
>
> In the build log there is *not* track of the command to compile
> dispnew.c: as you see 'grep' finds only
>
> make[2]: *** [dispnew.o] Error 1
I cannot reproduce this on GNU/Linux with "make -j4 bootstrap". How
many CPU cores do you have on that machine?
If nothing else gives a clue, post the entire transcript of the
"configure" and "make -j4 bootstrap" steps.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-21 17:59 ` Eli Zaretskii
@ 2010-05-21 18:45 ` Eli Zaretskii
2010-05-21 22:45 ` Angelo Graziosi
1 sibling, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-21 18:45 UTC (permalink / raw)
To: angelo.graziosi; +Cc: emacs-devel
> Date: Fri, 21 May 2010 20:59:44 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
>
> > Date: Fri, 21 May 2010 18:57:41 +0200
> > From: Angelo Graziosi <angelo.graziosi@alice.it>
> > Cc: emacs-devel@gnu.org
> >
> > In the build log there is *not* track of the command to compile
> > dispnew.c: as you see 'grep' finds only
> >
> > make[2]: *** [dispnew.o] Error 1
>
> I cannot reproduce this on GNU/Linux with "make -j4 bootstrap".
In fact, I cannot reproduce this with -jN for N in [2..6]. With -j6,
I get a failure messages like this
make[3]: vfork: Resource temporarily unavailable
/bin/sh: Cannot fork
which I think mean I'm trying to use more resources than I'm allowed
to on this machine. But that's way after bootstrap-emacs was linked,
including compiling dispnew.c.
Do you see any other unusual messages in the transcript?
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-21 17:59 ` Eli Zaretskii
2010-05-21 18:45 ` Eli Zaretskii
@ 2010-05-21 22:45 ` Angelo Graziosi
2010-05-22 6:57 ` Eli Zaretskii
1 sibling, 1 reply; 27+ messages in thread
From: Angelo Graziosi @ 2010-05-21 22:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]
Il 21/05/2010 19.59, Eli Zaretskii ha scritto:
>> Date: Fri, 21 May 2010 18:57:41 +0200
>> From: Angelo Graziosi<>
>> Cc:
>>
>> In the build log there is *not* track of the command to compile
>> dispnew.c: as you see 'grep' finds only
>>
>> make[2]: *** [dispnew.o] Error 1
>
> I cannot reproduce this on GNU/Linux with "make -j4 bootstrap".
Indeed. It bootstraps fine on GNU/Linux Kubuntu 10.04
> How many CPU cores do you have on that machine?
It is an AMD Athlon 64 X2 Dual Core Processor 3800+ 2.03 GHz, 1.75GB RAM
> If nothing else gives a clue, post the entire transcript of the
> "configure" and "make -j4 bootstrap" steps.
For completeness I have attached the full build log (40K, 8K compressed).
With 'make -j4 -d 2>&1 | tee foo', as you suggested, I cannot reproduce
the problem: it seems to bootstrap completely (at least emacs.exe is
built and dispnew.c compiled).
My build script use
${source_dir}/configure --prefix=${prefix_dir}
make -j4 bootstrap
Ciao,
Angelo.
[-- Attachment #2: build-emacs-gtk-24.0.50-r100410.log.bz2 --]
[-- Type: application/octet-stream, Size: 7901 bytes --]
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-21 22:45 ` Angelo Graziosi
@ 2010-05-22 6:57 ` Eli Zaretskii
2010-05-22 7:16 ` Glenn Morris
` (3 more replies)
0 siblings, 4 replies; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-22 6:57 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: emacs-devel
> Date: Sat, 22 May 2010 00:45:31 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: emacs-devel@gnu.org
>
> > How many CPU cores do you have on that machine?
>
> It is an AMD Athlon 64 X2 Dual Core Processor 3800+ 2.03 GHz, 1.75GB RAM
If you have only 2 cores, then -j4 is not really useful, is it? You
will never have more than 2 jobs running at the same time. I think
the usual rule of thumb is to use 1.5 times the number of cores as the
argument to -j. In your case, that would be -j3.
> > If nothing else gives a clue, post the entire transcript of the
> > "configure" and "make -j4 bootstrap" steps.
>
> For completeness I have attached the full build log (40K, 8K compressed).
Thanks. I think your problem begins with this error message I see in
the log:
mkdir: impossibile creare la directory "deps": File exists
This comes from the following fragment in src/Makefile.in:
.c.o:
@$(MKDEPDIR)
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
where MKDEPDIR expands to this:
test -d ${DEPDIR} || mkdir ${DEPDIR}
Now, if more than one .c.o rule tries to create the `deps'
subdirectory at the same time, one of them might lose due to a race
condition, and fail the entire compilation.
Could you please try changing this line:
@$(MKDEPDIR)
into
-@$(MKDEPDIR)
and see if that makes the problem go away?
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 6:57 ` Eli Zaretskii
@ 2010-05-22 7:16 ` Glenn Morris
2010-05-22 7:29 ` Glenn Morris
2010-05-22 8:19 ` Eli Zaretskii
2010-05-22 11:00 ` Jan Djärv
` (2 subsequent siblings)
3 siblings, 2 replies; 27+ messages in thread
From: Glenn Morris @ 2010-05-22 7:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, Angelo Graziosi
Eli Zaretskii wrote:
> where MKDEPDIR expands to this:
>
> test -d ${DEPDIR} || mkdir ${DEPDIR}
>
> Now, if more than one .c.o rule tries to create the `deps'
> subdirectory at the same time, one of them might lose due to a race
> condition, and fail the entire compilation.
Please note I changed this earlier today for this reason; but in a
different way to your suggestion.
> Could you please try changing this line:
>
> @$(MKDEPDIR)
> into
> -@$(MKDEPDIR)
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 7:16 ` Glenn Morris
@ 2010-05-22 7:29 ` Glenn Morris
2010-05-22 8:19 ` Eli Zaretskii
1 sibling, 0 replies; 27+ messages in thread
From: Glenn Morris @ 2010-05-22 7:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Angelo Graziosi, emacs-devel
PS it's my fault for overlooking the "-" in the previous "@-" version.
Hard to spot!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 7:16 ` Glenn Morris
2010-05-22 7:29 ` Glenn Morris
@ 2010-05-22 8:19 ` Eli Zaretskii
2010-05-22 11:20 ` Andreas Schwab
1 sibling, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-22 8:19 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel, angelo.graziosi
> Cc: Angelo Graziosi <angelo.graziosi@alice.it>, emacs-devel@gnu.org
> From: Glenn Morris <rgm@gnu.org>
> Date: Sat, 22 May 2010 03:16:00 -0400
>
> Eli Zaretskii wrote:
>
> > where MKDEPDIR expands to this:
> >
> > test -d ${DEPDIR} || mkdir ${DEPDIR}
> >
> > Now, if more than one .c.o rule tries to create the `deps'
> > subdirectory at the same time, one of them might lose due to a race
> > condition, and fail the entire compilation.
>
> Please note I changed this earlier today for this reason
Changed how? I don't see any changes that would solve this. With the
current trunk, running configure on GNU/Linux still produces
src/Makefile with these fragments:
MKDEPDIR=test -d ${DEPDIR} || mkdir ${DEPDIR}
...
.c.o:
@$(MKDEPDIR)
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
What am I missing?
> but in a different way to your suggestion.
That wasn't a suggestion for a change in src/Makefile.in, just a means
to make sure Angelo's problem is due to this race, and not to
something else.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 6:57 ` Eli Zaretskii
2010-05-22 7:16 ` Glenn Morris
@ 2010-05-22 11:00 ` Jan Djärv
2010-05-22 12:46 ` Eli Zaretskii
2010-05-22 13:35 ` Angelo Graziosi
2010-05-23 11:51 ` Angelo Graziosi
3 siblings, 1 reply; 27+ messages in thread
From: Jan Djärv @ 2010-05-22 11:00 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, Angelo Graziosi
Eli Zaretskii skrev 2010-05-22 08.57:
> Thanks. I think your problem begins with this error message I see in
> the log:
>
> mkdir: impossibile creare la directory "deps": File exists
>
> This comes from the following fragment in src/Makefile.in:
>
> .c.o:
> @$(MKDEPDIR)
> $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
>
> where MKDEPDIR expands to this:
>
> test -d ${DEPDIR} || mkdir ${DEPDIR}
>
> Now, if more than one .c.o rule tries to create the `deps'
> subdirectory at the same time, one of them might lose due to a race
> condition, and fail the entire compilation.
>
> Could you please try changing this line:
>
> @$(MKDEPDIR)
> into
> -@$(MKDEPDIR)
>
> and see if that makes the problem go away?
A better solution is probably to replace
test -d ${DEPDIR} || mkdir ${DEPDIR}
with
mkdir -p ${DEPDIR}
Jan D.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 11:00 ` Jan Djärv
@ 2010-05-22 12:46 ` Eli Zaretskii
2010-05-22 13:00 ` Jan Djärv
0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-22 12:46 UTC (permalink / raw)
To: Jan Djärv; +Cc: emacs-devel, angelo.graziosi
> Date: Sat, 22 May 2010 13:00:53 +0200
> From: Jan Djärv <jan.h.d@swipnet.se>
> CC: Angelo Graziosi <angelo.graziosi@alice.it>, emacs-devel@gnu.org
>
> A better solution is probably to replace
>
> test -d ${DEPDIR} || mkdir ${DEPDIR}
>
> with
>
> mkdir -p ${DEPDIR}
I think the -p switch to mkdir is not portable.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 12:46 ` Eli Zaretskii
@ 2010-05-22 13:00 ` Jan Djärv
2010-05-22 13:06 ` David Engster
2010-05-22 13:21 ` Eli Zaretskii
0 siblings, 2 replies; 27+ messages in thread
From: Jan Djärv @ 2010-05-22 13:00 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: angelo.graziosi, emacs-devel
Eli Zaretskii skrev 2010-05-22 14.46:
>> Date: Sat, 22 May 2010 13:00:53 +0200
>> From: Jan Djärv<jan.h.d@swipnet.se>
>> CC: Angelo Graziosi<angelo.graziosi@alice.it>, emacs-devel@gnu.org
>>
>> A better solution is probably to replace
>>
>> test -d ${DEPDIR} || mkdir ${DEPDIR}
>>
>> with
>>
>> mkdir -p ${DEPDIR}
>
> I think the -p switch to mkdir is not portable.
>
I has been in The Single UNIX ® Specification since 1997 at least. I think it
was in POSIX 2 as well (1990), but I lost it, so I can't check.
Do you know any system that doesn't have it?
Jan D.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 13:00 ` Jan Djärv
@ 2010-05-22 13:06 ` David Engster
2010-05-22 13:45 ` Jan Djärv
2010-05-22 13:21 ` Eli Zaretskii
1 sibling, 1 reply; 27+ messages in thread
From: David Engster @ 2010-05-22 13:06 UTC (permalink / raw)
To: Jan Djärv; +Cc: Eli Zaretskii, emacs-devel, angelo.graziosi
Jan Djärv writes:
> Eli Zaretskii skrev 2010-05-22 14.46:
>>> Date: Sat, 22 May 2010 13:00:53 +0200
>>> From: Jan Djärv<jan.h.d@swipnet.se>
>>> CC: Angelo Graziosi<angelo.graziosi@alice.it>, emacs-devel@gnu.org
>>>
>>> A better solution is probably to replace
>>>
>>> test -d ${DEPDIR} || mkdir ${DEPDIR}
>>>
>>> with
>>>
>>> mkdir -p ${DEPDIR}
>>
>> I think the -p switch to mkdir is not portable.
>>
>
> I has been in The Single UNIX ® Specification since 1997 at least. I
> think it was in POSIX 2 as well (1990), but I lost it, so I can't
> check.
That may be, but 'mkdir -p' is not guaranteed to be thread-safe.
-David
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 13:06 ` David Engster
@ 2010-05-22 13:45 ` Jan Djärv
0 siblings, 0 replies; 27+ messages in thread
From: Jan Djärv @ 2010-05-22 13:45 UTC (permalink / raw)
To: Eli Zaretskii, angelo.graziosi, emacs-devel
David Engster skrev 2010-05-22 15.06:
> Jan Djärv writes:
>> Eli Zaretskii skrev 2010-05-22 14.46:
>>>> Date: Sat, 22 May 2010 13:00:53 +0200
>>>> From: Jan Djärv<jan.h.d@swipnet.se>
>>>> CC: Angelo Graziosi<angelo.graziosi@alice.it>, emacs-devel@gnu.org
>>>>
>>>> A better solution is probably to replace
>>>>
>>>> test -d ${DEPDIR} || mkdir ${DEPDIR}
>>>>
>>>> with
>>>>
>>>> mkdir -p ${DEPDIR}
>>>
>>> I think the -p switch to mkdir is not portable.
>>>
>>
>> I has been in The Single UNIX ® Specification since 1997 at least. I
>> think it was in POSIX 2 as well (1990), but I lost it, so I can't
>> check.
>
> That may be, but 'mkdir -p' is not guaranteed to be thread-safe.
That has nothing to do with this situation. The point of -p here is that
mkdir shall not output an error if the directory exist. When creating
multiple directories, then -p is not thread safe (i.e. two mkdir:s may be
creating directories in the tree), but this is not the case here.
Jan D.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 13:00 ` Jan Djärv
2010-05-22 13:06 ` David Engster
@ 2010-05-22 13:21 ` Eli Zaretskii
2010-05-22 13:41 ` David Engster
2010-05-22 13:54 ` Jan Djärv
1 sibling, 2 replies; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-22 13:21 UTC (permalink / raw)
To: Jan Djärv; +Cc: angelo.graziosi, emacs-devel
> Date: Sat, 22 May 2010 15:00:01 +0200
> From: Jan Djärv <jan.h.d@swipnet.se>
> CC: emacs-devel@gnu.org, angelo.graziosi@alice.it
>
> > I think the -p switch to mkdir is not portable.
> >
>
> I has been in The Single UNIX ® Specification since 1997 at least. I think it
> was in POSIX 2 as well (1990), but I lost it, so I can't check.
>
> Do you know any system that doesn't have it?
Not by name, no. But this is in the GNU Coding Statndards:
Generally, stick to the widely-supported (usually POSIX-specified)
options and features of these programs. For example, don't use `mkdir
-p', convenient as it may be, because a few systems don't support it at
all and with others, it is not safe for parallel execution.
If this is no longer a consideration, perhaps we should ask Richard to
amend standards.texi.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 13:21 ` Eli Zaretskii
@ 2010-05-22 13:41 ` David Engster
2010-05-22 14:00 ` Jan Djärv
2010-05-22 13:54 ` Jan Djärv
1 sibling, 1 reply; 27+ messages in thread
From: David Engster @ 2010-05-22 13:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Jan Djärv, emacs-devel, angelo.graziosi
Eli Zaretskii writes:
>> Date: Sat, 22 May 2010 15:00:01 +0200
>> From: Jan Djärv <jan.h.d@swipnet.se>
>> CC: emacs-devel@gnu.org, angelo.graziosi@alice.it
>>
>> > I think the -p switch to mkdir is not portable.
>> >
>>
>> I has been in The Single UNIX ® Specification since 1997 at least. I think it
>> was in POSIX 2 as well (1990), but I lost it, so I can't check.
>>
>> Do you know any system that doesn't have it?
>
> Not by name, no. But this is in the GNU Coding Statndards:
>
> Generally, stick to the widely-supported (usually POSIX-specified)
> options and features of these programs. For example, don't use `mkdir
> -p', convenient as it may be, because a few systems don't support it at
> all and with others, it is not safe for parallel execution.
>
> If this is no longer a consideration, perhaps we should ask Richard to
> amend standards.texi.
In autoconf, Solaris 8 is mentioned with a thread-unsafe 'mkdir -p', so
this is still an issue. Autoconf's MKDIR_P falls back to 'install-sh -d'
when GNU mkdir isn't available.
-David
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 13:41 ` David Engster
@ 2010-05-22 14:00 ` Jan Djärv
0 siblings, 0 replies; 27+ messages in thread
From: Jan Djärv @ 2010-05-22 14:00 UTC (permalink / raw)
To: Eli Zaretskii, angelo.graziosi, emacs-devel
David Engster skrev 2010-05-22 15.41:
>
> In autoconf, Solaris 8 is mentioned with a thread-unsafe 'mkdir -p', so
> this is still an issue. Autoconf's MKDIR_P falls back to 'install-sh -d'
> when GNU mkdir isn't available.
>
Thread safety isn't an issue for the problem at hand. Anyway, install-sh -d
is not parallel safe either.
Jan D.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 13:21 ` Eli Zaretskii
2010-05-22 13:41 ` David Engster
@ 2010-05-22 13:54 ` Jan Djärv
2010-05-22 14:10 ` Eli Zaretskii
1 sibling, 1 reply; 27+ messages in thread
From: Jan Djärv @ 2010-05-22 13:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, angelo.graziosi
Eli Zaretskii skrev 2010-05-22 15.21:
>> Date: Sat, 22 May 2010 15:00:01 +0200
>> From: Jan Djärv<jan.h.d@swipnet.se>
>> CC: emacs-devel@gnu.org, angelo.graziosi@alice.it
>>
>>> I think the -p switch to mkdir is not portable.
>>>
>>
>> I has been in The Single UNIX ® Specification since 1997 at least. I think it
>> was in POSIX 2 as well (1990), but I lost it, so I can't check.
>>
>> Do you know any system that doesn't have it?
>
> Not by name, no. But this is in the GNU Coding Statndards:
>
> Generally, stick to the widely-supported (usually POSIX-specified)
> options and features of these programs. For example, don't use `mkdir
> -p', convenient as it may be, because a few systems don't support it at
> all and with others, it is not safe for parallel execution.
>
> If this is no longer a consideration, perhaps we should ask Richard to
> amend standards.texi.
>
Well, -p is in POSIX now, so I guess the standards needs to be updated on that
point. But it is still not parallel safe.
Emacs uses prototypes in C without macros now, and that is something the GNU
coding standards says not to do. So I really don't know how relevant the GNU
Coding standards are for Emacs developemnt.
Jan D.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 13:54 ` Jan Djärv
@ 2010-05-22 14:10 ` Eli Zaretskii
0 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-22 14:10 UTC (permalink / raw)
To: Jan Djärv; +Cc: emacs-devel, angelo.graziosi
> Date: Sat, 22 May 2010 15:54:29 +0200
> From: Jan Djärv <jan.h.d@swipnet.se>
> CC: angelo.graziosi@alice.it, emacs-devel@gnu.org
>
> > Generally, stick to the widely-supported (usually POSIX-specified)
> > options and features of these programs. For example, don't use `mkdir
> > -p', convenient as it may be, because a few systems don't support it at
> > all and with others, it is not safe for parallel execution.
> >
> > If this is no longer a consideration, perhaps we should ask Richard to
> > amend standards.texi.
> >
>
> Well, -p is in POSIX now, so I guess the standards needs to be updated on that
> point. But it is still not parallel safe.
If it's not parallel safe, it might be a problem in this case, since
multiple .c.o rules could invoke it in parallel under "make -j".
> Emacs uses prototypes in C without macros now, and that is something the GNU
> coding standards says not to do. So I really don't know how relevant the GNU
> Coding standards are for Emacs developemnt.
They are relevant, and the document is actively maintained. Any
anachronisms you find there I suggest to report to Richard.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 6:57 ` Eli Zaretskii
2010-05-22 7:16 ` Glenn Morris
2010-05-22 11:00 ` Jan Djärv
@ 2010-05-22 13:35 ` Angelo Graziosi
2010-05-22 14:08 ` Eli Zaretskii
2010-05-23 11:51 ` Angelo Graziosi
3 siblings, 1 reply; 27+ messages in thread
From: Angelo Graziosi @ 2010-05-22 13:35 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
The problem seems fixed in rev 100412, 'make -j4' works just fine
(thanks for having clarified the cores usage of CPU)
And...
Il 22/05/2010 8.57, Eli Zaretskii ha scritto:
> Thanks. I think your problem begins with this error message I see in
> the log:
>
> mkdir: impossibile creare la directory "deps": File exists
for completeness, I noticed this error on GNU/Linux because it caused
the build to be stopped... But there I thought this was caused by some
garbage from a previous build and, really, after deleting the build
tree, I was able to bootstrap...
Ciao,
Angelo.
PS. Should I test what follow in any case?
> This comes from the following fragment in src/Makefile.in:
>
> .c.o:
> @$(MKDEPDIR)
> $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
>
> where MKDEPDIR expands to this:
>
> test -d ${DEPDIR} || mkdir ${DEPDIR}
>
> Now, if more than one .c.o rule tries to create the `deps'
> subdirectory at the same time, one of them might lose due to a race
> condition, and fail the entire compilation.
>
> Could you please try changing this line:
>
> @$(MKDEPDIR)
> into
> -@$(MKDEPDIR)
>
> and see if that makes the problem go away?
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-22 6:57 ` Eli Zaretskii
` (2 preceding siblings ...)
2010-05-22 13:35 ` Angelo Graziosi
@ 2010-05-23 11:51 ` Angelo Graziosi
2010-05-23 17:12 ` Eli Zaretskii
3 siblings, 1 reply; 27+ messages in thread
From: Angelo Graziosi @ 2010-05-23 11:51 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Il 22/05/2010 8.57, Eli Zaretskii ha scritto:
> If you have only 2 cores, then -j4 is not really useful, is it? You
> will never have more than 2 jobs running at the same time. I think
> the usual rule of thumb is to use 1.5 times the number of cores as the
> argument to -j. In your case, that would be -j3.
Just for completeness, whenever I use -j2, -j3, -j4, I find always this
warning:
[...]
if [ -x ./config.status ]; then \
./config.status; \
else \
./configure --enable-maintainer-mode; \
fi
config.status: creating Makefile
config.status: creating lib-src/Makefile
config.status: creating oldXMenu/Makefile
config.status: creating doc/emacs/Makefile
config.status: creating doc/misc/Makefile
config.status: creating doc/lispintro/Makefile
config.status: creating doc/lispref/Makefile
config.status: creating src/Makefile.c
config.status: creating lwlib/Makefile
config.status: creating lisp/Makefile
config.status: creating leim/Makefile
config.status: creating src/config.h
config.status: executing default commands
creating src/epaths.h
make[1]: Entering directory `/tmp/emacs/build'
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent
make rule.
make[1]: Leaving directory `/tmp/emacs/build'
[...]
=======================
Ciao,
Angelo.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Bootstrap failure using 'make -j4' [Cygwin]
2010-05-23 11:51 ` Angelo Graziosi
@ 2010-05-23 17:12 ` Eli Zaretskii
0 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2010-05-23 17:12 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: emacs-devel
> Date: Sun, 23 May 2010 13:51:22 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> CC: emacs-devel@gnu.org
>
> make[1]: Entering directory `/tmp/emacs/build'
> make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent
> make rule.
> make[1]: Leaving directory `/tmp/emacs/build'
I think this is normal: config.status runs "make epaths-force", but
since this is not a sub-make of the main Make, the -j switch is
disabled.
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2010-05-23 17:12 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 14:53 Bootstrap failure using 'make -j4' [Cygwin] Angelo Graziosi
2010-05-21 16:16 ` Eli Zaretskii
2010-05-21 16:57 ` Angelo Graziosi
2010-05-21 17:43 ` Eli Zaretskii
2010-05-21 17:59 ` Eli Zaretskii
2010-05-21 18:45 ` Eli Zaretskii
2010-05-21 22:45 ` Angelo Graziosi
2010-05-22 6:57 ` Eli Zaretskii
2010-05-22 7:16 ` Glenn Morris
2010-05-22 7:29 ` Glenn Morris
2010-05-22 8:19 ` Eli Zaretskii
2010-05-22 11:20 ` Andreas Schwab
2010-05-22 12:53 ` Eli Zaretskii
2010-05-22 11:00 ` Jan Djärv
2010-05-22 12:46 ` Eli Zaretskii
2010-05-22 13:00 ` Jan Djärv
2010-05-22 13:06 ` David Engster
2010-05-22 13:45 ` Jan Djärv
2010-05-22 13:21 ` Eli Zaretskii
2010-05-22 13:41 ` David Engster
2010-05-22 14:00 ` Jan Djärv
2010-05-22 13:54 ` Jan Djärv
2010-05-22 14:10 ` Eli Zaretskii
2010-05-22 13:35 ` Angelo Graziosi
2010-05-22 14:08 ` Eli Zaretskii
2010-05-23 11:51 ` Angelo Graziosi
2010-05-23 17:12 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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.