[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [wdiff-bugs] Cygwin-bug#20070822T0857: cvs build error
From: |
Denver Gingerich |
Subject: |
Re: [wdiff-bugs] Cygwin-bug#20070822T0857: cvs build error |
Date: |
Mon, 10 Sep 2007 11:20:27 -0400 |
On 9/5/07, Jari Aalto <address@hidden> wrote:
> * Tue 2007-09-04 Denver Gingerich <denver AT ossguy.com> INBOX
> >> >> -- Other package information
> >> >> Info-Pkg-devel-tools: gcc 3.4.4-3, make 3.81-1, libtool 1.5b-2,
> >> >> automake 2-1
> >> >> Info-Pkg-lang: perl 5.8.8-4, python 2.5.1-2, ruby 1.8.6-1
> >> >
> >> I checked out from cvs and here are preliminary Cygwin results.
> >
> > Thanks for sending the results.
> >
> >> Do you have idea why intl library is not used. I can see that
> >> configure detects it, but the compile fails.
> >
> > No, I don't know why the intl library is not linking properly. I will
> > look into this further to see if it worked in wdiff 0.5g and I broke
> > it or if it was never used but should be.
>
> The $(LTLIBINTL) must be inlcuded in the linking phase. Patch included.
> But there is another error. See below.
>
> Jari
>
> -----------------------------------------------------------------------
>
> src/mdiff.c:
>
> 378 alloc_and_compile_regex (const char *string)
> 379 {
> 380 struct re_pattern_buffer *pattern; /* newly allocated structure */
> 381 const char *message; /* error message returned by regex.c
> */
> 382
> 383 pattern = (struct re_pattern_buffer *)
> 384 xmalloc (sizeof (struct re_pattern_buffer));
> 385 memset (pattern, 0, sizeof (struct re_pattern_buffer));
> 386
> 387 pattern->buffer = NULL;
> 388 pattern->allocated = 0;
> 389 #if 0
> 390 /* FIXME */
> 391 pattern->translate = ignore_case ? (char *) folded_chars : NULL;
> 392 #endif
> 393
>
> /build/build/wdiff/vc/wdiff-0.5+cvs20070823/src
> -I/usr/src/build/build/wdiff/vc/wdiff-0.5+cvs20070823/lib -g -O2 -MT
> writepipe.o -MD -MP -MF .deps/writepipe.Tpo -c -o writepipe.o writepipe.c
> mv -f .deps/writepipe.Tpo .deps/writepipe.Po
> ccache gcc -g -O2 -o wdiff.exe wdiff.o readpipe.o writepipe.o
> ../lib/libgnu.a -L/usr/lib -lintl -L/usr/lib -liconv
> ccache gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I..
> -I/usr/src/build/build/wdiff/vc/wdiff-0.5+cvs20070823/src
> -I/usr/src/build/build/wdiff/vc/wdiff-0.5+cvs20070823/lib -g -O2 -MT
> mdiff.o -MD -MP -MF .deps/mdiff.Tpo -c -o mdiff.o mdiff.c
> mdiff.c: In function `alloc_and_compile_regex':
> mdiff.c:384: error: invalid application of `sizeof' to incomplete type
> `re_pattern_buffer'
> mdiff.c:385: error: invalid application of `sizeof' to incomplete type
> `re_pattern_buffer'
> mdiff.c:387: error: dereferencing pointer to incomplete type
> mdiff.c:388: error: dereferencing pointer to incomplete type
> mdiff.c:394: error: dereferencing pointer to incomplete type
> mdiff.c:396: warning: assignment makes pointer from integer without a cast
> make[2]: *** [mdiff.o] Error 1
> make[2]: Leaving directory
> `/usr/src/build/build/wdiff/vc/wdiff/.build/build/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/build/build/wdiff/vc/wdiff/.build/build'
> make: *** [all] Error 2
What I suspect is that the compiler sees struct re_pattern_buffer as
an incomplete type because lib/regex.h was not included properly (it
contains the definition of struct re_pattern_buffer). Can you verify
that your lib/regex.h contains the definition of struct
re_pattern_buffer and that it's being included properly? The version
of lib/regex.h in CVS and in the latest pre-test should contain the
definition.
> -----------------------------------------------------------------------
>
> src/Makefile.in | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/Makefile.in b/src/Makefile.in
> index 96d7da0..7e77c34 100644
> --- a/src/Makefile.in
> +++ b/src/Makefile.in
> @@ -267,16 +267,16 @@ clean-noinstPROGRAMS:
> -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
> mdiff$(EXEEXT): $(mdiff_OBJECTS) $(mdiff_DEPENDENCIES)
> @rm -f mdiff$(EXEEXT)
> - $(LINK) $(mdiff_OBJECTS) $(mdiff_LDADD) $(LIBS)
> + $(LINK) $(mdiff_OBJECTS) $(mdiff_LDADD) $(LIBS) $(LTLIBINTL)
> unify$(EXEEXT): $(unify_OBJECTS) $(unify_DEPENDENCIES)
> @rm -f unify$(EXEEXT)
> - $(LINK) $(unify_OBJECTS) $(unify_LDADD) $(LIBS)
> + $(LINK) $(unify_OBJECTS) $(unify_LDADD) $(LIBS) $(LTLIBINTL)
> wdiff$(EXEEXT): $(wdiff_OBJECTS) $(wdiff_DEPENDENCIES)
> @rm -f wdiff$(EXEEXT)
> - $(LINK) $(wdiff_OBJECTS) $(wdiff_LDADD) $(LIBS)
> + $(LINK) $(wdiff_OBJECTS) $(wdiff_LDADD) $(LIBS) $(LTLIBINTL)
> wdiff2$(EXEEXT): $(wdiff2_OBJECTS) $(wdiff2_DEPENDENCIES)
> @rm -f wdiff2$(EXEEXT)
> - $(LINK) $(wdiff2_OBJECTS) $(wdiff2_LDADD) $(LIBS)
> + $(LINK) $(wdiff2_OBJECTS) $(wdiff2_LDADD) $(LIBS) $(LTLIBINTL)
>
> mostlyclean-compile:
> -rm -f *.$(OBJEXT)
Unfortunately I can't use this patch because it is applied to an
auto-generated file. Makefile.in is generated by Automake from
Makefile.am so you should investigate a way of modifying Makefile.am
so Automake will generate a Makefile.in similar to the one described
by your patch.
I will be removing the auto-generated files from CVS in the near
future so that it's more clear to people which files are
auto-generated.
Denver