bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in 'findutils-4.1'


From: Ral Nez de Arenas Coronado
Subject: Bug in 'findutils-4.1'
Date: Thu, 12 Oct 2000 13:34:54 +0200

    Hello everybody at prep.ai.mit.edu :)

    I've downloaded 'findutils-4.1' today and when I was trying to
compile it I got some error messages caused by a few misdeclarations
in three files.

    I configured the package with the following command line:

    ./configure --prefix=/user/local/findutils --enable-id-cache


    And the output of 'make' is:
--------
for subdir in lib find xargs locate doc testsuite; do \
  echo making all in $subdir ; \
  (cd $subdir; make all); \
done
making all in lib
make[1]: Entering directory `/user/NUEVO/findutils-4.1/lib'
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O regex.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O dirname.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O error.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O filemode.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O getopt.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O getopt1.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O idcache.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O listfile.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O modechange.c
gcc -c -DHAVE_CONFIG_H -I.. -I.  -g -O nextelem.c
nextelem.c:35: macro `strdup' used without args
make[1]: *** [nextelem.o] Error 1
make[1]: Leaving directory `/user/NUEVO/findutils-4.1/lib'
making all in find
make[1]: Entering directory `/user/NUEVO/findutils-4.1/find'
gcc -c -DHAVE_CONFIG_H -I.. -I../lib  -g -O find.c
find.c: In function `main':
find.c:136: warning: return type of `main' is not `int'
gcc -c -DHAVE_CONFIG_H -I.. -I../lib  -g -O fstype.c
fstype.c:33: macro `strdup' used without args
fstype.c:34: macro `strstr' used without args
make[1]: *** [fstype.o] Error 1
make[1]: Leaving directory `/user/NUEVO/findutils-4.1/find'
making all in xargs
make[1]: Entering directory `/user/NUEVO/findutils-4.1/xargs'
gcc -c -DHAVE_CONFIG_H -I.. -I../lib  -g -O xargs.c
xargs.c:63: macro `strstr' used without args
xargs.c:64: macro `strdup' used without args
make[1]: *** [xargs.o] Error 1
make[1]: Leaving directory `/user/NUEVO/findutils-4.1/xargs'
making all in locate
make[1]: Entering directory `/user/NUEVO/findutils-4.1/locate'
gcc -c -DHAVE_CONFIG_H -I.. -I../lib 
-DLOCATE_DB=\"/user/local/findutils/var/locatedb\"  -g -O locate.c
locate.c: In function `main':
locate.c:360: warning: return type of `main' is not `int'
gcc -c -DHAVE_CONFIG_H -I.. -I../lib 
-DLOCATE_DB=\"/user/local/findutils/var/locatedb\"  -g -O ../find/version.c
make[1]: *** No rule to make target `../lib/libfind.a', needed by `locate'.  
Stop.
make[1]: Leaving directory `/user/NUEVO/findutils-4.1/locate'
making all in doc
make[1]: Entering directory `/user/NUEVO/findutils-4.1/doc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/user/NUEVO/findutils-4.1/doc'
making all in testsuite
make[1]: Entering directory `/user/NUEVO/findutils-4.1/testsuite'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/user/NUEVO/findutils-4.1/testsuite'
----

    The errors with 'strdup' and 'strstr' are caused because instead
of #include'ing the proper headers, the author simply declares an
empty (although compatible) prototype for these functions, but since
they are implemented as macros, they are expanded instead of declared
at the error lines.

    The solution is quite simple: remove these declarations.

    Moreover, the return type of 'main' must be 'int', and locate.c
doesn't do this way. You should change it too.

    Since I'm not familiar with autoconf I'd better do not send
uncompleted or badly-formed patches. If you want me to send you the
patches for the source files I'll do it, but I don't know if any
modifications would be necessary to the configure.in stuff, since
'strdup' is not an ANSI C standard function :?

    Thanks a lot for 'findutils'. I use them almost everyday for
cleaning up and administering my file system. Good work.

    Raúl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]