[Gross] compilation error: ../include/utils.h:42: error: conflicting types for 'getline'

Eino Tuominen eino at utu.fi
Tue Nov 24 08:53:36 EET 2009


Marcin Mirosław wrote:
> Hello
> While trying to compile gross-1.0.2 i'm getting this error:
>  i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include
> -D_REENTRANT -I/usr/local/include -O2 -march=prescott -mtune=native
> -mfpmath=sse -pipe -fpeel-loops -fprefetch-loop-arrays -ftracer
> -freorder-blocks-and-partition -MT proto_sjsms.lo -MD -MP -MF
> .deps/proto_sjsms.Tpo -c proto_sjsms.c -o proto_sjsms.o >/dev/null 2>&1
> mv -f .deps/proto_sjsms.Tpo .deps/proto_sjsms.Plo
> /bin/sh ../libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc  -O2
> -march=prescott -mtune=native -mfpmath=sse -pipe -fpeel-loops
> -fprefetch-loop-arrays -ftracer -freorder-blocks-and-partition -module
> -avoid-version -XCClinker -static-libgcc -Wl,-O1 -L/usr/local/lib -o
> grosscheck.la -rpath /usr/lib grosscheck.lo proto_sjsms.lo  -lcares
> -lnsl -lm -lrt  -lpthread
> i686-pc-linux-gnu-gcc -shared  .libs/grosscheck.o .libs/proto_sjsms.o
> -L/usr/local/lib /usr/lib/libcares.so -lnsl -lm -lrt -lpthread
> -march=prescott -mtune=native -mfpmath=sse -static-libgcc -Wl,-O1
> -Wl,-soname -Wl,grosscheck.so -o .libs/grosscheck.so
> i686-pc-linux-gnu-ar cru .libs/grosscheck.a  grosscheck.o proto_sjsms.o
> i686-pc-linux-gnu-ranlib .libs/grosscheck.a
> creating grosscheck.la
> (cd .libs && rm -f grosscheck.la && ln -s ../grosscheck.la grosscheck.la)
> i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include -D_REENTRANT
> -I/usr/local/include  -O2 -march=prescott -mtune=native -mfpmath=sse
> -pipe -fpeel-loops -fprefetch-loop-arrays -ftracer
> -freorder-blocks-and-partition -MT gclient.o -MD -MP -MF
> .deps/gclient.Tpo -c -o gclient.o gclient.c
> mv -f .deps/gclient.Tpo .deps/gclient.Po
> i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include -D_REENTRANT
> -I/usr/local/include  -O2 -march=prescott -mtune=native -mfpmath=sse
> -pipe -fpeel-loops -fprefetch-loop-arrays -ftracer
> -freorder-blocks-and-partition -MT utils.o -MD -MP -MF .deps/utils.Tpo
> -c -o utils.o utils.c
> In file included from utils.c:23:
> ../include/utils.h:42: error: conflicting types for 'getline'
> /usr/include/stdio.h:651: note: previous declaration of 'getline' was here
> make[2]: *** [utils.o] Error 1
> make[2]: Leaving directory
> `/var/tmp/portage/mail-filter/gross-1.0.2/work/gross-1.0.2/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/var/tmp/portage/mail-filter/gross-1.0.2/work/gross-1.0.2'
> make: *** [all] Error 2

Hello,

Please tell something about your environment, like uname -a, Linux 
distribution, compiler version etc.

After a quick look at the sources there seems to be a bug in 
include/utils.h. There's a declaration for getline() function, but the 
function is not defined anywhere in the source files. Try to delete the 
line in include/utils.h:

int getline(int fd, char *line, size_t maxlen);

-- 
   Eino Tuominen




More information about the Gross mailing list