public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Configuring and Compiling GCC for Windows
@ 2002-05-21 15:49 Mark Butcher
  2002-05-23 12:48 ` Oscar Fuentes
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Butcher @ 2002-05-21 15:49 UTC (permalink / raw)
  To: gcc-help

Hi All

I haven't given up yet, although I don't seem to be getting much 'moral'
support as of yet..

Here's the latest situation, in the hope that there is someone out there a
heart to share a little expertise with a struggling beginner.

1. Have left NT and gone back to Windows 98 because more was working there.

2. Originally the configure was failing after typing in the following
command in cygwin bash shell

c:/usr/local/src/gcc-3.0.4/configure

*** This configuration is not supported in the following subdirectories:
       target-libffi target-boehm-gc target-zlib target-libjava
       (Any other directories should still work fine.)
....
....
creating Makefile
sed: can't read c: No such file or directory
sed: can't read
c:/usr/local/src/gcc-3.0.4/libiberty//usr/local/src/gcc-3.0.4/libiberty/Mak
efile.in: No such file or directory
creating testsuite/Makefile
sed: can't read c: No such file or directory
sed: can't read
c:/usr/local/src/gcc-3.0.4/libiberty//usr/local/src/gcc-3.0.4/libiberty/Mak
efile.in: No such file or directory
creating config.h
cat: can't read c: No such file or directory
cat: can't read
c:/usr/local/src/gcc-3.0.4/libiberty//usr/local/src/gcc-3.0.4/libiberty/con
fig.in: No such file or directory
Configuring zlib...
loading cache ../config.cache
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking build system type... i686-pc-cygwin
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... eval1: syntax error: unterminated
quoted string
configure in /cygdrive/c/usr/local/src/gcc-objdir/zlib failed, exiting.

I am presently assuming that the first message about the configuration not
being supported in some directories is not important (or is it ?) because I
don't know how I could otherwise influence it.


3. I did make a small breakthrough by typing in the command differently
(obviously c: is not good ). At last some progress to show for an evenings
work !!

/cygdrive/c/usr/local/src/gcc-3.0.4/configure

*** This configuration is not supported in the following subdirectories:
       target-libffi target-boehm-gc target-zlib target-libjava
       (Any other directories should still work fine.)
....
....
....  (all fine 'till here now)
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... eval1: syntax error: unterminated
quoted string
configure in /cygdrive/c/usr/local/src/gcc-objdir/zlib failed, exiting.

Still the first note (warning or fatal error ?) but the make files are
successfully created. Still the problem with a syntax error but don't know
where to look at the moment.

Still hoping for that elusive tip..

Regards

Mark Butcher

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Configuring and Compiling GCC for Windows
  2002-05-21 15:49 Configuring and Compiling GCC for Windows Mark Butcher
@ 2002-05-23 12:48 ` Oscar Fuentes
  0 siblings, 0 replies; 8+ messages in thread
From: Oscar Fuentes @ 2002-05-23 12:48 UTC (permalink / raw)
  To: Mark Butcher; +Cc: gcc-help

Mark Butcher <M_J_BUTCHER@compuserve.com> writes:

> Hi All
> 
> I haven't given up yet, although I don't seem to be getting much 'moral'
> support as of yet..
> 
> Here's the latest situation, in the hope that there is someone out there a
> heart to share a little expertise with a struggling beginner.
> 
> 1. Have left NT and gone back to Windows 98 because more was working there.

Bad idea.
 
> 2. Originally the configure was failing after typing in the following
> command in cygwin bash shell
> 
> c:/usr/local/src/gcc-3.0.4/configure

[snipped configure output]

From a previous post of yours I know you want to create several cross
compilers. Well, keep in mind that the 'configure' scripts and the
'Makefiles' it outputs are created for *nix environments. They *must*
work in *nix environments or either a bug report to the GCC
maintainers should filled. Cygwin tries to emulate *nix environment
working inside Windows, that is, it adds another possible break-point
to the chain. If you really want to do serious cross-compiling work
with GCC, go for Linux, everything should work there. I'm not saying
that it is impossible with Windows, but certainly it will be easier
with Linux.
 
> I am presently assuming that the first message about the configuration not
> being supported in some directories is not important (or is it ?) because I
> don't know how I could otherwise influence it.

No, it is nor important, unless you want the stuff it contains (C and
C++ will work ok without it).
 
> 3. I did make a small breakthrough by typing in the command differently
> (obviously c: is not good ). At last some progress to show for an evenings
> work !!
> 
> /cygdrive/c/usr/local/src/gcc-3.0.4/configure

See, do you realize that in order to obtain something with Cygwin you
must work as if it were a *nix box? This is another reason for going
to the true *nix.
 
> *** This configuration is not supported in the following subdirectories:
>        target-libffi target-boehm-gc target-zlib target-libjava
>        (Any other directories should still work fine.)
> ....
> ....
> ....  (all fine 'till here now)
> checking whether build environment is sane... yes
> checking whether make sets ${MAKE}... eval1: syntax error: unterminated
> quoted string
> configure in /cygdrive/c/usr/local/src/gcc-objdir/zlib failed, exiting.
> 
> Still the first note (warning or fatal error ?) but the make files are
> successfully created. Still the problem with a syntax error but don't know
> where to look at the moment.

Are you trying to build from a directory with a path that contains
embedded blank spaces, by chance?

> Still hoping for that elusive tip..

GCC 3.x with default settings builds ok with Cygwin. I'm not so sure
about building crosscompilers. Once I tried and it won't work.

I guess your problems are:

1. Obtaining and configuring the necessary software. The MinGW project
   contains MSYS, wich is a kind of Cygwin created specifically for
   doing what you want. It comes with everything you need for building
   GCC. As in the case of Cygwin, it's possible that it doesn't work
   for creating cross-compilers. You will only need the MSYS package
   and the MinGW 1.1 package. Unpack MinGW first, then install MSYS
   and pay attention at the final question the installer asks about
   where MinGW is unpacked. Answer with a pathname with forward
   slashes, that is, if you unpacked MinGW on c:\mingw answer c:/mingw
   You can obtain the packages at

http://sourceforge.net/project/showfiles.php?group_id=2435

   then launch a MSYS terminal and write

gcc -v
   
   for checking that GCC is there. Then do

configure --enable-languages=c,c++ --prefix=c:/mingw

   pay attention to the path you specify for --prefix. It must be the
   same where you unpacked MinGW. Now 'configure' should work. Then do
   a 'make bootstrap' and then 'make install'. At last check that the
   new gcc is there doing 'gcc -v'

2. Newbies need help. Is hard to obtain help when asking people about
   how to do things the wrong way. I guess most people here thinks you
   shouldn't do what you want in Windows. Well, MinGW is about working
   with GCC in Windows. There you will enjoy a more receptive
   environment. Since some time ago, almost no questions remain
   unanswered. Just be sure of doing your homework before asking and
   do not disregard the advices without a good reason for doing so ;-)
   Go to www.mingw.org and subscribe to the msys and mingw-users
   mailing lists.

3. Finally, you need to understand what you are doing. You need to
   know what 'sed', 'cat' and a configure script are, and a bunch of
   things more. If you do not learn it, hardly you can fix even the
   most minor problem yourself. Take a good book about Unix/Linux and
   read it. There are inmense resources on the web about this too.

HTH

-- 
Oscar

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Configuring and Compiling GCC for Windows
@ 2002-05-26  9:54 Mark Butcher
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Butcher @ 2002-05-26  9:54 UTC (permalink / raw)
  To: Dockeen; +Cc: CM, gcc-help

Hi Everyone

I'm trying to keep cool and remain sane and will try to explain why I am
trying to do what I am trying to do since this seems to be of major
interest. Perhaps it will help in identifying my difficulty..



1. The end goal of the exercise is to install native compilers for several
processors - specifically for ARM, Intel x86, Mitsubishi, 68xxx and M-Core
and Hitachi. (see point 2 for why I am first configuring for a native boot
strap)
I have commercial compiler suites to most of these processors and have
written a C-compiler and simulator to the M-Core as an exercise. I have
also built a basic JTAG debugger for the ARM.
After using a GNU compiler for the M-Core and hearing that there were also
debuggers from GNU I thought it be wise to try to get involved with GNU
compiler testing and longer term possibly improvement contribution.

-> If this is a stupid idea please indicate with SI-1 ("Stupid idea"-1)



2. The reason why I am trying initially to build a native compiler can be
explained as follows.
a. I assume that this is the simplest and surest to work to begin with
b. When I have built the newest version of the GCC native compiler I can
also use the newest version to compile native compilers
c. One can also view it as a test run..

-> If this is a stupid idea please indicate with SI-2



3. I thought that I should logically take the latest version of the GNU
compiler sources and that is what I did. I understand that it works and so
I don't see any reason to take an old version (unless anyone can tell me
that the laterst really doesn't work). So if it is 3.10, 3.04, 3.189327 I
don't really care and don't believe that it should basically be an issue
here.
For the record I have GCC-3.0.4, which seemed to be the lastes a couple of
weeks back and am happy to stick with this version for the moment.

-> If this is a stupid idea please indicate with SI-3



4. I got the compiler and read how to install it. The first step being to
find some way to decompress the file and dearchive it. No big problem,
download a couple of GNU utilities and it's done.


5. Then I realised that it can only be installed using a Unix type system
and so looked around for something, most recommendations being to use
cygwin which simulates a Unix environment under Windows. This I have
installed on three computers and see no reasons why it should not be
working correctly - all utilities work and all command line commands too. I
let someone with some Unix knowledge look at it (who also uses cygwin for
some of his work) and he didn't see any problems with it.

-> If this is a stupid idea please indicate with SI-5



6. Now we seem to be getting to the issue that no one understands.
In the configuration instructions it say that I must have a compiler to
compile and that cygwin must know where to find this compiler. I looked
around in the cygwin binary directory and found nothing and the command
"gcc -v" fails since the executable is not found. So I checked around again
and found some recommendations to use MinGW since this is a native compiler
suited to bootstrapping - which is, as I have understood, the term for
compiling a compiler.
Thus I installed MinGW with the aim of using this as a native compiler to
compile the GCC for my machine, which would then be used to cross compile
for the targets I have in mind.

-> If this is a stupid idea please indicate with SI-6



***************************************************************************
*********


>OK, last time I am going to try this:

>Can you please please please give me one good reason why
>you are doing what you are doing????????

>It makes no sense to me. 

See points 1 and 2. If the reasons I have given are still insane, please
indicate and I will seek professional psychological advice.


>You have an application (Cygwin) which has native to it
>the compiler that you say you want, yet you are trying
>to build a compiler for another system (MinGW) over the top
>of it.
I think this is a misinterpretation. The fact (see 6) is that my cygwin
installation doesn't seem to have a compiler and I am using the MinGW (a
GCC binary as I understand it) to try to bootstrap. THis has also been
recommended to me..

>You are trying to do this when you can't even tell if
>you got the Cygwin install right. (Which a LOT of people
>do not, just check out the Cygwin mailing list.)
(See point 5). True, I can not be 100% sure but I think that the worst case
synario is that I missed installing the cygwin native compiler - other than
that I have no indications of an installation problem. Even if I missed the
compiler, the alternative native compiler should be able to be used and, as
we know from Hallo World tests - does operate from within the cygwin
environment.


>Why?

>Maybe I should just take a hint from the fact that you
>never answered my question about whether you knew that
>what you say you are building (3.04) is an older version
>of the compiler than 3.1. (Note I do mean 3.1, not
>3.01)
(See point 3) When I downloaded CPP this had not yet been released (in test
phase or something) and so I took the 3.0.4. I am still of the opinion that
the exact version is not the issue at the moment and, should I get 3.0.4
operating I would certainly upgrade to stay at the latest level.
I am sorry if I missed answering to a specific question, please forgive
me..

>I'm not trying to be abusive or mean, but to me at least,
>what you are doing makes no sense. 

I will wait for my stupidity rating before declaring myself sain or
otherwise (please delete as appropriate).


**********************************************************************

>You can't build a native mingw compiler from source using the mingw
>tool-chain itself AFAICT. You need to use the gcc supplied with cygwin
>(use the setup.exe, it along with other tools you will need such as
>binutils, is in the 'Devel' category). Use these, and remove the mingw
>from your path. After you have a working gcc, you can use that to build
>a cygwin to mingw cross compiler (cygwin and mingw are two entirely
>different systems) which is what you are trying to do now. You can now
>use this compiler to build a native win32 executables, much like the gcc
>you are trying to use now, apart from the fact that it will understand
>cygwin paths and mounts. The compiler used to build the mingw compiler
>must understand cygwin paths, so must have been built using cygwin
>itself.
I think there may have been a little misunderstanding somewhere along the
way. I have never attempted to build a native mingw compiler. I have a
MinGW native binary which I am trying to use as a native compiler to
bootstrap GCC (see point 2)

>I would suggest that you try to use cygwin native tools, but if the
>dependency on cygwin1.dll really bothers you, then mingw or DJGPP are
>your only options. DJGPP has a 3.x series compiler with it; I don't know
>whether mingw has a binary of it yet.

>CM

>PS: Why do you need 3.x so badly?
(See point 3). I don't want 3.x badly, but I assume it best to use the
latest release. If someone can tell me that 3.x simply doesn't work and I
should scrap it anbd use some previous version then I will do that. From
the information I have the 3.x works and should be prefered. My problem is
probably somewhere else - for example a critical setting which is missiung
in my installation.



/*********** OPEN QUESTION WHICH NEVER RECEIVES A DIRECT ANSWER
***********************/
The question which I am still not getting answered is the following. I have
the feeling that this is the critical error in my set up which I don't seem
to be able to solve.


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.


 | | | THE QUESTION | | | |
 vvv                        vvvv
How can I tell cygwin where the compiler is without this causing this wrong
substitution ???
 ^^^                       ^^^^
 | | | THE QUESTION | | | |



/**************************************************************************
**************************************/

Best regards

Mark Butcher

Switzerland

Even if I do not get a rating of mentally insane and dangerous to the
public, please indicte if you see my case as a dead-end case. If we can
agree that it makes no sense to continue trying to install GCC I will
accept defeat with grace and dignity and leave all in peace.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Configuring and Compiling GCC for Windows
  2002-05-25 16:35 Mark Butcher
@ 2002-05-26  4:30 ` CM
  0 siblings, 0 replies; 8+ messages in thread
From: CM @ 2002-05-26  4:30 UTC (permalink / raw)
  To: 'Mark Butcher', 'gcc-help'; +Cc: 'John Love-Jensen'

You can't build a native mingw compiler from source using the mingw
tool-chain itself AFAICT. You need to use the gcc supplied with cygwin
(use the setup.exe, it along with other tools you will need such as
binutils, is in the 'Devel' category). Use these, and remove the mingw
from your path. After you have a working gcc, you can use that to build
a cygwin to mingw cross compiler (cygwin and mingw are two entirely
different systems) which is what you are trying to do now. You can now
use this compiler to build a native win32 executables, much like the gcc
you are trying to use now, apart from the fact that it will understand
cygwin paths and mounts. The compiler used to build the mingw compiler
must understand cygwin paths, so must have been built using cygwin
itself.

I would suggest that you try to use cygwin native tools, but if the
dependency on cygwin1.dll really bothers you, then mingw or DJGPP are
your only options. DJGPP has a 3.x series compiler with it; I don't know
whether mingw has a binary of it yet.

CM

PS: Why do you need 3.x so badly?

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Mark Butcher
Sent: 26 May 2002 00:34
To: gcc-help
Cc: John Love-Jensen
Subject: 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/WINDO
WS:
/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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Configuring and Compiling GCC for Windows
@ 2002-05-25 16:35 Mark Butcher
  2002-05-26  4:30 ` CM
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Butcher @ 2002-05-25 16:35 UTC (permalink / raw)
  To: gcc-help; +Cc: John Love-Jensen

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Configuring and Compiling GCC for Windows
@ 2002-05-24 12:31 Mark Butcher
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Butcher @ 2002-05-24 12:31 UTC (permalink / raw)
  To: Dockeen; +Cc: gcc-help

Hallo Wayne

I think that the answer to the problem is probably in the last mail I sent.

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

gives 

  ac_maketemp=\c:/MinGW/BIN/make.exe"   ( I checked again and there is a "
at the end of the path which has been substituted for "$(MAKE)")

I asked around again and found someone with a little Linux experience and
he is pretty sure that there is a problem with the slashes and that that
the " at the end is causing a syntax error.



The path comes from the windows SET PATH=c:\MinGW\BIN command in my
autoexec.bat file, which I added so that both dos and cygwin can find the
MinGW compiler that I am using for the configuration and so the problem
must be here somewhere.
We experimented with other assigning possibilities in the autoexec file but
didn't have any success and I wonder whether there is another method for
assigning the path for cygwin which is the correct method - I see often
notes about assigning the path of the c-compiler to the CC environment
variable but no instruction on how this should best be performed. I assume
that my method is wrong.

How do you assign the path so that cygwin can find your compiler ????


Regards

Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Configuring and Compiling GCC for Windows
@ 2002-05-23 18:27 Dockeen
  0 siblings, 0 replies; 8+ messages in thread
From: Dockeen @ 2002-05-23 18:27 UTC (permalink / raw)
  To: gcc-help; +Cc: M_J_BUTCHER

I've been working sort of behind the scenes with Mark, and I have been
trying to direct him as to how I have been building 3.x series gcc.
Simple stuff, no cross compilers, just a configure I knew worked for
Win 9X, 200,MP, make bootstrap and make.

This afternoon, I woke from my sub-moronic stupor to ask myself (and
him) why are we doing this.  Cygwin comes with 2.95.3.  It can be
installed as part of the Cygwin setup program.  If its not, then
you have to go down through to the development category and click
the right boxes.  Nothing to build.  It works.  Period.  At this
point, you should be able to compile and run "hello world" in three
languages, C, C++ and f77. 

My advice is this:
(1) Clean out and re-install Cygwin.
(2) Make sure that when you install, you go through all the categories
    and make sure you install everything.  Even the games (I know this
    is stupid and anal retentive, but I don't want anything important
    missed here)
(3) Do a gcc -v, it should look something like mine:

Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)

 (4) Write a simple "hello world" program in C of C++ or f77, pick
     your favorite.  I'm going to assume you name it hello.cpp

 (5) Compile via
     gcc -0 hello hello.cpp
     from within Cygwin

 (6) You should have hello.exe.  If you don't, or if you get an error
     in the process, you probably have a problem with your install.
     If it compiles, type ./hello

Now, community, I'm a little torn.  I almost suggested that he use vi
as his editor, but that approach is not smart to place on a Unix newbie.
I am a little concerned, as I have run into occasional problems myself
with using something like notepad to write / modify things in Cygwin.
Sometimes I run into line ending problems.  Suggestions from the greater
community?

Please note that you HAVE to have a working version of gcc if you want
to later build 3.0x or 3.1.  I wouldn't do that yet.  Have fun with
what you have.  Learn the joys of pipes and grep.  Hell, I made a job
a career by knowing how to use grep to find stuff in code.  Its FUN.
(Why do I sound like a dieing Jim Kirk in Generations when I say that)

Mark, I am sorry.  I listened to you, but I didn't really listen to what
you were doing and think about what you should be doing well enough.
I know better than that.  To know better, and still do something wrong
that confuses someone else is just plain stupid on my part.

Wayne Keen





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Configuring and Compiling GCC for Windows
@ 2002-05-21 14:06 Mark Butcher
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Butcher @ 2002-05-21 14:06 UTC (permalink / raw)
  To: gcc-help

Hi All

In addition to my previous mails, I have perfomed another test. I decided
to try to configure the compiler under NT4 instead of Windows 98. This time
the results are quite different.

1. When I extracted the gcc files from the archive with tar all names were
cut to a length of 8 characters and so nothing worked. I know it's not
really a subject in this group but I had to extract under 98 and copy
before I could continue..

2. After putting everything in its usual place, the configuration / build
aborted much earlier with the following messages.

$c:/gcc/gcc-3.0.4/configure
Configuring for a i686-pc-cygwin host.
*** This configuration is not supported in the following subdirectories:
       target-libffi target-boehm-gc target-zlib target-libjava
       (Any other directories should still work fine.)
Created "Makefile" in /cygdrive/c/gcc/gccwin using "mh-frag"
gcc.exe: installation problem, can not exec 'cpp0': No such file or
directory
*** The command 'gcc -o conftest -O2  conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
rm: cannot remove '/tmp/cNf173/cNf173.pos': permission denied
rm: cannot remove directory '/tmp/cNf173': Directory not empty

When I type gcc -v in the bach shell, the result is positive and the same
actions under Windows 98 worked (that is the compiler didn't seem to cause
any difficulties).

I am sure that I am doing something stupid but I need some expert out there
to point me in the right direction. Would be grateful for that elusive
tip..

Regards

Mark Butcher

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-05-26 16:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-21 15:49 Configuring and Compiling GCC for Windows Mark Butcher
2002-05-23 12:48 ` Oscar Fuentes
  -- strict thread matches above, loose matches on Subject: below --
2002-05-26  9:54 Mark Butcher
2002-05-25 16:35 Mark Butcher
2002-05-26  4:30 ` CM
2002-05-24 12:31 Mark Butcher
2002-05-23 18:27 Dockeen
2002-05-21 14:06 Mark Butcher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).