bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] gawk 4.0.0 compile error when sigsegv is enabled (mingw32


From: Eli Zaretskii
Subject: Re: [bug-gawk] gawk 4.0.0 compile error when sigsegv is enabled (mingw32)
Date: Sun, 24 Jul 2011 02:03:18 -0400

> From: Allan J Mui <address@hidden>
> Cc: address@hidden
> Date: Sun, 24 Jul 2011 05:24:12 +0000
> 
> When I compile without libsigsegv enabled the build system works fine
> but when I try to enable libsigsegv by setting the attribute
> `HAVE_LIBSIGSEGV' to 1 (in config.h) I receive a compilation error as
> follows: 
> (MSYS shell output)...  
   ^^^^^^^^^^^^^^^^^
What does this mean, exactly?  Do you have the MSYS shell somewhere on
your PATH, or is that shell involved in some deeper way in the build
process?

Anyway, I suggest to try again after removing the MSYS shell from
PATH.  That shell should only be used for running the Unix configure
scripts, which isn't necessary in this case.  Using the MSYS shell in
any other situation might get you in trouble, because it assumes that
every command-line argument that starts with a slash is a file name,
and modifies such arguments to convert Unix-style file names to
Windows style.

I'm not saying this is necessarily the cause of your trouble, but
using MSYS tools for anything but running configure scripts might
cause you problems due to MSYS subtleties that are known to work well
only when running configure scripts.

> CC=mingw32-gcc-4.5.2 O=.o CF="-O2-gdwarf-2 -g3" OBJ=popen.o \ 
> LNK=LMINGW32 PLNK=PLMINGW32 DLNK=DLMINGW32\ 
> LF="-gdwarf-2 -g3" LF2=-lmsvcp60 LF3=-Ld:/sigsegv/lib LF4=-lsigsegv \
> LF5=-L/mingw/lib LF6=-lintl LF7=-Ld:/gnu/gnuwin32/lib LF8=-liconv.dll SP

It sounds like you changed more than just config.h, because the
original pc/Makefile does not have LF3, LF4, LF5, etc.  Please show
the full extent of the changes you made.

Please also tell where did you get the Windows port of libsigsegv.

> make[1]: Entering directory `/d/gnu-source/gawk-4.0.0'

Is this the MSYS Make or a MinGW Make?  Please use the latter, again
to make sure you are not being hit by some MSYS subtlety.

> mingw32-gcc-4.5.2 -c -O2 -gdwarf-2 -g3 -DGAWK -I.-Id:/sigsegv/include
                                                 ^^^^
> -DHAVE_CON FIG_H array.c mingw32-gcc-4.5.2 -c -O2 -gdwarf-2 -g3 -DGAWK
> -I.-Id:/sigsegv/include -DHAVE_CONFIG_H builtin.c
   ^^^^
Are these instances of lack of space between -I switches real, or are
they some artifact of copy/paste from the screen?  If the former, they
could well screw up your build.
 
> builtin.c: In function 'format_tree': 
> builtin.c:609:28: error: expected identifier or
> '(' before 'char' 
> builtin.c:709:2: error: 'need_format' undeclared
> (first use in this function) 
> builtin.c:709:2: note: each undeclared
> identifier is reported only once for each function it appears in
> builtin.c:725:3: error: 'have_prec' undeclared (first use in this
> function) builtin.c:729:29: error: expected expression before 'char'
> builtin.c:945:8: error: expected expression before 'char'
> builtin.c:959:10: error: expected identifier or '(' before '=' token
> make[1]: *** [builtin.o] Error 1 make[1]: Leaving directory
> `/d/gnu-source/gawk-4.0.0' make: *** [mingw32] Error 2

Line 609 is this:

        int lj, alt, big, bigbig, small, have_prec, need_format;

So something, perhaps in sigsegv.h, is probably redefining "bigbig" to
some string whose syntax bewilders the compiler.  Please show the
preprocessed form of this line and its surroundings.

Does the compilation work for you with the original sources and
config.h, without adding the libsigsegv stuff?

> I assume that building with libsigsegv is supported on mingw32.

I never tried such a build (in fact, I didn't even know libsigsegv is
available for MinGW).  So your assumption seems to be overly
optimistic ;-)



reply via email to

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