gcc command not found

Andreas Zwerger zwerger@uni-freiburg.de
Sat Feb 6 13:29:00 GMT 2010


Andreas Zwerger schrieb:
> Hello,
>
> I'm having the same problem with the latest Cygwin install. But for me 
> rerunning the postinstall scripts does not create the symlinks.
>
> Administrator@haco-xyz ~
> $ gcc
> bash: gcc: command not found

> Administrator@haco-xyz ~
> $ for x in /etc/postinstall/{gcc.,gcc-[^tm],gcc4-}* ;
> > do
> >   . $x
> > done
> sed -i -e /^sys_lib_search_path_spec=/ 
> s|\(pc-cygwin\)/[34].[3-9].[0-9]|\1/4.3.4|g /usr/bin/libtool 
> /usr/share/apr/build-1/libtool
> sed -i -e /^dependency_libs=/ 
> s|\(pc-cygwin\)/[34].[3-9].[0-9]/\(lib[a-z_+]*.la\)|\1/4.3.4/\2|g 
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/libgcj-noncore.la 
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/libgcj-tools.la 
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/libgij.la 
> /usr/lib/gcj-4.3.4-9/libjvm.la /usr/lib/libFLAC++.la 
> /usr/lib/libncurses++.la /usr/lib/libncurses++w.la 
> /usr/lib/libplotter.la /usr/lib/libtiffxx.la /usr/lib/libxerces-c.la

OK, problem solved!
Weird enough the reason was an old version of cygwin1.dll in c:/windows 
directory which was used by cygwin instead of the one in cygwin-bin-dir 
(since c:/windows comes first in path variable). No idea where that file 
came from, but there were even more files in c:/windows from cygwin - 
those are removed now, and gcc works perfectly!

I found that out by calling C:/cygwin/usr/sbin/alternatives.exe from 
windows-explorer which then gave me an error window saying that the 
procedure entry point "__ctype_ptr__" was not found in "cygwin1.dll" so 
I started searching for cygwin1.dll on my system and found the old 
version in windows directory.

Best regards,
    Andreas

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



More information about the Cygwin mailing list