%% "Michael Sterrett -Mr. Bones.-" <[EMAIL PROTECTED]> writes:

  ms> I'm trying to diagnose a problem I'm having with -j when running on
  ms> DYNIX/ptx.  This Makefile demonstrates the problem I'm having:

  ms> TARGETS = $(patsubst %.abc,%.xyz,$(wildcard *[0-9].abc))

  ms> %.xyz: %.abc
  ms>   @touch $@

  ms> all: $(TARGETS)

  ms> clean:
  ms>   @rm -f *.xyz

  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.

I tried this on my Solaris 2.5.1 system with both GNU make 3.78.1 and
3.79, and both worked fine every time (I tried it about 10 times).

  ms> I have the output of gmake -dj available, but it's huge, so didn't
  ms> included it.  If anyone's interested, I can send it to you.

It might be interesting to see the output around where the failure
happens; I certainly don't want to see the whole thing but you should be
able to extract just the parts of the debug output where it's trying to
find the implicit rule, etc. that eventually fails.  What's different
about that than about the ones that succeed?  Likely, it thinks that
file doesn't exist, so the question is "why?".  It may be that stat()
is failing for that file.  You may need to add some debugging code to
get more specific error messages; right now if stat() fails for _any_
reason, make assumes the file doesn't exist.  Look in
remake.c:name_mtime() and have it do a perror() or something if the
stat() fails.

Another possibility is that the directory caching isn't working for some
reason.

Other things to try:

 a) Add a "sleep 1" or even "sleep 10" into the touch command, and see
    what happens.

 b) Run make with the -k to ignore errors, and see if it's just a file
    here or there that fails, or if every file fails after that first
    one.

  ms> Is there anyone out there with access to a DYNIX/ptx box that
  ms> could try to reproduce this?  IBM thinks it's a problem with
  ms> gmake, but I'm not convinced.

Are you doing this on a local filesystem, or over NFS?

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

Reply via email to