It's back -- "gcc: error: spawn: No such file or directory"

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Mon Jun 2 20:08:00 GMT 2014


On 06/02/2014 03:19 PM, David Friedman wrote:
>> From: "Larry Hall (Cygwin)"
>> Sent: Monday, June 2, 2014 12:33:44 PM
>> Subject: Re: It's back -- "gcc: error: spawn: No such file or directory"
>
>> On 06/02/2014 12:28 PM, David Friedman wrote:
>
>> <snip>
>
>>>    as -v -o /cygdrive/c/DOCUME~1/friedman/LOCALS~1/Temp/ccASOmoc.o /cygdrive/c/DOCUME~1/friedman/LOCALS~1/Temp/ccGXQsYR.s
>>> gcc: error: spawn: No such file or directory
>>>
>>> Does "as" mean the assembler? If it's not in /bin or /usr/bin, where is it?
>
>> It is in /usr/bin.
>
>> <https://cygwin.com/cgi-bin2/package-cat.cgi?file=x86%2Fbinutils%2Fbinutils-2.24.51-3&grep=as.exe>
>
>> --
>> Larry
> ________
>
> I ran find for as.exe, and it turned out to be in /usr/i686-pc-mingw32/bin.
>
> Added that to my PATH, and now gcc goes past that point and fails with:
>
> /usr/i686-pc-mingw32/bin/ld: cannot find -ladvapi32
> /usr/i686-pc-mingw32/bin/ld: cannot find -lshell32
> /usr/i686-pc-mingw32/bin/ld: cannot find -luser32
> /usr/i686-pc-mingw32/bin/ld: cannot find -lkernel32
> collect2: error: ld returned 1 exit status
>
> Ran find for *advapi32*, and found libadvapi32.a in /usr/lib/w32api.
> Added  that to my PATH, and got the same error again.

Right.  This is the wrong 'as' if you want to build Cygwin binaries.
And if this is the only 'as' you found on your system, then your
'binutils' installation is corrupt.  You should see this by running
'cygcheck -c'.

> At this point I can only conclude that there is something wrong with my
> Cygwin installation, that something failed to complete on the gcc 4.3.4 to
> 4.8.3 update; it was working fine before this. All I can think of to do is
> wipe out Cygwin and do a complete up-to-date reinstall. Meanwhile I
> installed MinGW with MSYS and this gives me a gcc 4.8.3 that I can at least
> finish my current project with.

It may not require all that but if you do so, then it should resolve the
issue too.  Definitely 'binutils' isn't installed (completely/correctly).
But then again, if all that you want is Windows-native binaries, you're
good with MinGW.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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