[GRASS-dev] Re: [GRASS GIS] #909: FTBFS: r.mapcalc in trunk

GRASS GIS trac at osgeo.org
Mon Feb 8 22:21:35 EST 2010


#909: FTBFS: r.mapcalc in trunk
------------------------+---------------------------------------------------
  Reporter:  hamish     |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect     |      Status:  new                      
  Priority:  normal     |   Milestone:  7.0.0                    
 Component:  Compiling  |     Version:  svn-trunk                
Resolution:             |    Keywords:  r.mapcalc                
  Platform:  Linux      |         Cpu:  x86-64                   
------------------------+---------------------------------------------------
Comment (by glynn):

 Replying to [comment:4 hamish]:

 > build log with faulty r.mapcalc build attached.

 Looking at that...
 {{{
 3175:   make[4]: Entering directory
 `/home/hbowman/dev/grass/svn/trunk/raster/r.colors'
 3176:   make -C ../r.mapcalc
 ...
 3178:   make[5]: Entering directory
 `/home/hbowman/dev/grass/svn/trunk/raster/r.mapcalc'
 ...
 ...
 3569:   make -C r.mapcalc || echo
 /home/hbowman/dev/grass/svn/trunk/raster/r.mapcalc >>
 /home/hbowman/dev/grass/svn/trunk/error.log
 ...
 3577:   make[3]: Entering directory
 `/home/hbowman/dev/grass/svn/trunk/raster/r.mapcalc'
 ...
 3589:   gcc ... -o OBJ.x86_64-unknown-linux-gnu/mapcalc.yy.o -c
 mapcalc.yy.c
 ...
 3796:   gcc ... -o OBJ.x86_64-unknown-linux-gnu/mapcalc.yy.o -c
 mapcalc.yy.c
 }}}

 IOW, it's compiling it twice.

 Note: r.colors requires r.mapcalc for the thumbnails.

 It appears that the raster -> r.mapcalc build starts while
 the raster -> r.colors -> r.mapcalc build is still ongoing. The first
 build compiles mapcalc.yy.c to mapcalc.yy.o, then later tries to link it
 while the second build is compiling it, and ends up using an incomplete
 file.

 Unrelated parallel make tasks don't communicate with each other (if they
 did, the second task would note that the first task was already building
 mapcalc.yy.o, and just wait for it to finish).

 When raster/Makefile "make"s r.colors and r.mapcalc concurrently, the
 tasks are considered unrelated, and that doesn't change when they bump
 into each other in r.mapcalc.

 One option is to simply remove r.mapcalc from the SUBDIRS list in
 raster/Makefile, as r.colors is going to build it. At least, that was my
 first thought, but if r.colors.html is up-to-date, it won't happen; and,
 if r.mapcalc already exists, it won't be re-made.

 Another option is to move the thumbnail generation into e.g. man/Makefile.
 But that won't re-build the thumbnails if r.colors is re-made (OTOH, the
 thumbnail images are really a derivative of lib/gis/colors/ rather than
 r.colors per se).

 Another option is to change raster/Makefile thus:
 {{{
 -htmldir: parsubdirs
 +htmldir:
         $(MAKE) -C r.mapcalc
         $(MAKE) parsubdirs
 }}}

 BTW, given that there are 200 compilation and 40 linking commands
 occurring in the interval in question, I'm quite surprised that you
 managed to actually trigger this error.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/909#comment:5>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list