bug-gnulib
[Top][All Lists]
Advanced

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

Re: getopt compilation failure on Darwin (gzip 1.3.13)


From: Eric Blake
Subject: Re: getopt compilation failure on Darwin (gzip 1.3.13)
Date: Tue, 6 Oct 2009 17:04:08 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Ludovic Courtès <ludo <at> gnu.org> writes:

> GNU zip 1.3.13 fails to build on Darwin:
> 
> --8<---------------cut here---------------start------------->8---
> gcc -std=gnu99 -DHAVE_CONFIG_H -I.     -g -O2 -c getopt.c
> In file included from ./getopt.h:28,
>                  from getopt.h:28,
>                  from getopt.c:26:
> /usr/include/getopt.h:54: error: redefinition of 'struct rpl_option'
> /usr/include/getopt.h:70: error: conflicting types for 'rpl_getopt_long'
> ./getopt.h:227: error: previous declaration of 'rpl_getopt_long' was here

Yep - a gnulib problem.  Unfortunately, gzip 1.3.13 postdates commit 35cea22, 
where I already tackled the same issue for glibc.

This is a sign that our #include_next of darwin's <getopt.h> worked, but that 
darwin's header recursively includes some other header that calls back to our 
<getopt.h>, prior to the completion of the first use of the system's 
<getopt.h>.  It is generally fixable by teaching gnulib what preprocessor 
guards darwin was using during that recursion, but I'll need to see the darwin 
getopt.h before I can prepare a fix.  gcc -E output might be helpful as well, 
as it would pinpoint what files are involved in the loop.  I think I can get 
access to a darwin machine later today to try and reproduce/fix the issue.

-- 
Eric Blake






reply via email to

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