Re: [gentoo-user] Re: 32bit or 64bit

2012-07-19 Thread Michael Mol
On Thu, Jul 19, 2012 at 8:55 AM, Nikos Chantziaras rea...@gmail.com wrote:
 On 18/07/12 00:14, Alecks Gates wrote:

 On Tue, Jul 17, 2012 at 3:57 PM, Nikos Chantziaras rea...@gmail.com
 wrote:

 64-bit Wine cannot run 32-bit Windows applications.  You need a 32-bit
 Wine
 for that.  And since in 99.9% of Windows software is 32-bit... well, you
 get
 the point :-)


 Sure, but 64-bit wine can run either a win32 or a win64 config, and
 you have to enable win64 with the win64 USE flag.  I believe this
 makes the win64 config default and you have to set WINEARCH=win32 if
 you want only 32-bit.


 Interesting that Wine aims to do the WOW64 thing.  That's certainly news to
 me :-)

Not really surprising. There's an IsWow64Process() in the Windows API
to allow processes to detect the nature of the environment they're
running on, since sometimes that's something you need to know. :)

-- 
:wq



Re: [gentoo-user] Re: 32bit or 64bit

2012-07-19 Thread Alan McKinnon
On Thu, 19 Jul 2012 16:31:42 +0300
Nikos Chantziaras rea...@gmail.com wrote:

 On 19/07/12 16:03, Michael Mol wrote:
  On Thu, Jul 19, 2012 at 8:55 AM, Nikos Chantziaras
  rea...@gmail.com wrote:
  Interesting that Wine aims to do the WOW64 thing.  That's
  certainly news to me :-)
 
  Not really surprising. There's an IsWow64Process() in the Windows
  API to allow processes to detect the nature of the environment
  they're running on, since sometimes that's something you need to
  know. :)
 
 WOW64 relies on 32-bit libraries to do it's job though.  It's well
 known that 32-bit code cannot link against 64-bit libraries.  If
 building a 64-bit only version of Wine (since you cannot build any
 32-bit code on non-multilib Gentoo), the question arises on how Wine
 is doing it.
 
 

Stupid question incoming:

What's the WOW in WOW64?

The more I read it as World of Warcraft the more I see that it doesn't
actually fit :-)



-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Re: 32bit or 64bit

2012-07-19 Thread Michael Hampicke
 Stupid question incoming:
 
 What's the WOW in WOW64?
 
 The more I read it as World of Warcraft the more I see that it doesn't
 actually fit :-)

WOW = Windows-on-Windows



Re: [gentoo-user] Re: 32bit or 64bit

2012-07-19 Thread Michael Mol
On Thu, Jul 19, 2012 at 9:43 AM, Alan McKinnon alan.mckin...@gmail.com wrote:
 On Thu, 19 Jul 2012 16:31:42 +0300
 Nikos Chantziaras rea...@gmail.com wrote:

 On 19/07/12 16:03, Michael Mol wrote:
  On Thu, Jul 19, 2012 at 8:55 AM, Nikos Chantziaras
  rea...@gmail.com wrote:
  Interesting that Wine aims to do the WOW64 thing.  That's
  certainly news to me :-)
 
  Not really surprising. There's an IsWow64Process() in the Windows
  API to allow processes to detect the nature of the environment
  they're running on, since sometimes that's something you need to
  know. :)

 WOW64 relies on 32-bit libraries to do it's job though.  It's well
 known that 32-bit code cannot link against 64-bit libraries.  If
 building a 64-bit only version of Wine (since you cannot build any
 32-bit code on non-multilib Gentoo), the question arises on how Wine
 is doing it.



 Stupid question incoming:

 What's the WOW in WOW64?

 The more I read it as World of Warcraft the more I see that it doesn't
 actually fit :-)

WOW64 is Windows On Windows 64-bit. It's how 32-bit Windows
applications run on 64-bit Windows.

By and large, the way 32-bit and 64-bit applications and libraries can
communicate with each other are very limited. 64-bit programs can't
load 32-bit libraries, and vice versa. Some environment variables
containing path information are switched out depending on if the
program is 32-bit or 64-bit. Accesses to some registry paths are
shunted to one place or another, depending on if the program is 32-bit
or 64-bit.
For system libraries, 64-bit windows provides both 32-bit and 64-bit
versions of supported libraries, rather like multilib environments on
Linux.

In essence, if you get 64-bit Windows, you're getting two copies of
Windows, a 64-bit version and a 32-bit version, and the kernel shunts
32-bit programs into the 32-bit version while maintaining a reasonably
high degree of interoperability; it's not a complete sandbox.

32-bit and 64-bit processes can still communicate with each other.
mmap()'d files still work the same way, as the filesystem paths don't
change. Named objects such as pipes, events, mutexes...all of those
are handled by the kernel, which has mapping code to allow 32-bit and
64-bit processes to independently gain handles on the same named
objects. (Subject to security attributes and restrictions, of course.)

But, yeah. That's Windows, on Windows 64-bit, or WOW64.

(P.S. For the Horde!)
-- 
:wq



Re: [gentoo-user] Re: 32bit or 64bit

2012-07-19 Thread Michael Mol
On Thu, Jul 19, 2012 at 10:14 AM, Nikos Chantziaras rea...@gmail.com wrote:
 On 19/07/12 17:06, Michael Mol wrote:

 For system libraries, 64-bit windows provides both 32-bit and 64-bit
 versions of supported libraries, rather like multilib environments on
 Linux.


 So how does Wine run 32-bit Windows programs on a non-multilib Gentoo?
 Doesn't it need 32-bit *.dll.so files?

WINE is an attempt at a bug-for-bug implementation of the Windows API.
I really don't know how it operates internally. It's something I've
been meaning to get into; I missed out on playing The Old Republic
with my wife.

-- 
:wq



Re: [gentoo-user] Re: 32bit or 64bit

2012-07-19 Thread Alan McKinnon
On Thu, 19 Jul 2012 10:06:18 -0400
Michael Mol mike...@gmail.com wrote:

 On Thu, Jul 19, 2012 at 9:43 AM, Alan McKinnon
 alan.mckin...@gmail.com wrote:
  On Thu, 19 Jul 2012 16:31:42 +0300
  Nikos Chantziaras rea...@gmail.com wrote:
 
  On 19/07/12 16:03, Michael Mol wrote:
   On Thu, Jul 19, 2012 at 8:55 AM, Nikos Chantziaras
   rea...@gmail.com wrote:
   Interesting that Wine aims to do the WOW64 thing.  That's
   certainly news to me :-)
  
   Not really surprising. There's an IsWow64Process() in the Windows
   API to allow processes to detect the nature of the environment
   they're running on, since sometimes that's something you need to
   know. :)
 
  WOW64 relies on 32-bit libraries to do it's job though.  It's well
  known that 32-bit code cannot link against 64-bit libraries.  If
  building a 64-bit only version of Wine (since you cannot build any
  32-bit code on non-multilib Gentoo), the question arises on how
  Wine is doing it.
 
 
 
  Stupid question incoming:
 
  What's the WOW in WOW64?
 
  The more I read it as World of Warcraft the more I see that it
  doesn't actually fit :-)
 
 WOW64 is Windows On Windows 64-bit. It's how 32-bit Windows
 applications run on 64-bit Windows.
 
 By and large, the way 32-bit and 64-bit applications and libraries can
 communicate with each other are very limited. 64-bit programs can't
 load 32-bit libraries, and vice versa. Some environment variables
 containing path information are switched out depending on if the
 program is 32-bit or 64-bit. Accesses to some registry paths are
 shunted to one place or another, depending on if the program is 32-bit
 or 64-bit.
 For system libraries, 64-bit windows provides both 32-bit and 64-bit
 versions of supported libraries, rather like multilib environments on
 Linux.
 
 In essence, if you get 64-bit Windows, you're getting two copies of
 Windows, a 64-bit version and a 32-bit version, and the kernel shunts
 32-bit programs into the 32-bit version while maintaining a reasonably
 high degree of interoperability; it's not a complete sandbox.
 
 32-bit and 64-bit processes can still communicate with each other.
 mmap()'d files still work the same way, as the filesystem paths don't
 change. Named objects such as pipes, events, mutexes...all of those
 are handled by the kernel, which has mapping code to allow 32-bit and
 64-bit processes to independently gain handles on the same named
 objects. (Subject to security attributes and restrictions, of course.)
 
 But, yeah. That's Windows, on Windows 64-bit, or WOW64.

thanks, that makes sense

 
 (P.S. For the Horde!)

:-)

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Re: 32bit or 64bit

2012-07-17 Thread Alecks Gates
On Tue, Jul 17, 2012 at 3:57 PM, Nikos Chantziaras rea...@gmail.com wrote:
 On 17/07/12 19:43, Alecks Gates wrote:

 On Jul 17, 2012 11:32 AM, Volker Armin Hemmann
 volkerar...@googlemail.com mailto:volkerar...@googlemail.com wrote:
 *snip*
   The only use case that might come up is wine - I don't know anything
 about
   that beast. Haven't had any use for it in years.
  
   --
   #163933
  
 I use wine daily on 64 bit with no problems.


 64-bit Wine cannot run 32-bit Windows applications.  You need a 32-bit Wine
 for that.  And since in 99.9% of Windows software is 32-bit... well, you get
 the point :-)


Sure, but 64-bit wine can run either a win32 or a win64 config, and
you have to enable win64 with the win64 USE flag.  I believe this
makes the win64 config default and you have to set WINEARCH=win32 if
you want only 32-bit.

According to the winehq docs[1] the WINEARCH environment variable
Specifies the Windows architecture to support. It can be set either
to win32 (support only 32-bit applications), or to win64 (support both
64-bit applications and 32-bit ones in WoW64 mode). The architecture
supported by a given Wine prefix is set at prefix creation time and
cannot be changed afterwards. When running with an existing prefix,
Wine will refuse to start if WINEARCH doesn't match the prefix
architecture.  It is meant to be able to run both 64-bit and 32-bit
applications, but I think it's a bit buggy -- I've had some trouble
installing microsoft visual c++ runtimes due to running a win64
config, but I could have been doing it wrong.

[1] http://www.winehq.org/docs/wineusr-guide/x258



Re: [gentoo-user] Re: 32bit or 64bit

2012-07-17 Thread Paul Hartman
On Tue, Jul 17, 2012 at 3:57 PM, Nikos Chantziaras rea...@gmail.com wrote:
 On 17/07/12 19:43, Alecks Gates wrote:

 On Jul 17, 2012 11:32 AM, Volker Armin Hemmann
 volkerar...@googlemail.com mailto:volkerar...@googlemail.com wrote:
 *snip*
   The only use case that might come up is wine - I don't know anything
 about
   that beast. Haven't had any use for it in years.
  
   --
   #163933
  
 I use wine daily on 64 bit with no problems.


 64-bit Wine cannot run 32-bit Windows applications.  You need a 32-bit Wine
 for that.  And since in 99.9% of Windows software is 32-bit... well, you get
 the point :-)

Wine supports a WoW64 setup, where you build both 32-bit and 64-bit
wine, and 32- and 64-bit binaries are interoperable. I just took a
brief look at the gentoo ebuild and it appears to enable this if you
have both win32 and win64 USE flags set. I haven't tried it myself, so
I can't say if or how it really works. :)



Re: [gentoo-user] Re: 32bit or 64bit

2012-07-17 Thread Nilesh Govindrajan
 On Jul 18, 2012 2:52 AM, Paul Hartman paul.hartman+gen...@gmail.com
wrote:
 
  On Tue, Jul 17, 2012 at 3:57 PM, Nikos Chantziaras rea...@gmail.com
wrote:
   On 17/07/12 19:43, Alecks Gates wrote:
  
   On Jul 17, 2012 11:32 AM, Volker Armin Hemmann
   volkerar...@googlemail.com mailto:volkerar...@googlemail.com
wrote:
   *snip*
 The only use case that might come up is wine - I don't know
anything
   about
 that beast. Haven't had any use for it in years.

 --
 #163933

   I use wine daily on 64 bit with no problems.
  
  
   64-bit Wine cannot run 32-bit Windows applications.  You need a
32-bit Wine
   for that.  And since in 99.9% of Windows software is 32-bit... well,
you get
   the point :-)
 
  Wine supports a WoW64 setup, where you build both 32-bit and 64-bit
  wine, and 32- and 64-bit binaries are interoperable. I just took a
  brief look at the gentoo ebuild and it appears to enable this if you
  have both win32 and win64 USE flags set. I haven't tried it myself, so
  I can't say if or how it really works. :)
 
Good discussion, guys. I'll continue with 64bit :)