[GRASS-dev] compilation issues with lex

Markus Neteler neteler at itc.it
Wed Aug 16 18:46:44 EDT 2006


Hi,

I have started to compile the well known software on
the new geodata blade of OSGeo nad encountered a few
problems:

cd lib/db/sqlp
make
gcc -I/mnt/home/neteler/software/grass6_cvs/dist.i686-pc-linux-gnu/include  -g -Wall -pedantic -Werror-implicit-function-declaration -fno-common    -fPIC    -DPACKAGE=\""grasslibs"\"     -DPACKAGE=\""grasslibs"\"  -I/mnt/home/neteler/software/grass6_cvs/dist.i686-pc-linux-gnu/include \
        -o OBJ.i686-pc-linux-gnu/lex.yy.o -c lex.yy.c
lex.l: In function 'yylex':
lex.l:76: error: implicit declaration of function 'strdup'
lex.l:76: warning: incompatible implicit declaration of built-in function 'strdup'
lex.l:99: warning: incompatible implicit declaration of built-in function 'strdup'
lex.l:108: warning: incompatible implicit declaration of built-in function 'strdup'
lex.l:117: warning: incompatible implicit declaration of built-in function 'strdup'
lex.l:156: warning: incompatible implicit declaration of built-in function 'strdup'
lex.l: In function 'yyerror':
lex.l:246: error: implicit declaration of function 'snprintf'
lex.l:246: warning: incompatible implicit declaration of built-in function 'snprintf'
make: *** [OBJ.i686-pc-linux-gnu/lex.yy.o] Error 1

[neteler at xblade11-2 sqlp]$ gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)

Subsequently the DB drivers won't compile.

Same thing in r.mapcalc:

cd raster/r.mapcalc
[neteler at xblade11-2 r.mapcalc]$ make
gcc -I/mnt/home/neteler/software/grass6_cvs/dist.i686-pc-linux-gnu/include  -g -Wall -pedantic -Werror-implicit-function-declaration -fno-common        -DPACKAGE=\""grassmods"\"  -I/mnt/home/neteler/software/grass6_cvs/dist.i686-pc-linux-gnu/include \
        -o OBJ.i686-pc-linux-gnu/lex.yy.o -c lex.yy.c
mapcalc.l: In function 'yylex':
mapcalc.l:134: error: implicit declaration of function 'strdup'
mapcalc.l:134: warning: incompatible implicit declaration of built-in function 'strdup'
mapcalc.l:140: warning: incompatible implicit declaration of built-in function 'strdup'
make: *** [OBJ.i686-pc-linux-gnu/lex.yy.o] Error 1

Help appreciated since I am not familiar with lex.

thanks,

 Markus




More information about the grass-dev mailing list