bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Gawk compile error Mingw32


From: Eli Zaretskii
Subject: Re: [bug-gawk] Gawk compile error Mingw32
Date: Fri, 08 Apr 2016 09:52:54 +0300

> From: address@hidden (Vincent Belaïche)
> Cc: address@hidden, address@hidden
> Date: Thu, 07 Apr 2016 23:05:30 +0200
> 
> > I fixed the WIF* problem in the repository (the patch is repeated
> > below).
> 
> Sorry, which repo is it, I did
> 
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> $ git pull
> >From git://git.savannah.gnu.org/gawk
>    1b5d1b8..82dec69  gawk-4.1-stable -> origin/gawk-4.1-stable
> Already up-to-date.

You are on master, but should be tracking gawk-4.1-stable instead.
That branch is the one from which the next Gawk release will be
delivered.

> > As for the usleep problem, you will have to look at the cpp
> > conditionals that guard its definition in gawkmisc.pc, and figure out
> > why they don't work in your case.  
> 
> What I did is run the preprocessor on the gawkmisc.c file as follows:
> 
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> gcc -std=gnu99 -DDEFPATH='".:/usr/local/share/awk"' 
> -DDEFLIBPATH="\"/usr/local/lib/gawk\"" -DSHLIBEXT="\"dll"\" -DHAVE_CONFIG_H 
> -DGAWK -DLOCALEDIR='"/usr/local/share/locale"' -I.   -I/usr/local/include  -g 
> -O2 -DNDEBUG -MT gawkmisc.o -MD -MP -MF .deps/gawkmisc.Tpo -E -o gawkmisc.pc 
> gawkmisc.c
> --8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----
> 
> it is the same command line as the compilation one carried out by the
> makefile except for I replaced `-c' by `-E', and `-o gawkmisc.o' by `-o
> gawkmisc.pc'. The output gawkmisc.pc file is attached to this email.

The result of expansion shows that there should be no problem with
usleep in your build, because the definition of usleep in gawkmisc.pc
is skipped, as it should have been.

And if I look closer at the error message you reported earlier:

  In file included from gawkmisc.c:36:0:
  pc/gawkmisc.pc:588:1: error: conflicting types for 'usleep'
   usleep(unsigned int usec)
   ^

I see that the line number, 588, cited by the compiler, corresponds to
an outdated version of gawkmisc.pc, because in the current sources,
both on master and and gawk-4.1-stable, usleep's definition begins on
line 591, not 588.

So I conclude that you tried to build Gawk in a repository which has
old *.o files.  Please remove all *.o and *.exe files and try again.

> I don't even know how to get the runtime version.

Look in the _mingw.h header file.



reply via email to

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