%% "Michael Sterrett -Mr. Bones.-" <[EMAIL PROTECTED]> writes:
Re: an issue with GNU make 3.78 and above on DYNIX/ptx...
ms> $ gmake --version
ms> GNU Make version 3.78.1, by Richard Stallman and Roland McGrath.
ms> Built for i386-sequent-sysv4
ms> $ uname -a
ms> DYNIX/ptx roll 4.0 V4.4.4 i386
ms> Incidently, I can also reproduce it on V4.4.7.
ms> TARGETS = $(patsubst %.abc,%.xyz,$(wildcard *[0-9].abc))
ms> %.xyz: %.abc
ms> @touch $@
ms> all: $(TARGETS)
ms> There are 100 files in the directory called 1.abc, 2.abc, and so on.
ms> $ gmake -j
ms> gmake: *** No rule to make target `12.abc', needed by `12.xyz'. Stop.
ms> gmake: *** Waiting for unfinished jobs....
ms> The number varies, but it usually fails somewhere. Without the -j
ms> option, or with -j1, the build completes as expected. Also, gmake
ms> -j2 is just as unreliable so I don't think it's a resource or
ms> memory problem.
The problem turns out to be that the stat(2) system call in
remake.c:name_mtime() is failing with EINTR. Wrapping it in a loop to
repeat on EINTR solves the problem.
-----
OK, I've investigated this further. The reason you never see this
problem on "normal" UNIX systems is that it's not legal for stat(2) to
fail with EINTR. In other words, stat(2) is not interruptible, by
definition, due to signals. Looking at both the POSIX and SingleUNIX
specifications for stat(2), EINTR is not a legal error state when
stat(2) returns.
Two solutions immediately present themselves:
1) Just wrap stat(2) in a loop checking for EINTR, even though that's
not possible on any standard UNIX system. I don't think this would
be much of a slowdown in the code, but others might disagree (for
sure this stat(2) is one of the most common system calls make uses).
2) Use a configure check for this OS (I don't see how a configure macro
for this can easily be written) and only wrap the stat(2) in an
EINTR loop on this OS (i386-sequent-sysv4).
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.ultranet.com/~pauld/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist