On Thu, Apr 05, 2007 at 02:05:53PM +0100, Glynn Clements wrote:
> 
> [EMAIL PROTECTED] wrote:
> 
> > code I item #359, was opened at 2007-04-05 12:01
> > Status: Open
> > Priority: 4
> > Submitted By: Maciej Sieczka (msieczka)
> > Assigned to: Nobody (None)
> > Summary: GRASS fails to build with make -j3 
> > Issue type: other bug
> > Issue status: None
> > GRASS version: CVS HEAD
> > GRASS component: build
> > Operating system: all
> > Operating system version: 
> > GRASS CVS checkout date, if applies (YYMMDD): 050407
> > 
> > 
> > Initial Comment:
> > On multi cpu machines it is possible to speed up compilation time
> > greatly using the -j switch with make (eg. -j3 for 2 cpus).
> > 
> > make -j3 works fine on my dual core Intel with all the software I'm
> > building from source (including eg. PROJ, GEOS, HDF4, POSTGIS, GDAL,
> > QT4).
> > 
> > But when I build GRASS with make -j3, plenty of errors crop out
> > after "Waiting for unfinished jobs...." information. In a result, no
> > single GRASS module is build properly. However, GRASS builds fine on
> > the same machine if -j3 is not used.
> > 
> > configure and make logs attached.
> 
> The first thing I notice is that the first error is usually a missing
> header file, e.g.:
> 
> copy.c:7:28: error: grass/datetime.h: No such file or directory
> 
> adj_cellhd.c:14:23: error: grass/gis.h: No such file or directory
> 
> This is due to the "headers" target in the "libs" directory being run
> in parallel with other jobs.
> 
> 
> This specific issue can probably be solved by changing lib/Makefile
> from:
> 
>       default: headers subdirs
> to:
> 
>       default: subdirs
> 
>       subdirs: headers
> 
> This should prevent the subdirs target from being run before the
> headers target has completed.
> 
> However: I'm not sure whether parallel make will actually be useful
> with the existing Makefiles, due to the use of a shell "for" loop for
> building subdirectories:
> 
>       subdirs:
>               @list='$(SUBDIRS)'; \
>               for subdir in $$list; do \
>                   echo $$subdir ; \
>                   $(MAKE) -C $$subdir || echo $(CURDIR)/$$subdir >> 
> $(GRASS_HOME)/error.log; \
>               done
> 
> [From include/Make/Dir.make]
> 
> To have the subdirectories built in parallel, you would need to use
> something like:
> 
>       .PHONY: subdirs $(SUBDIRS)
> 
>       subdirs: $(SUBDIRS)
> 
>       $(SUBDIRS):
>               $(MAKE) -C $@


I am interested to get this working but failed to get the
second part in include/Make/Dir.make successfully running.

Any further hints? My Makefile knowledge is fairly limited
unfortunately.

Markus

_______________________________________________
grass-dev mailing list
[email protected]
http://grass.itc.it/mailman/listinfo/grass-dev

Reply via email to