[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Beta release of gawk 3.1.6 now available - MinGW build [long]
From: |
Manuel Collado |
Subject: |
Re: Beta release of gawk 3.1.6 now available - MinGW build [long] |
Date: |
Sun, 03 Jun 2007 19:02:42 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
Eli Zaretskii escribió:
Date: Fri, 01 Jun 2007 10:11:57 +0200
...
The ``official'' way to build Gawk with MinGW is described in
README_d/README.pc in the Gawk distribution.
--------------------------------
#if defined(__MINGW32__)
#undef HAVE_ALLOCA
#define HAVE_TMPFILE 1
#define restrict /* nothing */
#endif
-------------------------------
??? Can you explain why you need to undef HAVE_TMPFILE and define away
`restrict'? You _are_ using GCC, right? If so, GCC supports both of
these features.
Please correct me if I'm wrong. To my knowledge, gcc is just a compiler.
It supports language-related features, like the 'restrict' keyword.
Support for features related to HAVE_ALLOCA or HAVE_TMPFILE are
supported by the underlying runtime (libc?), which is a separate
package/tool. Different platforms (DJGPP, MinGW, Cygwin,...) may have
the same compiler (the same version of gcc), but really different
runtime support.
...
Compilation of the distributed sources produced some error messages for
conditional code sections controled by these switches.
Please show those messages, it's possible that there is some bug or
maybe another solution might be better. Thanks in advance.
Below is a detailed step-by-step trace of my trial-and-error procedure
to build gawk on MinGW alone (now without MSYS), on Windows XP. It's a
looong post, but you have requested it :-)
Should I try a different line of action?
-----------------------------------------
Building gawk-3.1.5g (3.1.6beta) on MinGW
-----------------------------------------
2007-06-02, Windows XP
1.- Do a fresh MinGW manual install
- Download and uncompress
binutils-2.17.50-20060824-1.tar.gz
gcc-core-3.4.2-20040916-1.tar.gz
gcc-g++-3.4.2-20040916-1.tar.gz
mingw32-make-3.81-2.tar.gz
mingw-runtime-3.12.tar.gz
w32api-3.9.tar.gz
--- ( y Establecer path mínimo
---
PATH=c:\temp\mingw\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
)
2.- Copy files from ./pc to source's root, as stated, and invoke 'make
mingw32'
(Well, there is no 'make'. Just 'mingw32-make')
C:\Temp\mingw\bin>mingw32-make.exe --version
GNU Make 3.81
C:\Temp\gawk-3.1.5g>mingw32-make mingw32
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
mingw32-make all \
CC=gcc O=.o CF="-O2 -gdwarf-2 -g3" OBJ=popen.o \
LNK=LMINGW32 PLNK=PLMINGW32 LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP=
mingw32-make[1]: Entering directory `C:/Temp/gawk-3.1.5g'
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H array.c
In file included from array.c:43:
awk.h:230: error: syntax error before "buf"
awk.h:230: error: conflicting types for 'snprintf'
awk.h:230: note: a parameter list with an ellipsis can't match an empty
parameter name list declaration
awk.h:230: error: conflicting types for 'snprintf'
awk.h:230: note: a parameter list with an ellipsis can't match an empty
parameter name list declaration
mingw32-make[1]: *** [array.o] Error 1
mingw32-make[1]: Leaving directory `C:/Temp/gawk-3.1.5g'
mingw32-make: *** [mingw32] Error 2
3.- Add option -std=c99 in line 193 of Makefile (attempt to get support
for 'restrict')
C:\Temp\gawk-3.1.5g>mingw32-make mingw32
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
mingw32-make all \
CC=gcc O=.o CF="-O2 -gdwarf-2 -g3 -std=c99" OBJ=popen.o \
LNK=LMINGW32 PLNK=PLMINGW32 LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP=
mingw32-make[1]: Entering directory `C:/Temp/gawk-3.1.5g'
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
gcc -c -O2 -gdwarf-2 -g3 -std=c99 -DGAWK -I. -DHAVE_CONFIG_H array.c
gcc -c -O2 -gdwarf-2 -g3 -std=c99 -DGAWK -I. -DHAVE_CONFIG_H builtin.c
builtin.c: In function `do_system':
builtin.c:1701: warning: implicit declaration of function `fileno'
gcc -c -O2 -gdwarf-2 -g3 -std=c99 -DGAWK -I. -DHAVE_CONFIG_H eval.c
gcc -c -O2 -gdwarf-2 -g3 -std=c99 -DGAWK -I. -DHAVE_CONFIG_H field.c
gcc -c -O2 -gdwarf-2 -g3 -std=c99 -DGAWK -I. -DHAVE_CONFIG_H floatcomp.c
gcc -c -O2 -gdwarf-2 -g3 -std=c99 -DGAWK -I. -DHAVE_CONFIG_H gawkmisc.c
In file included from gawkmisc.c:49:
posix/gawkmisc.c: In function `optimal_bufsize':
posix/gawkmisc.c:136: error: structure has no member named `st_blksize'
posix/gawkmisc.c:136: error: structure has no member named `st_blksize'
posix/gawkmisc.c:140: error: structure has no member named `st_blksize'
posix/gawkmisc.c:140: error: structure has no member named `st_blksize'
posix/gawkmisc.c: In function `os_close_on_exec':
posix/gawkmisc.c:171: warning: implicit declaration of function `fcntl'
posix/gawkmisc.c:171: error: `F_SETFD' undeclared (first use in this
function)
posix/gawkmisc.c:171: error: (Each undeclared identifier is reported
only once
posix/gawkmisc.c:171: error: for each function it appears in.)
posix/gawkmisc.c: In function `os_is_setuid':
posix/gawkmisc.c:198: warning: implicit declaration of function `getuid'
posix/gawkmisc.c:199: warning: implicit declaration of function `geteuid'
mingw32-make[1]: *** [gawkmisc.o] Error 1
mingw32-make[1]: Leaving directory `C:/Temp/gawk-3.1.5g'
mingw32-make: *** [mingw32] Error 2
4.- Restore the original Makefile (from ./pc). Add '#define restrict
/*nothing*/' at the end of config.h and remake
C:\Temp\gawk-3.1.5g>mingw32-make mingw32
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
mingw32-make all \
CC=gcc O=.o CF="-O2 -gdwarf-2 -g3" OBJ=popen.o \
LNK=LMINGW32 PLNK=PLMINGW32 LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP=
mingw32-make[1]: Entering directory `C:/Temp/gawk-3.1.5g'
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H array.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H builtin.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H eval.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H field.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H floatcomp.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H gawkmisc.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H io.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H main.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H ext.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H msg.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H node.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H profile.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H re.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H replace.c
In file included from replace.c:83:
missing_d/snprintf.c:58:2: #error Neither mkstemp() nor tmpfile() is
available on this platform.
In file included from replace.c:83:
missing_d/snprintf.c: In function `vsnprintf':
missing_d/snprintf.c:82: warning: assignment makes pointer from integer
without a cast
mingw32-make[1]: *** [replace.o] Error 1
mingw32-make[1]: Leaving directory `C:/Temp/gawk-3.1.5g'
mingw32-make: *** [mingw32] Error 2
5.- Add '#define HAVE_TMPFILE 1' at the end of config.h and remake
C:\Temp\gawk-3.1.5g>mingw32-make mingw32
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
mingw32-make all \
CC=gcc O=.o CF="-O2 -gdwarf-2 -g3" OBJ=popen.o \
LNK=LMINGW32 PLNK=PLMINGW32 LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP=
mingw32-make[1]: Entering directory `C:/Temp/gawk-3.1.5g'
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H array.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H builtin.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H eval.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H field.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H floatcomp.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H gawkmisc.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H io.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H main.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H ext.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H msg.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H node.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H profile.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H re.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H replace.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H version.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H awkgram.c
awkgram.y: In function `get_src_buf':
awkgram.y:1342: warning: assignment from incompatible pointer type
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H getid.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H popen.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H regex.c
In file included from regex.c:69:
regex_internal.h:442:22: alloca.h: No such file or directory
mingw32-make[1]: *** [regex.o] Error 1
mingw32-make[1]: Leaving directory `C:/Temp/gawk-3.1.5g'
mingw32-make: *** [mingw32] Error 2
6.- Add '#undef HAVE_ALLOCA' at the end of config.h and remake
C:\Temp\gawk-3.1.5g>mingw32-make mingw32
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
mingw32-make all \
CC=gcc O=.o CF="-O2 -gdwarf-2 -g3" OBJ=popen.o \
LNK=LMINGW32 PLNK=PLMINGW32 LF="-gdwarf-2 -g3" LF2=-lmsvcp60 RSP=
mingw32-make[1]: Entering directory `C:/Temp/gawk-3.1.5g'
makefile:434: warning: overriding commands for target `TAGS'
makefile:431: warning: ignoring old commands for target `TAGS'
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H array.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H builtin.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H eval.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H field.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H floatcomp.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H gawkmisc.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H io.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H main.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H ext.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H msg.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H node.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H profile.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H re.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H replace.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H version.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H awkgram.c
awkgram.y: In function `get_src_buf':
awkgram.y:1342: warning: assignment from incompatible pointer type
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H getid.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H popen.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H regex.c
gcc -gdwarf-2 -g3 -o gawk.exe array.o builtin.o eval.o field.o
floatcomp.o gawkmisc.o io.o main.o ext.o msg.o node.o pro
file.o re.o replace.o version.o awkgram.o getid.o popen.o getopt.o
getopt1.o dfa.o regex.o random.o -lmsvcp60
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H eval_p.c
gcc -c -O2 -gdwarf-2 -g3 -DGAWK -I. -DHAVE_CONFIG_H profile_p.c
echo array.o builtin.o eval_p.o field.o floatcomp.o gawkmisc.o io.o
main.o > pgawk.rsp
echo ext.o msg.o node.o profile_p.o re.o replace.o version.o >> pgawk.rsp
echo awkgram.o getid.o popen.o getopt.o getopt1.o dfa.o regex.o random.o
>> pgawk.rsp
gcc -gdwarf-2 -g3 -o pgawk.exe array.o builtin.o eval_p.o field.o
floatcomp.o gawkmisc.o io.o main.o ext.o msg.o node.o
profile_p.o re.o replace.o version.o getopt.o getopt1.o dfa.o regex.o
random.o awkgram.o getid.o popen.o -lmsvcp60
mingw32-make[1]: Leaving directory `C:/Temp/gawk-3.1.5g'
7.- Bingo!
C:\Temp\gawk-3.1.5g>dir *.exe
El volumen de la unidad C no tiene etiqueta.
El número de serie del volumen es: 7446-0F00
Directorio de C:\Temp\gawk-3.1.5g
02/06/2007 17:27 1.219.890 gawk.exe
02/06/2007 17:27 1.220.438 pgawk.exe
2 archivos 2.440.328 bytes
0 dirs 45.228.892.160 bytes libres
C:\Temp\gawk-3.1.5g>gawk --version
GNU Awk 3.1.5g
Copyright (C) 1989, 1991-2007 Free Software Foundation.
... <snip> ...
-----------------------------------------------------------------
Regards.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
- Re: Beta release of gawk 3.1.6 now available, Manuel Collado, 2007/06/01
- Re: Beta release of gawk 3.1.6 now available, Eli Zaretskii, 2007/06/01
- Message not available
- Re: Beta release of gawk 3.1.6 now available - MinGW build [long],
Manuel Collado <=
- Re: Beta release of gawk 3.1.6 now available - MinGW build [long], Eli Zaretskii, 2007/06/03
- Message not available
- Re: Beta release of gawk 3.1.6 now available - MinGW and DJGPP builds, Manuel Collado, 2007/06/05
- Re: Beta release of gawk 3.1.6 now available - MinGW and DJGPP builds, Eli Zaretskii, 2007/06/05
- Re: Beta release of gawk 3.1.6 now available - MinGW and DJGPP builds, Manuel Collado, 2007/06/06
- Re: Beta release of gawk 3.1.6 now available - MinGW and DJGPP builds, Eli Zaretskii, 2007/06/06