* CYGWIN withholds error message when trying to run 64-bit binary on 32-bit PC
@ 2011-04-29 18:35 John Ottusch
2011-04-29 20:23 ` Corinna Vinschen
0 siblings, 1 reply; 3+ messages in thread
From: John Ottusch @ 2011-04-29 18:35 UTC (permalink / raw)
To: cygwin
I have a Windows console application that I build in both 32-bit and 64-bit
versions. They both have the same name (fsr.exe).
The 32-bit version runs from a CYGWIN bash shell console window on a 32-bit PC
and a 64-bit PC. The 64-bit version runs from a Cygwin bash shell console window
only on a 64-bit PC.
If a user mistakenly runs the 64-bit version from a CYGWIN bash shell console
window on a 32-bit Windows PC he gets this message:
bash: ./fsr.exe: Permission denied
That's not very revealing.
On the other hand, if he launches the same command from a CMD console window on
the same 32-bit Windows PC, he gets this back:
This version of fsr.exe is not compatible with the version of Windows you're
running. Check your computer's system information to see whether you need a x86
(32-bit) or x64 (64-bit) version of the program, and then contact the software
publisher.
The second result is closer to what I was hoping for.
So my question is this: Why isn't CYGWIN responding with the more helpful error
message and is there anything I can do to make it respond that way instead?
jjo
--
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] 3+ messages in thread
* Re: CYGWIN withholds error message when trying to run 64-bit binary on 32-bit PC
2011-04-29 18:35 CYGWIN withholds error message when trying to run 64-bit binary on 32-bit PC John Ottusch
@ 2011-04-29 20:23 ` Corinna Vinschen
2011-04-30 0:29 ` John Ottusch
0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2011-04-29 20:23 UTC (permalink / raw)
To: cygwin
On Apr 29 17:52, John Ottusch wrote:
> I have a Windows console application that I build in both 32-bit and 64-bit
> versions. They both have the same name (fsr.exe).
>
> The 32-bit version runs from a CYGWIN bash shell console window on a 32-bit PC
> and a 64-bit PC. The 64-bit version runs from a Cygwin bash shell console window
> only on a 64-bit PC.
>
> If a user mistakenly runs the 64-bit version from a CYGWIN bash shell console
> window on a 32-bit Windows PC he gets this message:
>
> bash: ./fsr.exe: Permission denied
>
> That's not very revealing.
>
> On the other hand, if he launches the same command from a CMD console window on
> the same 32-bit Windows PC, he gets this back:
>
> This version of fsr.exe is not compatible with the version of Windows you're
> running. Check your computer's system information to see whether you need a x86
> (32-bit) or x64 (64-bit) version of the program, and then contact the software
> publisher.
>
> The second result is closer to what I was hoping for.
>
> So my question is this: Why isn't CYGWIN responding with the more helpful error
> message and is there anything I can do to make it respond that way instead?
THe problem is that the Win32 error code ERROR_EXE_MACHINE_TYPE_MISMATCH
isn't mapped to a POSIX errno. Thus it's converted to the default EACCES.
I checked in a patch to CVS which maps the error code to ENOEXEC.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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] 3+ messages in thread
* Re: CYGWIN withholds error message when trying to run 64-bit binary on 32-bit PC
2011-04-29 20:23 ` Corinna Vinschen
@ 2011-04-30 0:29 ` John Ottusch
0 siblings, 0 replies; 3+ messages in thread
From: John Ottusch @ 2011-04-30 0:29 UTC (permalink / raw)
To: cygwin
>
> THe problem is that the Win32 error code ERROR_EXE_MACHINE_TYPE_MISMATCH
> isn't mapped to a POSIX errno. Thus it's converted to the default EACCES.
> I checked in a patch to CVS which maps the error code to ENOEXEC.
>
> Corinna
>
Mucho thanko.
I'll look forward to the next CYGWIN release displaying the improved behavior.
jjo
--
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] 3+ messages in thread
end of thread, other threads:[~2011-04-29 20:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-29 18:35 CYGWIN withholds error message when trying to run 64-bit binary on 32-bit PC John Ottusch
2011-04-29 20:23 ` Corinna Vinschen
2011-04-30 0:29 ` John Ottusch
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).