This is the mail archive of the cygwin mailing list for the Cygwin 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: gcc: installation problem, cannot exec 'cc1'


Thomas Antony wrote:

>     This is my first post here. I recently installed Cygwin again
> after my harddisk crashed and had to be formatted and all. I mainly
> use an ELF cross compiler for doing OS dev. So it was when I tried to
> compile a simple app using the normal GCC that I ran into this error.
> 
> $ gcc -mno-cygwin -o hello hello.c
> gcc: installation problem, cannot exec 'cc1': No such file or directory
> 
> I see that it occurs only when I use the -mno-cygwin option. I
> searched google. I found I have to install gcc-mingw package. I
> installed it. But the problem still prevails. I also see that there is
> no /usr/lib/gcc-lib directory. I found  cc1.exe in the
> /lib/gcc/i686-pc-cygwin/3.4.4 directory. I tried adding that to the
> PATH. But then I get the error.

Don't do that.  It's not necessary and won't help.  When you specify
-mno-cygwin you switch to using MinGW's version of gcc, an entirely
separate version of gcc that is installed alongside the Cygwin version. 
This is why you must install the gcc-mingw-* packages for this to work. 
Incidently, I don't understand how you managed to at first install
gcc-core but *not* gcc-mingw-core, since gcc-core lists gcc-mingw-core
as a prerequisite in the setup.ini file (and so on for the other
languages), so selecting one should have selected the other, and
breaking this dependancy should have given you a big fat warning
message.

The cc1 that it is looking for when you use -mno-cygwin should be 
/usr/lib/gcc/i686-pc-mingw32/3.4.4/cc1.exe.  What does "ls -l
/usr/lib/gcc/i686-pc-mingw32/3.4.4/" show?  Did you have any problems
running the postinstall scripts?  Do you have any that are not renamed
.done?  What does "ls -l /etc/postinstall/gcc*" show?

> ld: crt2.o: No such file: No such file or directory

This is part of mingw-runtime, and should be present in /usr/lib/mingw.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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