This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Configuring and Compiling GCC for Windows


Hi All

I have been trying to build gcc for almost three weeks now. During this
time I have learned a lot about a number of things - shells, GNU utilities
and others which are needed.

I believe that I understand why after this time I am still not past the
second step in the process (configuring, not yet actually to the building
step). The problem I have is very probably a setup issue (don't know for
sure whether Windows or cygwin - but probably cygwin).

The issue is that I need to tell cygwin where to find the native compiler
so that it can work and I have been using the traditional technique of
adding a path in my autoexec.bat file like this

SET PATH=C:\MINGW\BIN

When I do this I can type in gcc -v in the cygwin shell and the compiler
details are correctly displayed (without the path entry cygwin can not find
it)


I check the environment variables in the cygwin shell with the SET command
and see the following entry:

PATH='/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS:
/cygdrive/c/WINDOWS/COMMAND:/cygdrive/c/MINGW/BIN'


The configuration fails with the message that there is a syntax error in a
make file which has just been created and checked, with the following
details:

checking whether make sets ${MAKE}... eval1: syntax error: unterminated
quoted string
configure in /cygdrive/c/objdir/zlib failed, exiting.

I run the make file in the gcc subdirectory, which is being tested and it
runs, giving the following details:

MAKE FILE CONTENTS
all:
         @echo 'ac_maketemp="$(MAKE)"'

EXECUTION RESPONSE
ac_maketemp=\c:/MINGW/BIN/MAKE.EXE"




So, somewhere along the line $(MAKE) has been substituted by 

\c:/MINGW/BIN/MAKE.EXE"

which is a bit of a DOS / Unix path convention mix along with a terminating
quote. Since this substitution is not valid, the configuration aborts.



In the meantime I have tested a number of possibilities to try to tell
cygwin where the compiler is, without setting the path, but as of yet
without any success. I have attempted to set the CC environment variable as
is instructed in the configuration details but, while I seem to be able to
achieve this, it can not be the correct solution since there are then other
error messages saying that the compiler has been found but doesn't work. I
know that it works because I can compile with it and the compiled
programmes run.


I know that I must be making some beginners mistake because I am a beginner
- I don't really have a clue about working in a Unix environment and would
probably have already given up long ago if it were not for some helpful
support along the way. Nevertheless the answer is probably simple to
experienced Unix gurus out there. The problem is that the main advice I am
getting is either forget what I want to do because no one understands why
on earth I should want to do it in the first place, or go away and learn
Unix and Linux inside out before attempting to continue. This is for me a
bit like not being allowed to visit the Pyramids until I have gone away and
learned fluent Egyption. Perhaps I should not allow my daughter to install
a game software on the PC until she has understood the machine code of the
operating sytem ?

So please someone - have a heart - and pass on the secret to a simple
Windows user of how set up what ever instruction or variable is missing. I
will be eternally grateful and will attempt (once I am experienced with the
compiler - which is my goal) to contribute something back to the GNU
community.

Many thanks in anticipation


Mark Butcher

Switzerland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]