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.
$ gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I../include -I../gnulib/lib -I../gnulib/lib -I../lib -I../libdb -DCONFIG_FILE=\"/usr/local/man-db-2.6.0.2/etc/man_db.conf\" -DAPROPOS=\"/usr/local/man-db-2.6.0.2/bin/apropos\" -DAPROPOS_NAME=\"apropos\" -DMAN=\"/usr/local/man-db-2.6.0.2/bin/man\" -DMANCONV=\"/usr/local/man-db-2.6.0.2/libexec/man-db/manconv\" -DMANDB=\"/usr/local/man-db-2.6.0.2/bin/mandb\" -DSOELIM=\"/usr/local/man-db-2.6.0.2/bin/zsoelim\" -DWHATIS=\"/usr/local/man-db-2.6.0.2/bin/whatis\" -I/usr/local/libpipeline-1.2/include -D_REENTRANT -I/usr/local/libiconv-1.14/include -I/usr/local/libiconv-1.14/include -Wall -W -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wshadow -Wformat-security -Wredundant-decls -Wno-missing-field-initializers -MT lexgrog.o -MD -MP -MF .deps/lexgrog.Tpo -E -dD lexgrog.c > lexgrog.gccE
In file included from lexgrog.l:34:0:
../config.h:1744:0: warning: "_FILE_OFFSET_BITS" redefined
/usr/include/sys/feature_tests.h:204:0: note: this is the location of the previous definition
$
The file lexgrog.gccE attached.
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
> > //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]