Re: [Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-18 Thread Jack Nagel
Works here. Thanks!

Jack



[Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-17 Thread Jack Nagel
I have encountered an issue building wget 1.13.1 on Mac OS X 10.6.8.
It fails during 'make' with gcc 4.2 here:

/usr/bin/cc -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\
   -DLOCALEDIR=\/usr/local/share/locale\ -I.  -I../lib -I../lib -c css.c
In file included from ../lib/unistd.h:113:0,
 from css.c:4738:
../lib/getopt.h:196:8: error: redefinition of 'struct option'
/usr/include/getopt.h:54:8: note: originally defined here
../lib/getopt.h:245:12: error: conflicting types for 'getopt_long'
/usr/include/getopt.h:69:5: note: previous declaration of 'getopt_long' was here
../lib/getopt.h:249:12: error: conflicting types for 'getopt_long_only'
/usr/include/getopt.h:71:5: note: previous declaration of
'getopt_long_only' was here

However, I can successfully build wget 1.13 on the same system under
the same conditions. (Please CC as I am not subscribed to the list).

Thanks in advance for the help.

Jack



Re: [Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-17 Thread Giuseppe Scrivano
ops...

Thanks to have reported it.  I am sure it depends from a fix for a
similar error Perry had on AIX.

At this point, it seems the only way to fix the problem is to include
config.h at the very beginning of css.c.  I have looked at the flex
documentation but I can't find anything useful to prevent other files to
be included before the C code snippet.

Has anybody an idea?  Should I go for an hack?

Cheers,
Giuseppe



Jack Nagel jackna...@gmail.com writes:

 I have encountered an issue building wget 1.13.1 on Mac OS X 10.6.8.
 It fails during 'make' with gcc 4.2 here:

 /usr/bin/cc -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\
-DLOCALEDIR=\/usr/local/share/locale\ -I.  -I../lib -I../lib -c css.c
 In file included from ../lib/unistd.h:113:0,
  from css.c:4738:
 ../lib/getopt.h:196:8: error: redefinition of 'struct option'
 /usr/include/getopt.h:54:8: note: originally defined here
 ../lib/getopt.h:245:12: error: conflicting types for 'getopt_long'
 /usr/include/getopt.h:69:5: note: previous declaration of 'getopt_long' was 
 here
 ../lib/getopt.h:249:12: error: conflicting types for 'getopt_long_only'
 /usr/include/getopt.h:71:5: note: previous declaration of
 'getopt_long_only' was here

 However, I can successfully build wget 1.13 on the same system under
 the same conditions. (Please CC as I am not subscribed to the list).

 Thanks in advance for the help.

 Jack



Re: [Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-17 Thread Perry Smith
I thought you were just going to remove the include of wget.h ?

On Aug 17, 2011, at 9:09 AM, Giuseppe Scrivano wrote:

 ops...
 
 Thanks to have reported it.  I am sure it depends from a fix for a
 similar error Perry had on AIX.
 
 At this point, it seems the only way to fix the problem is to include
 config.h at the very beginning of css.c.  I have looked at the flex
 documentation but I can't find anything useful to prevent other files to
 be included before the C code snippet.
 
 Has anybody an idea?  Should I go for an hack?
 
 Cheers,
 Giuseppe
 
 
 
 Jack Nagel jackna...@gmail.com writes:
 
 I have encountered an issue building wget 1.13.1 on Mac OS X 10.6.8.
 It fails during 'make' with gcc 4.2 here:
 
 /usr/bin/cc -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\
   -DLOCALEDIR=\/usr/local/share/locale\ -I.  -I../lib -I../lib -c css.c
 In file included from ../lib/unistd.h:113:0,
 from css.c:4738:
 ../lib/getopt.h:196:8: error: redefinition of 'struct option'
 /usr/include/getopt.h:54:8: note: originally defined here
 ../lib/getopt.h:245:12: error: conflicting types for 'getopt_long'
 /usr/include/getopt.h:69:5: note: previous declaration of 'getopt_long' was 
 here
 ../lib/getopt.h:249:12: error: conflicting types for 'getopt_long_only'
 /usr/include/getopt.h:71:5: note: previous declaration of
 'getopt_long_only' was here
 
 However, I can successfully build wget 1.13 on the same system under
 the same conditions. (Please CC as I am not subscribed to the list).
 
 Thanks in advance for the help.
 
 Jack




Re: [Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-17 Thread Giuseppe Scrivano
Yes, but it seems to create another problem under Mac OS X 10.6.8.

In any case, this is the hack I was talking about, does it work for both
of you?

Thanks,
Giuseppe



=== modified file 'src/Makefile.am'
--- src/Makefile.am 2011-08-11 08:26:43 +
+++ src/Makefile.am 2011-08-17 14:15:58 +
@@ -39,9 +39,12 @@
 DEFS = @DEFS@ -DSYSTEM_WGETRC=\$(sysconfdir)/wgetrc\ 
-DLOCALEDIR=\$(localedir)\
 LIBS = @LIBICONV@ @LIBINTL@ @LIBS@ $(LIB_CLOCK_GETTIME)
 
+noinst_LIBRARIES = libcss.a
+libcss_a_SOURCES = css.l
+
 bin_PROGRAMS = wget
 wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c\
-  css.l css-url.c \
+  css_.c css-url.c \
   ftp-basic.c ftp-ls.c hash.c host.c html-parse.c html-url.c \
   http.c init.c log.c main.c netrc.c progress.c ptimer.c \
   recur.c res.c retr.c spider.c url.c\
@@ -57,6 +60,7 @@
 LDADD = $(LIBOBJS) ../lib/libgnu.a
 AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
 
+
 ../lib/libgnu.a:
cd ../lib  $(MAKE) $(AM_MAKEFLAGS)
 
@@ -78,6 +82,10 @@
$(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)';' \
| $(ESCAPEQUOTE)  $@
 
+css_.c: css.c
+   echo '#include wget.h'  $@
+   cat css.c  $@
+
 check_LIBRARIES = libunittest.a
 libunittest_a_SOURCES = $(wget_SOURCES) test.c build_info.c test.h
 nodist_libunittest_a_SOURCES = version.c



Perry Smith pedz...@gmail.com writes:

 I thought you were just going to remove the include of wget.h ?

 On Aug 17, 2011, at 9:09 AM, Giuseppe Scrivano wrote:

 ops...
 
 Thanks to have reported it.  I am sure it depends from a fix for a
 similar error Perry had on AIX.
 
 At this point, it seems the only way to fix the problem is to include
 config.h at the very beginning of css.c.  I have looked at the flex
 documentation but I can't find anything useful to prevent other files to
 be included before the C code snippet.
 
 Has anybody an idea?  Should I go for an hack?
 
 Cheers,
 Giuseppe
 
 
 
 Jack Nagel jackna...@gmail.com writes:
 
 I have encountered an issue building wget 1.13.1 on Mac OS X 10.6.8.
 It fails during 'make' with gcc 4.2 here:
 
 /usr/bin/cc -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\
   -DLOCALEDIR=\/usr/local/share/locale\ -I.  -I../lib -I../lib -c css.c
 In file included from ../lib/unistd.h:113:0,
 from css.c:4738:
 ../lib/getopt.h:196:8: error: redefinition of 'struct option'
 /usr/include/getopt.h:54:8: note: originally defined here
 ../lib/getopt.h:245:12: error: conflicting types for 'getopt_long'
 /usr/include/getopt.h:69:5: note: previous declaration of 'getopt_long' was 
 here
 ../lib/getopt.h:249:12: error: conflicting types for 'getopt_long_only'
 /usr/include/getopt.h:71:5: note: previous declaration of
 'getopt_long_only' was here
 
 However, I can successfully build wget 1.13 on the same system under
 the same conditions. (Please CC as I am not subscribed to the list).
 
 Thanks in advance for the help.
 
 Jack



Re: [Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-17 Thread Giuseppe Scrivano
to facilitate the testing, I have uploaded a tarball here:

http://it.gnu.org/~gscrivano/files/wget-1.13.1-dirty.tar.bz2

a263e18bc121d6195b1cf7c78b0ff0ba62ac09c3  wget-1.13.1-dirty.tar.bz2
2ee94ef1011dfea2c98615df0d59b7d1  wget-1.13.1-dirty.tar.bz2

Thanks,
Giuseppe



Perry Smith pedz...@gmail.com writes:

 Do I need all the autoconf stuff for this?  I made the change but the 
 Makefile didn't reflect the changes.

 On Aug 17, 2011, at 9:29 AM, Giuseppe Scrivano wrote:

 Yes, but it seems to create another problem under Mac OS X 10.6.8.
 
 In any case, this is the hack I was talking about, does it work for both
 of you?
 
 Thanks,
 Giuseppe
 
 
 
 === modified file 'src/Makefile.am'
 --- src/Makefile.am  2011-08-11 08:26:43 +
 +++ src/Makefile.am  2011-08-17 14:15:58 +
 @@ -39,9 +39,12 @@
 DEFS = @DEFS@ -DSYSTEM_WGETRC=\$(sysconfdir)/wgetrc\ 
 -DLOCALEDIR=\$(localedir)\
 LIBS = @LIBICONV@ @LIBINTL@ @LIBS@ $(LIB_CLOCK_GETTIME)
 
 +noinst_LIBRARIES = libcss.a
 +libcss_a_SOURCES = css.l
 +
 bin_PROGRAMS = wget
 wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c
   \
 -   css.l css-url.c \
 +   css_.c css-url.c \
 ftp-basic.c ftp-ls.c hash.c host.c html-parse.c html-url.c \
 http.c init.c log.c main.c netrc.c progress.c ptimer.c \
 recur.c res.c retr.c spider.c url.c\
 @@ -57,6 +60,7 @@
 LDADD = $(LIBOBJS) ../lib/libgnu.a
 AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
 
 +
 ../lib/libgnu.a:
  cd ../lib  $(MAKE) $(AM_MAKEFLAGS)
 
 @@ -78,6 +82,10 @@
  $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)';' \
  | $(ESCAPEQUOTE)  $@
 
 +css_.c: css.c
 +echo '#include wget.h'  $@
 +cat css.c  $@
 +
 check_LIBRARIES = libunittest.a
 libunittest_a_SOURCES = $(wget_SOURCES) test.c build_info.c test.h
 nodist_libunittest_a_SOURCES = version.c
 
 
 
 Perry Smith pedz...@gmail.com writes:
 
 I thought you were just going to remove the include of wget.h ?
 
 On Aug 17, 2011, at 9:09 AM, Giuseppe Scrivano wrote:
 
 ops...
 
 Thanks to have reported it.  I am sure it depends from a fix for a
 similar error Perry had on AIX.
 
 At this point, it seems the only way to fix the problem is to include
 config.h at the very beginning of css.c.  I have looked at the flex
 documentation but I can't find anything useful to prevent other files to
 be included before the C code snippet.
 
 Has anybody an idea?  Should I go for an hack?
 
 Cheers,
 Giuseppe
 
 
 
 Jack Nagel jackna...@gmail.com writes:
 
 I have encountered an issue building wget 1.13.1 on Mac OS X 10.6.8.
 It fails during 'make' with gcc 4.2 here:
 
 /usr/bin/cc -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\/usr/local/etc/wgetrc\
  -DLOCALEDIR=\/usr/local/share/locale\ -I.  -I../lib -I../lib -c css.c
 In file included from ../lib/unistd.h:113:0,
from css.c:4738:
 ../lib/getopt.h:196:8: error: redefinition of 'struct option'
 /usr/include/getopt.h:54:8: note: originally defined here
 ../lib/getopt.h:245:12: error: conflicting types for 'getopt_long'
 /usr/include/getopt.h:69:5: note: previous declaration of 'getopt_long' 
 was here
 ../lib/getopt.h:249:12: error: conflicting types for 'getopt_long_only'
 /usr/include/getopt.h:71:5: note: previous declaration of
 'getopt_long_only' was here
 
 However, I can successfully build wget 1.13 on the same system under
 the same conditions. (Please CC as I am not subscribed to the list).
 
 Thanks in advance for the help.
 
 Jack



Re: [Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-17 Thread Jack Nagel
On Wed, Aug 17, 2011 at 2:52 PM, Giuseppe Scrivano gscriv...@gnu.org wrote:
 to facilitate the testing, I have uploaded a tarball here:

 http://it.gnu.org/~gscrivano/files/wget-1.13.1-dirty.tar.bz2

I have the same build error with this version.

Jack



Re: [Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-17 Thread Perry Smith

On Aug 17, 2011, at 6:20 PM, Jack Nagel wrote:

 On Wed, Aug 17, 2011 at 2:52 PM, Giuseppe Scrivano gscriv...@gnu.org wrote:
 to facilitate the testing, I have uploaded a tarball here:
 
 http://it.gnu.org/~gscrivano/files/wget-1.13.1-dirty.tar.bz2
 
 I have the same build error with this version.

Bummer... this version is working for me on AIX 6.1  I built it without-ssl and 
also with-ssl=openssl

pedz




Re: [Bug-wget] getopt/'struct options' build error in 1.13.1

2011-08-17 Thread Jack Nagel
On Wed, Aug 17, 2011 at 6:20 PM, Jack Nagel jackna...@gmail.com wrote:
 I have the same build error with this version.

(And let me know if I can provide any relevant/helpful information).

Jack