[GRASS-dev] new g.mremove doesn't compile on Mac OS X

I just did an update and compile for OS X (10.5)

The new C version of g.mremove doesn't compile. Here are the errors.

cmb-MBP-2:nviz cmbarton$ cd /Users/cmbarton/grass_dev/grass6_src/general/g.mremove
cmb-MBP-2:g.mremove cmbarton$ make
gcc -I/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include -arch i386 -Os -g -DPACKAGE=\""grassmods"\" -I/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include -o OBJ.i386-apple-darwin9.4.0/do_remove.o -c do_remove.c
In file included from /Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/digit.h:3,
                  from /Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/Vect.h:4,
                  from do_remove.c:2:
/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/dig_structs.h:22:21: error: ogr_api.h: No such file or directory
In file included from /Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/digit.h:3,
                  from /Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/Vect.h:4,
                  from do_remove.c:2:
/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/dig_structs.h:175: error: syntax error before ‘OGRDataSourceH’
/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/dig_structs.h:175: warning: no semicolon at end of struct or union
/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/dig_structs.h:176: warning: data definition has no type or storage class
/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/dig_structs.h:191: error: syntax error before ‘feature_cache’
/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/dig_structs.h:191: warning: data definition has no type or storage class
/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/dig_structs.h:214: error: syntax error before ‘}’ token
/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/include/grass/vect/dig_structs.h:219: error: field ‘ogr’ has incomplete type
make: *** [OBJ.i386-apple-darwin9.4.0/do_remove.o] Error 1

Michael

Michael Barton wrote:

I just did an update and compile for OS X (10.5)

The new C version of g.mremove doesn't compile. Here are the errors.

/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/
include/grass/vect/dig_structs.h:22:21: error: ogr_api.h: No such file
or directory

It needs this (committed to trunk as r33436):

--- general/g.mremove/Makefile (revision 33434)
+++ general/g.mremove/Makefile (working copy)
@@ -4,6 +4,8 @@

LIBES = $(GISLIB) $(VECTLIB) $(G3DLIB)
DEPENDENCIES = $(GISDEP) $(VECTDEP) $(G3DDEP)
+EXTRA_INC = $(VECT_INC)
+EXTRA_CFLAGS = $(VECT_CFLAGS)

include $(MODULE_TOPDIR)/include/Make/Module.make

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

Just tested this. It compiles fine and works -- very fast. Can it be backported from trunk?

Michael

On Sep 13, 2008, at 4:17 PM, Glynn Clements wrote:

Michael Barton wrote:

I just did an update and compile for OS X (10.5)

The new C version of g.mremove doesn't compile. Here are the errors.

/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.4.0/
include/grass/vect/dig_structs.h:22:21: error: ogr_api.h: No such file
or directory

It needs this (committed to trunk as r33436):

--- general/g.mremove/Makefile (revision 33434)
+++ general/g.mremove/Makefile (working copy)
@@ -4,6 +4,8 @@

LIBES = $(GISLIB) $(VECTLIB) $(G3DLIB)
DEPENDENCIES = $(GISDEP) $(VECTDEP) $(G3DDEP)
+EXTRA_INC = $(VECT_INC)
+EXTRA_CFLAGS = $(VECT_CFLAGS)

include $(MODULE_TOPDIR)/include/Make/Module.make

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

On Sun, Sep 14, 2008 at 2:47 AM, Michael Barton <michael.barton@asu.edu> wrote:

Just tested this. It compiles fine and works -- very fast. Can it be
backported from trunk?

Sure - done.

Markus