[GRASS-dev] another make problem (OSX, but could be a general problem)

Glynn Clements glynn at gclements.plus.com
Wed Oct 3 14:10:49 EDT 2007


William Kyngesburye wrote:

> > But that rule is used for libraries and modules alike. I have no idea
> > why it would behave differently for libraries and for modules.
> >
> > Everything points to this being a "make" bug. Can you try with 3.81 to
> > see if it happens there?
> 
> 3.81 works.  There were a couple rebuilds, but that may have been  
> from earlier rebuilds, like sqlp.  I verified by building 3.80 from  
> source (complete rebuild, so Apple didn't do anything to make).
> 
> So, looks like there may have been some bugs in 3.80.  But, your  
> average Mac user is not going to want to install a current make.   

A "user" won't care about incremental rebuilds not actually being
incremental. They'll "configure; make; make install" then not compile
it again (at least, not without [dist]clean first).

> And, since Markus had the same problem, there may be Linux distros  
> that have an older make in their package manager.

I missed that.

> > Before that, can you try using "make -p" on both a library and a
> > module?
> 
> I remembered to zip it this time :)

That has the advantage that your message also gets posted to the list
rather than being bounced for being too large.

Your output has:

	# Implicit Rules
	
	OBJ.i686-apple-darwin8.10.1/%.o: %.c OBJ.i686-apple-darwin8.10.1
	#  commands to execute (from `../../include/Make/Rules.make', line 23):
	        $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(EXTRA_INC) $(INC) \
	        -o $(OBJDIR)/$*.o -c $*.c

while for "make -n -p -C lib/datetime" I get:

	# Implicit Rules
	
	OBJ.i686-pc-linux-gnu/%.o: %.c  | OBJ.i686-pc-linux-gnu
	#  commands to execute (from `../../include/Make/Rules.make', line 21):
		$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(EXTRA_INC) $(INC) \
		-o $(OBJDIR)/$*.o -c $*.c

Note the vertical bar is missing from yours. Can you try the same
thing with a module (which doesn't re-compile everything)?

If the vertical bar is present for modules and missing for libraries,
It may be worth changing the placement of the "include .../Rules.make"
in the Lib.make and Module.make files, to see if there's some
combination that consistently avoids the bug.

I don't particularly want to build $(OBJDIR) "transparently" as part
of the %.o:%.c rule, as there is a race condition with parallel builds
(multiple processes may try to build the directory concurrently; mkdir
considers this a failure).

Also, it may be a performance issue on Cygwin. Cygwin's directory
operations are extremely inefficient; on a P4/3000, it's quicker to
mount the drive via SMB to my P3/800 Linux box and run find/ls/etc
there than it is to run the Cygwin versions locally.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list