|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
getopt compilation failure on Darwin (gzip 1.3.13)Hello,
(Cc’ing ‘bug-gnulib’ as this looks like a Gnulib issue.) 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 /usr/include/getopt.h:72: error: conflicting types for 'rpl_getopt_long_only' ./getopt.h:231: error: previous declaration of 'rpl_getopt_long_only' was here make[3]: *** [getopt.o] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all] Error 2 make: *** [all-recursive] Error 1 --8<---------------cut here---------------end--------------->8--- Ideas? Thanks, Ludo’. |
|
|
|
|
|
Re: getopt compilation failure on Darwin (gzip 1.3.13)Hi Eric,
Eric Blake <ebb9@...> writes: > The circle was: > ./getopt.h did include_next <getopt.h> > <getopt.h> did include <unistd.h>, but found ./unistd.h > ./unistd.h did include_next <unistd.h> > <unistd.h> completed > ./unistd.h did include <getopt.h>, and found ./getopt.h > ./getopt.h declared things > ./unistd.h completed > <getopt.h> redeclared things > > The solution is to teach ./unistd.h to skip <getopt.h> if the system > <getopt.h> was the guy including unistd. That way, both the system > <getopt.h> and <unistd.h> can run to completion prior to ./getopt.h > declaring overrides. > > I will be pushing this, if further testing proves that it doesn't break > Linux or FreeBSD. Thanks for the quick reply and patch! It now builds properly on GNU/Linux, Darwin, and Cygwin in NixOS/Nixpkgs (see latest builds at http://hydra.nixos.org/job/nixpkgs/stdenv/gzip/all). Ludo’. |
| Free embeddable forum powered by Nabble | Forum Help |