[GRASS5] [bug #2545] (grass) vect32 fails to build

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Jul 20 18:05:32 EDT 2004


On Sun, 18 Jul 2004, Paul Kelly wrote:

> On Sun, 18 Jul 2004, Request Tracker wrote:
>
>> this bug's URL: http://intevation.de/rt/webrt?serial_num=2545
>> -------------------------------------------------------------------------
>> 
>> Subject: vect32 fails to build
>> 
>> Platform: other
>> grass obtained from: Trento Italy site
>> grass binary for platform: Compiled from Sources
>> 
>> Looks like some changes in the makefiles in libes/vect32 are causing 
>> problems.  I get this error:
>> 
>> GISGEN: src/libes/vect32 - Sat Jul 17 21:49:19 CDT 2004
>> 
>> make[1]: *** No rule to make target 
>> `Vlib/OBJ.powerpc-apple-darwin7.4.0/close.o', needed by `/
>> Users/williamk/Documents/src/unix/GRASS/grass53_exp_2004_07_17/src/libes/LIB.powerpc-
>> apple-darwin7.4.0/libvect_combined.a'.  Stop.
>> GISGEN failure at STEP: src/libes/vect32
>> 
>> and then a bunch of other vector stuff fails later on.  I guess the 
>> snapshot caught the CVS tree in a
>> not-quite-working state.
>> 
>
> Oh dear- I didn't test the new changes with the old gmake build system. I 
> will have a look at it later. Can you use the alternate build system with 
> static libraries:
> ./configure --enable-gmake=no --enable-shared=no
> as a workaround?
>

The patch below shows how I propose to fix this. I think src/CMD/gmake.sh 
should be changed so that $(OBJARCH) is preprended at the beginning of a 
path leading to a .o file rather than immediately preceding the filename.
i.e. Vlib/open.o becomes $(OBJARCH)/Vlib/open.o rather than 
Vlib/$(OBJARCH)/open.o as at present.

This should fix things for both the alternate and gmake systems.
It will also cause problems for badly written or non-standard Gmakefiles. 
The only one I came across is for r3.null and I will fix that by building 
r3.null and r3.mask from the same directory (cf. r.mapcalc and r3.mapcalc 
are built from the same directory).

But there might also be problems with non-standard Gmakefiles in add-on 
modules people have written themselves I suppose. But probably not very 
likely. So I just wanted to post this here for a while for comments before 
committing the changes.

The r.terraflow Gmakefile also needs fixed so it will work with both build 
systems. It has a related but different problem with using 
sub-directories.

Index: src/libes/vect32/Gmakefile
===================================================================
RCS file: /grassrepository/grass/src/libes/vect32/Gmakefile,v
retrieving revision 1.4
diff -u -r1.4 Gmakefile
--- src/libes/vect32/Gmakefile	15 Jul 2004 21:47:03 -0000	1.4
+++ src/libes/vect32/Gmakefile	20 Jul 2004 20:38:19 -0000
@@ -64,5 +64,5 @@
  	$(SLIBRULE)

  mkextradirs:
-	mkdir -p $(DSTDIR)/src/libes/vect32/Vlib
-	mkdir -p $(DSTDIR)/src/libes/vect32/diglib
+	mkdir -p $(OBJARCH)/Vlib
+	mkdir -p $(OBJARCH)/diglib
Index: src/CMD/generic/gmake.sh
===================================================================
RCS file: /grassrepository/grass/src/CMD/generic/gmake.sh,v
retrieving revision 1.16
diff -u -r1.16 gmake.sh
--- src/CMD/generic/gmake.sh	25 Mar 2004 11:47:29 -0000	1.16
+++ src/CMD/generic/gmake.sh	20 Jul 2004 20:38:20 -0000
@@ -262,9 +262,9 @@

  # prepend all .o with $(OBJARCH) and .a files with $(LIBARCH)
  sed \
-    -e 's#[\*0-9a-zA-Z_\.\-\$\(\)]*\.o[ \	]#$(OBJARCH)/&#g' \
-    -e 's#[\*0-9a-zA-Z_\.\-\$\(\)]*\.o:[ \	]#$(OBJARCH)/&#g' \
-    -e 's#[\*0-9a-zA-Z_\.\-\$\(\)]*\.o$#$(OBJARCH)/&#g' \
+    -e 's#[\/\*0-9a-zA-Z_\.\-\$\(\)]*\.o[ \	]#$(OBJARCH)/&#g' \
+    -e 's#[\/\*0-9a-zA-Z_\.\-\$\(\)]*\.o:[ \	]#$(OBJARCH)/&#g' \
+    -e 's#[\/\*0-9a-zA-Z_\.\-\$\(\)]*\.o$#$(OBJARCH)/&#g' \
      -e 's#[\*0-9a-zA-Z_\.\-\$\(\)]*\.a[ \	]#$(LIBARCH)/&#g' \
      -e 's#[\*0-9a-zA-Z_\.\-\$\(\)]*\.a:[ \	]#$(LIBARCH)/&#g' \
      -e 's#[\*0-9a-zA-Z_\.\-\$\(\)]*\.a$#$(LIBARCH)/&#g' \
@@ -280,7 +280,7 @@

  sed -e 's/=/ /' -e 's/\\//' Gmakefile |\
   awk '{for(i=1;i<=NF;i++) \
-    if ($i ~ /^[a-zA-Z0-9_\.\-\$\(\)]*\.o$/) print substr($i,1,length($i)-2)} ' |\
+    if ($i ~ /^[\/a-zA-Z0-9_\.\-\$\(\)]*\.o$/) print substr($i,1,length($i)-2)} ' |\
   sort -u |\
   (
      while read file




More information about the grass-dev mailing list