public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 64-bit vs. 32-bit
@ 2014-04-25 17:26 Tom Szczesny
  2014-04-25 17:38 ` Christopher Faylor
  2014-04-25 21:44 ` Warren Young
  0 siblings, 2 replies; 8+ messages in thread
From: Tom Szczesny @ 2014-04-25 17:26 UTC (permalink / raw)
  To: cygwin

I have a 64-bit Windows laptop, and installed Cygwin several years ago.
I wish to verify that I did install the 64-bit installation.
I get the following results:

cygcheck -V
cygcheck (cygwin) 1.7.15

uname
CYGWIN_NT-6.1-WOW64

If I did install the 64-bit version, when I rebuild my Linux app on
Cygwin, do I automatically get a 64-bit executable (that will not run
on a 32-bit Windows computer)?

--
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] 8+ messages in thread

* Re: 64-bit vs. 32-bit
  2014-04-25 17:26 64-bit vs. 32-bit Tom Szczesny
@ 2014-04-25 17:38 ` Christopher Faylor
  2014-04-25 17:47   ` Tim Prince
  2014-04-25 21:44 ` Warren Young
  1 sibling, 1 reply; 8+ messages in thread
From: Christopher Faylor @ 2014-04-25 17:38 UTC (permalink / raw)
  To: cygwin

On Fri, Apr 25, 2014 at 01:26:22PM -0400, Tom Szczesny wrote:
>I have a 64-bit Windows laptop, and installed Cygwin several years ago.
>I wish to verify that I did install the 64-bit installation.
>I get the following results:
>
>cygcheck -V
>cygcheck (cygwin) 1.7.15
>
>uname
>CYGWIN_NT-6.1-WOW64
>
>If I did install the 64-bit version, when I rebuild my Linux app on
>Cygwin, do I automatically get a 64-bit executable (that will not run
>on a 32-bit Windows computer)?

1) No, you didn't install a 64-bit version of Cygwin.  "uname -a" should
make that clear.  You'll need to instal a 64-bit version if that's what
you want.

2) Cygwin doesn't build Linux apps.  If you have a cross-compiler then
it won't automatically decide to build 64-bit Linux apps because you
are on a 64-bit sytem.

--
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] 8+ messages in thread

* Re: 64-bit vs. 32-bit
  2014-04-25 17:38 ` Christopher Faylor
@ 2014-04-25 17:47   ` Tim Prince
  0 siblings, 0 replies; 8+ messages in thread
From: Tim Prince @ 2014-04-25 17:47 UTC (permalink / raw)
  To: cygwin


On 4/25/2014 1:38 PM, Christopher Faylor wrote:
> On Fri, Apr 25, 2014 at 01:26:22PM -0400, Tom Szczesny wrote:
>> I have a 64-bit Windows laptop, and installed Cygwin several years ago.
>> I wish to verify that I did install the 64-bit installation.
>> I get the following results:
>>
>> cygcheck -V
>> cygcheck (cygwin) 1.7.15
>>
>> uname
>> CYGWIN_NT-6.1-WOW64
>>
>> If I did install the 64-bit version, when I rebuild my Linux app on
>> Cygwin, do I automatically get a 64-bit executable (that will not run
>> on a 32-bit Windows computer)?
> 1) No, you didn't install a 64-bit version of Cygwin.  "uname -a" should
> make that clear.  You'll need to instal a 64-bit version if that's what
> you want.
>
> 2) Cygwin doesn't build Linux apps.  If you have a cross-compiler then
> it won't automatically decide to build 64-bit Linux apps because you
> are on a 64-bit sytem.
>
>
There are cygwin 64- and 32-bit native compilers and mingw 32- and 
64-bit compilers on the setup.exe menu in case you mean to build for one 
of those targets.

-- 
Tim Prince


--
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] 8+ messages in thread

* Re: 64-bit vs. 32-bit
  2014-04-25 17:26 64-bit vs. 32-bit Tom Szczesny
  2014-04-25 17:38 ` Christopher Faylor
@ 2014-04-25 21:44 ` Warren Young
  2014-04-25 22:29   ` Chris J. Breisch
  1 sibling, 1 reply; 8+ messages in thread
From: Warren Young @ 2014-04-25 21:44 UTC (permalink / raw)
  To: Cygwin-L

On 4/25/2014 11:26, Tom Szczesny wrote:
>
> CYGWIN_NT-6.1-WOW64

"WOW64" means 32-bit Windows emulated on top of 64-bit Windows.[1]  This 
tells you that Cygwin is running inside that 32-bit environment.

> If I did install the 64-bit version, when I rebuild my Linux app on
> Cygwin, do I automatically get a 64-bit executable (that will not run
> on a 32-bit Windows computer)?

You actually have to go out of your way to get a 32-bit executable when 
running 64-bit Cygwin, and vice versa.  So yes, if you install 64-bit 
Cygwin, you don't have to worry about accidentally getting 32-bit 
executables.

You don't have to guess and hope, though.  From 32-bit Cygwin:

     $ file /bin/ls
     /bin/ls: PE32 executable (console) Intel 80386 (stripped to 
external PDB), for MS Windows

     $ file /cygdrive/c/cygwin64/bin/ls
     /cygdrive/c/cygwin64/bin/ls: PE32+ executable (console) x86-64, for 
MS Windows

file(1) saith sooth what what form of executable thou hast wrought.

You might also find this piece enlightening: http://goo.gl/qv5ki7



[1] http://goo.gl/uGmKYv

--
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] 8+ messages in thread

* Re: 64-bit vs. 32-bit
  2014-04-25 21:44 ` Warren Young
@ 2014-04-25 22:29   ` Chris J. Breisch
  0 siblings, 0 replies; 8+ messages in thread
From: Chris J. Breisch @ 2014-04-25 22:29 UTC (permalink / raw)
  To: cygwin

Warren Young wrote:
> On 4/25/2014 11:26, Tom Szczesny wrote:
>>
>> CYGWIN_NT-6.1-WOW64
>
> "WOW64" means 32-bit Windows emulated on top of 64-bit Windows.[1] This
> tells you that Cygwin is running inside that 32-bit environment.
>
[snip]
> You don't have to guess and hope, though. From 32-bit Cygwin:
>
> $ file /bin/ls
> /bin/ls: PE32 executable (console) Intel 80386 (stripped to external
> PDB), for MS Windows
>
> $ file /cygdrive/c/cygwin64/bin/ls
> /cygdrive/c/cygwin64/bin/ls: PE32+ executable (console) x86-64, for MS
> Windows
>
> file(1) saith sooth what what form of executable thou hast wrought.
>
> You might also find this piece enlightening: http://goo.gl/qv5ki7
>
>

That is enlightening. I have a rather different, and very non-standard 
setup, making use of $PROCESSOR_ARCHITECTURE. This environment variable 
is set in both 32-bit and 64-bit Cygwin. In the former, it's set to 
"x86" and in the latter, it's set to "AMD64".

So, I have my 64-bit Cygwin root set to C:/cygwin/AMD64, and my 32-bit 
Cygwin root set to C:/cygwin/x86. My package root for both is 
C:\cygwin\packages, and I have /home in both environments mounted on 
C:/cygwin/home.

I script all my builds, and the script I use sets the build directory 
always to build_${PROCESSOR_ARCHITECTURE}. In a similar way, my output 
files are named things like configure_${PROCESSOR_ARCHITECTURE}.out, 
make_${PROCESSOR_ARCHITECTURE}.out, etc.

But, as you mention in your SO response, I'd never dream of sharing 
/usr/local this way.

Oh, finally, I set the title of my mintty or xterm to contain 
${PROCESSOR_ARCHITECTURE} as well, so I don't forget where I am.

-- 
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] 8+ messages in thread

* Re: 64-bit vs. 32-bit
  2014-04-25 18:21 ` Erwin Waterlander
@ 2014-04-25 19:15   ` Christopher Faylor
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher Faylor @ 2014-04-25 19:15 UTC (permalink / raw)
  To: cygwin

On Fri, Apr 25, 2014 at 08:21:57PM +0200, Erwin Waterlander wrote:
>Op 25-4-2014 20:13 Tom Szczesny schreef:
>> result from uname -a
>> CYGWIN_NT-6.1-WOW64 Toshiba 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin
>
>uname -a on 64 bit cygwin should say something like:
>
>CYGWIN_NT-6.1 PC2 1.7.28(0.271/5/3) 2014-02-09 21:06 x86_64 Cygwin
>
>Note there is no "WOW64", and there is a "x86_64".
>
>>Sorry that I was not clear.  I have an open source app (hosted on
>>github.com) that was developed for Linux.  It compiles and works on
>>Windows-64 using my current version of Cygwin, but I suspect that I am
>>getting a 32-bit executable as a result.
>>
>>I wish to get a 64-bit executable, which I intend to redistribute to
>>other Windows users.
>>
>>Do I need to uninstall my 32-bit version of Cygwin from my laptop
>>before I install the 64-bit version of Cygwin?
>>
>No, you can have both 32 and 64 bit Cygwin installed.

Right.  Just install the 64-bit Cygwin in a different location.

Note that if you distribute your executable you will have to pay
attention to the terms of the GPL - you'll need to provide all of the
source code for everything you distribute, including the Cygwin DLL.

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] 8+ messages in thread

* Re: 64-bit vs. 32-bit
  2014-04-25 18:13 Tom Szczesny
@ 2014-04-25 18:21 ` Erwin Waterlander
  2014-04-25 19:15   ` Christopher Faylor
  0 siblings, 1 reply; 8+ messages in thread
From: Erwin Waterlander @ 2014-04-25 18:21 UTC (permalink / raw)
  To: cygwin

Op 25-4-2014 20:13 Tom Szczesny schreef:
> result from uname -a
> CYGWIN_NT-6.1-WOW64 Toshiba 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin

uname -a on 64 bit cygwin should say something like:

CYGWIN_NT-6.1 PC2 1.7.28(0.271/5/3) 2014-02-09 21:06 x86_64 Cygwin

Note there is no "WOW64", and there is a "x86_64".

> Sorry that I was not clear.
> I have an open source app (hosted on github.com) that was developed
> for Linux.  It compiles and works on Windows-64 using my current
> version of Cygwin, but I suspect that I am getting a 32-bit executable
> as a result.
>
> I wish to get a 64-bit executable, which I intend to redistribute to
> other Windows users.
>
> Do I need to uninstall my 32-bit version of Cygwin from my laptop
> before I install the 64-bit version of Cygwin?
>
No, you can have both 32 and 64 bit Cygwin installed.

-- 
Erwin Waterlander
http://waterlan.home.xs4all.nl/


--
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] 8+ messages in thread

* 64-bit vs. 32-bit
@ 2014-04-25 18:13 Tom Szczesny
  2014-04-25 18:21 ` Erwin Waterlander
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Szczesny @ 2014-04-25 18:13 UTC (permalink / raw)
  To: cygwin

result from uname -a
CYGWIN_NT-6.1-WOW64 Toshiba 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin

Sorry that I was not clear.
I have an open source app (hosted on github.com) that was developed
for Linux.  It compiles and works on Windows-64 using my current
version of Cygwin, but I suspect that I am getting a 32-bit executable
as a result.

I wish to get a 64-bit executable, which I intend to redistribute to
other Windows users.

Do I need to uninstall my 32-bit version of Cygwin from my laptop
before I install the 64-bit version of Cygwin?

--
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] 8+ messages in thread

end of thread, other threads:[~2014-04-25 22:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25 17:26 64-bit vs. 32-bit Tom Szczesny
2014-04-25 17:38 ` Christopher Faylor
2014-04-25 17:47   ` Tim Prince
2014-04-25 21:44 ` Warren Young
2014-04-25 22:29   ` Chris J. Breisch
2014-04-25 18:13 Tom Szczesny
2014-04-25 18:21 ` Erwin Waterlander
2014-04-25 19:15   ` Christopher Faylor

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