Configuring and compiling GCC for Windows machine

Mark Butcher M_J_BUTCHER@compuserve.com
Tue May 21 07:50:00 GMT 2002


Hi All / Oscar

>> 6. Downloaded cygwin and installed it so that the cygwin bash shell runs
>> 7. Downloaded a binary version of the compiler MinGW going through the
same
>> procedured of decompiling and extracting. I set up the path of the
compiler
>> in my Windows Autoexec.bat and can successfully test the compiler in a
dos
>> shell with gcc -v. In cygwin bash shell there is the save positive
>> response.

>Why don't you download the complete Cygwin package, including it's
>gcc?

As far as I was aware I did download the full package - it is about 6Meg.
Any way I used the MinGW compiler which should be just as good.

>[snip]

>> b. There are error messages because "sed" and "cat" are not found

>AFAIK, 'sed' is required, and most likely 'cat' is required too.

=================================================
In the installation guide it says that one must have a native compiler to
compile gcc. This I now have. The installation doesn't mention having to
have also other utilities to work. Presently I don't know what sed and cat
are and am not sure whether this is a complete list of missing utilities
since I just happened to see these. I will see whether I can find something
to install and get a little further.
=================================================

>[snip]

>> I wonder whether it would be an idea to make a step by step guide for a
>> typical compiler build for a Windows Newbee ?

>Do you really want to build gcc yourself. MinGW has a pre-built gcc
>3.1 available. It's labeled as beta, but the true is that it works
>quite ok. You will find help for whatever problem appears on the
>mingw-users mailings list.

>In any case, gcc 3.0.4 builds correctly in a complete Cygwin
>environment. gcc 3.1 buidls too in a MSYS environment (see MinGW
>mailing page for MSYS).

>> If someone could help me complete the job I would be more than
>> willing to contribute it based on the steps I have so far
>> documented. With such a guide I could probably already have saved a
>> couple of days of frustration....

>Just get MinGW.

=================================================
I think I must explain the plan in a little more detail. My goal is to
evaluate several microprocessors and a common compiler is a good solution.
Therefore I decided as first step to use MinGW to compile the latest
version of gcc as a native compiler (the comiler used to build the compiler
should not be the issue here). After this I would like to use the newest
version of the gcc native compiler to build several cross-compilers. This
is why I am making it hard for myself.

If there is anyone who can quickly give a couple of concrete tips I would
be more that grateful:
1. How can I configure cygwin to print all messages during an attempled
configuration/build to a file so that I can see exactly what is going wrong
?
2. Is there a list of utilities needed for gcc configuration / build on
Windows machine ?

=================================================

>-- 
>Oscar



Best regards

Mark Butcher






Original Message
==============

Hallo All

I hoped that I wouldn't be sending in a begging request for someone to help
out a Windows user configure and compile gcc-3.0.4, but the fact is that
after a week of downloading, studying documents and reading through user
group communications and then frustrating hours to trying just about
anything in desperation I am willing to go down on bended knees to anyone
with a few words of comfort and the one or two, probably simple and
obvious, tips I am yearning for.

Here's what I have done so far:

1. Downloaded gcc-3.0.4.tar.gz
2. Downloaded gz124src.zip and extracted gzip.exe with WinZip
3. Using gzip - d gcc-3.0.4.tar.gz extracted gcc-3.0.4.tar
4. Downloaded tar-1.12.msdos.exe to extract the archived files from
gcc-3.0.4.tar
5. Using tar -xvf gcc-3.0.4.tar extracted the gcc archive
6. Downloaded cygwin and installed it so that the cygwin bash shell runs
7. Downloaded a binary version of the compiler MinGW going through the same
procedured of decompiling and extracting. I set up the path of the compiler
in my Windows Autoexec.bat and can successfully test the compiler in a dos
shell with gcc -v. In cygwin bash shell there is the save positive
response.
8. In cygwin shell I have created a directory at c:/gcc/gccwin and the gcc
source is at c:/gcc/gcc-3.0.4 and I have gone to the gccwin directory.
9. I try to configure and compile using c:/gcc/gcc-3.0.4/configure (using
no options because I don't presently understand what the possibilities mean
and hope that the defaults are ok and using no target since the first job
is to compile a native compiler).
10. There is quite a lot of activity and I see that the the compile is
configured for "i686-pc-cygwin". Then there are a lot of checking messages.
In a status file I have found this line "c:/gcc/gcc-3.0.4/configure
--with-gcc-version-trigger=/cygdrive/c/gcc/gcc-3.0.4/gcc/version.c
--host=i686-pc-cygwin --norecursion 
# using "mh-frag""
11. Unfortunately I don't know how to direct the information to an output
file but have noticed the following:
a. it seems as though the gcc compiler is being used and it recognises it
as a GNU compiler
b. There are error messages because "sed" and "cat" are not found
c. Just before the build fails, the following lines are seen
-- checking whether build environment is sane... yes
-- checking whether make sets ${MAKE}... eval1: syntax error: unterminated
quoted string
-- configure in /cygdrive/c/gcc/gccwin/zlib failed, exiting.

As you are probably aware, the procedure is quite cryptic for a poor
Windows user and I don't know where to start to solve such problems. Have I
done anything basically wrong ? What could be the next step ?

I wonder whether it would be an idea to make a step by step guide for a
typical compiler build for a Windows Newbee ? If someone could help me
complete the job I would be more than willing to contribute it based on the
steps I have so far documented. With such a guide I could probably already
have saved a couple of days of frustration....

Regards

Mark Butcher
Switzerland



More information about the Gcc-help mailing list