[GRASS5] 5.1 compilation with gcc3.2.2: dbmi compilation error: sys_nerr/strerror

Glynn Clements glynn.clements at virgin.net
Thu Apr 3 22:51:13 EST 2003


Markus Neteler wrote:

> Yesterday I have tried to complile 5.1 on Mandrake 9.1.
> 
> With gcc version 3.2.2 the following problem appears in dbmi:
> 
> /home/neteler/grass51/include/gis.h:36: warning: `GRASS_copyright' defined but not used
> gcc  -L/home/neteler/grass51/dist.i686-pc-linux-gnu/lib   -o /home/neteler/grass51/dist.i686-pc-linux-gnu/etc/form/form OBJ.i686-pc-linux-gnu/form.o /home/netel                er/grass51/dist.i686-pc-linux-gnu/lib/libdbmi.a  /home/neteler/grass51/dist.i686                /home/neteler/grass51/dist.i686-pc-linux-gnu/lib/libdbmi.a(error.o)(.text+0x15e)                : In function `db_syserror':
> /home/neteler/grass51/lib/db/dbmi/error.c:121: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
> /home/neteler/grass51/dist.i686-pc-linux-gnu/lib/libdbmi.a(error.o)(.text+0x12c):/home/neteler/grass51/lib/db/dbmi/error.c:114: undefined reference to `errno'
> /home/neteler/grass51/dist.i686-pc-linux-gnu/lib/libdbmi.a(error.o)(.text+0x168):/home/neteler/grass51/lib/db/dbmi/error.c:128: undefined reference to `errno'
> /home/neteler/grass51/dist.i686-pc-linux-gnu/lib/libdbmi.a(error.o)(.text+0x1c4):/home/neteler/grass51/lib/db/dbmi/error.c:118: undefined reference to `errno'
> /home/neteler/grass51/dist.i686-pc-linux-gnu/lib/libdbmi.a(error.o)(.text+0x2aa): In function `db_clear_error':
> /home/neteler/grass51/lib/db/dbmi/error.c:202: undefined reference to `errno'
> collect2: ld returned 1 exit status
> make[2]: *** [/home/neteler/grass51/dist.i686-pc-linux-gnu/etc/form/form] Fehler 1
> make[2]: Leaving directory `/home/neteler/grass51/lib/form'
> make[1]: *** [subdirs] Fehler 1
> make[1]: Leaving directory `/home/neteler/grass51/lib'
> make: *** [default] Fehler 1
> 
> How can we fix this?

I've committed the obvious fix (i.e. stick to the standards). If there
are any problems with this, then we'll need configure checks.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list