bug-wget
[Top][All Lists]
Advanced

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

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


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] getopt/'struct options' build error in 1.13.1
Date: Wed, 17 Aug 2011 16:29:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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 +0000
+++ src/Makefile.am     2011-08-17 14:15:58 +0000
@@ -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 <address@hidden> 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 <address@hidden> 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



reply via email to

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