public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* It's back -- "gcc: error: spawn: No such file or directory"
       [not found] <598735007.458570.1401466053450.JavaMail.zimbra@coherentlogix.com>
@ 2014-05-30 16:51 ` David Friedman
  2014-05-30 18:27   ` Christopher Faylor
  2014-05-30 22:44   ` David Friedman
  0 siblings, 2 replies; 11+ messages in thread
From: David Friedman @ 2014-05-30 16:51 UTC (permalink / raw)
  To: cygwin

I just upgraded my gcc to 4.8.3 and tried a compilation, and got the error above. I see that there's been some previous discussion of this error, including whether gcc is started from /usr/bin or /bin; tried both, no difference. See below:

$ echo $PATH
/usr/local/bin:
/usr/bin:
/bin:
/usr/X11R6/bin:
/cygdrive/c/WINDOWS/system32:
/cygdrive/c/WINDOWS:
/cygdrive/c/WINDOWS/system32/wbem:
/cygdrive/c/program files/intel/dmix:
 . . .

Tried starting gcc with -v option; here's the tail end of the result:

 . . .
GNU C (GCC) version 4.8.3 (i686-pc-cygwin)
        compiled by GNU C version 4.8.3, GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: a39cfdacc7868ff2412ca54ce8f22425
COLLECT_GCC_OPTIONS='-v' '-o' 'Qualcomm_enc_dec.exe' '-mtune=generic' '-march=i686'
 as -v -o /cygdrive/c/DOCUME~1/friedman/LOCALS~1/Temp/cca1VHLo.o /cygdrive/c/DOCUME~1/friedman/LOCALS~1/Temp/ccuVhtdU.s
gcc: error: spawn: No such file or directory

And all I wanted to do was compile and run some C code. Any suggestions of workarounds? Thanks in advance for any useful ideas.


David F.   2014 May 30 11:18 CDT


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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
  2014-05-30 16:51 ` It's back -- "gcc: error: spawn: No such file or directory" David Friedman
@ 2014-05-30 18:27   ` Christopher Faylor
  2014-05-31 19:15     ` Andrey Repin
  2014-05-30 22:44   ` David Friedman
  1 sibling, 1 reply; 11+ messages in thread
From: Christopher Faylor @ 2014-05-30 18:27 UTC (permalink / raw)
  To: cygwin

On Fri, May 30, 2014 at 11:19:37AM -0500, David Friedman wrote:
>I just upgraded my gcc to 4.8.3 and tried a compilation, and got the
>error above.  I see that there's been some previous discussion of this
>error, including whether gcc is started from /usr/bin or /bin; tried
>both, no difference.  See below:
>
>$ echo $PATH
>/usr/local/bin:
>/usr/bin:
>/bin:
>/usr/X11R6/bin:
>/cygdrive/c/WINDOWS/system32:
>/cygdrive/c/WINDOWS:
>/cygdrive/c/WINDOWS/system32/wbem:
>/cygdrive/c/program files/intel/dmix:
> . . .

Try removing /bin from your path entirely.

cgf

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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
  2014-05-30 16:51 ` It's back -- "gcc: error: spawn: No such file or directory" David Friedman
  2014-05-30 18:27   ` Christopher Faylor
@ 2014-05-30 22:44   ` David Friedman
  2014-05-31  0:01     ` Chris J. Breisch
  1 sibling, 1 reply; 11+ messages in thread
From: David Friedman @ 2014-05-30 22:44 UTC (permalink / raw)
  To: cygwin

On Fri, 30 May 2014 12:51:18 -0400, Christopher Faylor wrote:

> Try removing /bin from your path entirely.

> cgf

--

Tried it: set my path to just /usr/bin, and it still happens.

dhf


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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
  2014-05-30 22:44   ` David Friedman
@ 2014-05-31  0:01     ` Chris J. Breisch
  0 siblings, 0 replies; 11+ messages in thread
From: Chris J. Breisch @ 2014-05-31  0:01 UTC (permalink / raw)
  To: cygwin

David Friedman wrote:
> On Fri, 30 May 2014 12:51:18 -0400, Christopher Faylor wrote:
>
>> Try removing /bin from your path entirely.
>
>> cgf
>
> --
>
> Tried it: set my path to just /usr/bin, and it still happens.
>
> dhf
>

And you have tried "gcc -v"? Or even "gcc -v -Wl,--verbose", to see what 
it's attempting to do?


-- 
Chris J. Breisch

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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
  2014-05-30 18:27   ` Christopher Faylor
@ 2014-05-31 19:15     ` Andrey Repin
  0 siblings, 0 replies; 11+ messages in thread
From: Andrey Repin @ 2014-05-31 19:15 UTC (permalink / raw)
  To: Christopher Faylor

Greetings, Christopher Faylor!

>>I just upgraded my gcc to 4.8.3 and tried a compilation, and got the
>>error above.  I see that there's been some previous discussion of this
>>error, including whether gcc is started from /usr/bin or /bin; tried
>>both, no difference.  See below:
>>
>>$ echo $PATH
>>/usr/local/bin:
>>/usr/bin:
>>/bin:
>>/usr/X11R6/bin:
>>/cygdrive/c/WINDOWS/system32:
>>/cygdrive/c/WINDOWS:
>>/cygdrive/c/WINDOWS/system32/wbem:
>>/cygdrive/c/program files/intel/dmix:
>> . . .

> Try removing /bin from your path entirely.

I'd rather suggest removing /usr/bin


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 31.05.2014, <22:59>

Sorry for my terrible english...


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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
  2014-06-02 19:19     ` David Friedman
@ 2014-06-02 20:08       ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 11+ messages in thread
From: Larry Hall (Cygwin) @ 2014-06-02 20:08 UTC (permalink / raw)
  To: cygwin

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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
  2014-06-02 17:33   ` Larry Hall (Cygwin)
@ 2014-06-02 19:19     ` David Friedman
  2014-06-02 20:08       ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 11+ messages in thread
From: David Friedman @ 2014-06-02 19:19 UTC (permalink / raw)
  To: cygwin

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

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.

Larry: Thanks for sticking with me so far.

- dhf

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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
  2014-06-02 16:28 ` David Friedman
@ 2014-06-02 17:33   ` Larry Hall (Cygwin)
  2014-06-02 19:19     ` David Friedman
  0 siblings, 1 reply; 11+ messages in thread
From: Larry Hall (Cygwin) @ 2014-06-02 17:33 UTC (permalink / raw)
  To: cygwin

On 06/02/2014 12:28 PM, David Friedman wrote:

<snip>

> Interestingly, the error message now is different. But with my PATH set
> to  either just /bin or just /usr/bin I get this:
>
> GNU C (GCC) version 4.8.3 (i686-pc-cygwin)
>          compiled by GNU C version 4.8.3, GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> Compiler executable checksum: a39cfdacc7868ff2412ca54ce8f22425
> COLLECT_GCC_OPTIONS='-v' '-o' 'QC_enc_dec.exe' '-mtune=generic' '-march=i686'
>   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

_____________________________________________________________________

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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
       [not found] <1244589943.501250.1401725538999.JavaMail.zimbra@coherentlogix.com>
@ 2014-06-02 16:28 ` David Friedman
  2014-06-02 17:33   ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 11+ messages in thread
From: David Friedman @ 2014-06-02 16:28 UTC (permalink / raw)
  To: cygwin

OK, that makes sense. So what I should do is run gcc with the -v option to see what it's trying to spawn (I recall that in a previous thread for this error, it was something called cc1). Here's the last few lines of the result, keeping my normal PATH:

GNU C (GCC) version 4.8.3 (i686-pc-cygwin)
        compiled by GNU C version 4.8.3, GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: a39cfdacc7868ff2412ca54ce8f22425
COLLECT_GCC_OPTIONS='-v' '-o' 'QC_enc_dec.exe' '-mtune=generic' '-march=i686'
 as -v -o /cygdrive/c/DOCUME~1/friedman/LOCALS~1/Temp/cc05Tigm.o /cygdrive/c/DOCUME~1/friedman/LOCALS~1/Temp/ccgnoAu9.s
GNU assembler version 2.23.2 (mingw32) using BFD version (GNU Binutils) 2.23.2
Assembler messages:
Fatal error: can't create /cygdrive/c/DOCUME~1/friedman/LOCALS~1/Temp/cc05Tigm.o: No such file or directory

Interestingly, the error message now is different. But with my PATH set to either just /bin or just /usr/bin I get this:

GNU C (GCC) version 4.8.3 (i686-pc-cygwin)
        compiled by GNU C version 4.8.3, GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: a39cfdacc7868ff2412ca54ce8f22425
COLLECT_GCC_OPTIONS='-v' '-o' 'QC_enc_dec.exe' '-mtune=generic' '-march=i686'
 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?

- dhf

----- Original Message -----
From: "Larry Hall (Cygwin)"

You're misinterpreting the error message (it's a common problem with the
way the error messages are constructed).  spawn is not missing.  It's the
context.  Whatever 'gcc' is trying to spawn is the thing it cannot find.

-- 
Larry

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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
  2014-06-02 15:23 ` David Friedman
@ 2014-06-02 15:41   ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 11+ messages in thread
From: Larry Hall (Cygwin) @ 2014-06-02 15:41 UTC (permalink / raw)
  To: cygwin

On 06/02/2014 11:23 AM, David Friedman wrote:
> Tried that too (set PATH to just /bin) - same result.
>
> Where is spawn normally located? Is it possible that the library file
> that  normally contains it is actually missing, mis-located or corrupted, so that
> spawn can't be found? Is there a workaround, possibly involving fork() and
> exec()? I gather that spawn() is not POSIX-compliant (CMIIW - correct me if
> I'm wrong).

You're misinterpreting the error message (it's a common problem with the
way the error messages are constructed).  spawn is not missing.  It's the
context.  Whatever 'gcc' is trying to spawn is the thing it cannot find.


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

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

* Re: It's back -- "gcc: error: spawn: No such file or directory"
       [not found] <1401720184.12213.ezmlm@cygwin.com>
@ 2014-06-02 15:23 ` David Friedman
  2014-06-02 15:41   ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 11+ messages in thread
From: David Friedman @ 2014-06-02 15:23 UTC (permalink / raw)
  To: cygwin


>> Try removing /bin from your path entirely.

> I'd rather suggest removing /usr/bin

> --
> WBR,
> Andrey Repin (anrdaemon@yandex.ru) 31.05.2014, <22:59>
_____

Tried that too (set PATH to just /bin) - same result.

Where is spawn normally located? Is it possible that the library file that normally contains it is actually missing, mis-located or corrupted, so that spawn can't be found? Is there a workaround, possibly involving fork() and exec()? I gather that spawn() is not POSIX-compliant (CMIIW - correct me if I'm wrong).

David Friedman (re-originator of this thread)

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

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

end of thread, other threads:[~2014-06-02 20:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <598735007.458570.1401466053450.JavaMail.zimbra@coherentlogix.com>
2014-05-30 16:51 ` It's back -- "gcc: error: spawn: No such file or directory" David Friedman
2014-05-30 18:27   ` Christopher Faylor
2014-05-31 19:15     ` Andrey Repin
2014-05-30 22:44   ` David Friedman
2014-05-31  0:01     ` Chris J. Breisch
     [not found] <1401720184.12213.ezmlm@cygwin.com>
2014-06-02 15:23 ` David Friedman
2014-06-02 15:41   ` Larry Hall (Cygwin)
     [not found] <1244589943.501250.1401725538999.JavaMail.zimbra@coherentlogix.com>
2014-06-02 16:28 ` David Friedman
2014-06-02 17:33   ` Larry Hall (Cygwin)
2014-06-02 19:19     ` David Friedman
2014-06-02 20:08       ` Larry Hall (Cygwin)

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