Task: build an ix86-Windows-targetted gcj (java) compiler linked to the
mingw32 run-time libraries.
(Why? because I want open source version with some non-standard options - eg
I am a windows programmer with very little UNIX experience. I want to USE
the compiler for Java code development - building it was supposed to be the
easy bit; so far (after nearly three weeks struggle), I have not yet
download and install MinGW and MSYS (current version) - now I have a minimal
download the required sources (3.4.1 versions): gcc-core; gcc-g++; gcc-java;
unpack under /gcc-3.4.1
download the build script (gcc-3.4.1-build.sh). Where do I put it? Internal
evidence suggests in a build directory under the top source directory, so
put it in:
edit script to select only java (I'll worry about the other flags once I've
got a basic rebuid working!)
(msys shell, in build directory:) ./gcc-3.4.1-build.sh
*** fails: no bison, no flex
download bison-1.875 from FSF site; unzip; ./configure; make
*** fails: in subpipe.c, can't resolve refs to "pipe"; "fork"
download flex-2.5.4a from FSF site; unzip; ./configure; make
*** fails: can't find "yacc" command (presumably because bison is not
getting out of my depth, so...
download and install cygwin, selecting components according to John Murga's
excellent (but now obsolete) procedure
follow FAQ advice re inserting mingw32 binaries in cygwin search path
(mounted mingw root as /mingw; modified cywin's /etc/profile to prepend
/mingw/bin to PATH)
under cywin shell, return to my build directory, and try the script again.
*** fails: can't find standard headers (stdio.h; sys/types.h; errno.h;
string.h; stdlib.h; unistd.h).
Mingw has its own versions of these (in /include above the mingw root),
which I assume are required.
I don't DARE meddle with the configure script (4500+ lines of inscrutible
text substitutions) or the makefile (24,000+ lines of the same!), so try:
copy the mingw/include files into the /include directory under the build
source directory (ie /gcc-3.4.1/include)
(of course, this may mess up some implicit search order, but I'm getting
try the build script again!
*** fails: "c:\mingw32\bin\ld.exe: cannot open crt2.o: no such file or
directory" (following stage1/xgcc.exe .... -o genmodes.exe ...)
crt2.o IS there (in /mingw32/lib) but is presumably not on an accessable
I now feel I'm just digging myself in deeper! There MUST(?) be a better way.
Any ideas? HELP!
(I note that the response from <akovalev> to the thread <I have a problem
when compile gcc 3.4.1> mentions patches that may fix the bison and flex
build problems in mingw. If anyone could publish appropriate patches I could
try to proceed with attempt 1).
Fred (I.C.) Vanner
Thales (Wells, UK)
Tel: (+44) 1749 682581
Thales Defence (Wells) DISCLAIMER: The information in this message is
confidential and may be legally privileged. It is intended solely for the
addressee. Access to this message by anyone else is unauthorised. If you
are not the intended recipient, any disclosure, copying, or distribution of
the message, or any action or omission taken by you in reliance on it, is
prohibited and may be unlawful. Please immediately contact the sender if
you have received this message in error. Thank you.