On Mon, Feb 06, 2012 at 02:34:12PM -0700, Clark J. Wang wrote:
> In file included from ../gnulib/lib/unistd.h:110:0,
> from ../gnulib/lib/stdlib.h:89,
> from lexgrog.c:22:
> ../gnulib/lib/getopt.h:196:8: error: redefinition of 'struct option'
> /usr/include/getopt.h:27:8: note: originally defined here
Assuming you're using GCC, could you find the compiler command used here
('make V=1'), replace '-c' with '-E -dD', drop the '-o lexgrog.o' or
similar, save the output to a file, and attach that file to an e-mail?
I'd like to see exactly what the preprocessor is doing with this.
Also, this will probably turn out to be a gnulib bug. If possible, it
would be helpful if you could try the latest pre-release, which uses an
updated version of gnulib which has a few changes that might be
relevant:
http://people.debian.org/~cjwatson/man-db/man-db-2.6.1-pre1.tar.gz
Same error with the pre-release:
In file included from ../gnulib/lib/unistd.h:121:0,
from ../gnulib/lib/stdlib.h:90,
from lexgrog.c:22:
../gnulib/lib/getopt.h:196:8: error: redefinition of ‘struct option’
/usr/include/getopt.h:27:8: note: originally defined here
../gnulib/lib/getopt.h:245:12: error: conflicting types for ‘getopt_long’
/usr/include/getopt.h:47:12: note: previous declaration of ‘getopt_long’ was here
../gnulib/lib/getopt.h:249:12: error: conflicting types for ‘getopt_long_only’
/usr/include/getopt.h:49:12: note: previous declaration of ‘getopt_long_only’ was here
In file included from lexgrog.l:34:0:
../config.h:1856:0: warning: "_FILE_OFFSET_BITS" redefined
/usr/include/sys/feature_tests.h:204:0: note: this is the location of the previous definition
lexgrog.c:4239:16: warning: ‘input’ defined but not used
make[3]: *** [lexgrog.o] Error 1
make[3]: Leaving directory `/root/tmp/man-db-2.6.1-pre1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/tmp/man-db-2.6.1-pre1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/tmp/man-db-2.6.1-pre1'
make: *** [all] Error 2
> > //IGNORE
> > When the string "//IGNORE" is appended to tocode,
> > characters that cannot be represented in the target
> > character set will be silently discarded.
Incidentally I notice that Oracle documents this as supported:
http://docs.oracle.com/cd/E23824_01/html/821-1465/iconv-open-3c.html
Nonetheless, I've at least now changed docs/INSTALL.quick to mention
that libiconv >= 1.8 is required on non-glibc systems.
--
Colin Watson [address@hidden]