[GRASS5] Building LIBGIS (GRASS60beta1) under MINGW

Javier A. Yebrin javier.yebrin at ing.unitn.it
Fri Jan 21 05:35:07 EST 2005


Hi list,

I'm trying to compile the GIS library of GRASS60beta1 under MINGW. After
struggling a few days with the configure, I've managed to run MAKE in the
lib/gis folder.
The first problem appears while building make_loc.c:

****************************************************************************
*************************************
~/grass600beta1/lib/gis
$ make
gcc -I/home/javier/grass600beta1/include
-I/home/javier/grass600beta1/dist.i686-pc-mingw32/include/grass  -g -O2
-D__W98__ -Wall -Wconversion -Wno-implicit-int
-DPACKAGE=\""grasslibs"\"     -DPACKAGE=\""grasslibs"\"
-I/home/javier/grass600beta1/include
-I/home/javier/grass600beta1/dist.i686-pc-mingw32/include/grass \
        -o OBJ.i686-pc-mingw32/make_loc.o -c make_loc.c
make_loc.c: In function `G__make_location':
make_loc.c:59: error: too many arguments to function `mkdir'
make_loc.c:64: error: too many arguments to function `mkdir'
[...]
****************************************************************************
*************************************

With the aid of Markus we patched this error with the following ifdef:

#ifdef __MINGW32__
#define mkdir(name, mode) ((mkdir) (name)) 
#endif 

Is this patch correct? 

Afterwards, an error occurs while building spawn.c: 

****************************************************************************
*************************************
~/grass600beta1/lib/gis
$ make
gcc -I/home/javier/grass600beta1/include
-I/home/javier/grass600beta1/dist.i686-pc-mingw32/include/grass  -g -O2
-D__W98__ -Wall -Wconversion -Wno-implicit-int
-DPACKAGE=\""grasslibs"\"     -DPACKAGE=\""grasslibs"\"
-I/home/javier/grass600beta1/include
-I/home/javier/grass600beta1/dist.i686-pc-mingw32/include/grass \
        -o OBJ.i686-pc-mingw32/spawn.o -c spawn.c
spawn.c:16:22: sys/wait.h: No such file or directory
spawn.c: In function `G_spawn':
[...]
****************************************************************************
****************************************

As you can see, the problem is with the wait.h header, which is not present
in MINGW. One of the declarations that spawn.c needs is "sigaction", for
example. 
I wonder if there is a replacement for this using only the headers shiped
with MINGW?
Any idea will be greatly appreciated.

Thanks in advance..
Javier




More information about the grass-dev mailing list