wine on linux-x64_64: why need ia32 compat libs to compile?!

Questions about Wine on Linux
Locked
rekuli
Level 2
Level 2
Posts: 26
Joined: Tue Dec 22, 2009 10:12 pm

wine on linux-x64_64: why need ia32 compat libs to compile?!

Post by rekuli »

A question to all who can help, wine developer or not:

I wanted to compile a newer wine release (1.5.22 and/or 1.5.30) on my amd64 host, but the configure script refuses to continue when all required ia32 compat libs are not installed. My distro does NOT offer some of them, so I'd have to cross-compile them first.

Hence, the question:
If I want to compile wine as a 64bit aplication that runs normal 32bit windows software, why do I need ia32 libs to compile?
IMHO, why should I cross-compile anything prior to compiling wine, when wine ought to be able to adapt itself to the host it gets compiled on?

Also, IMHO, this dependancy is a bit silly and definitely a bug in the wine sources if they rely on 32bit integer sizes in the host's libraries instead of defining their own (eg. #define winint uint32).

Please give some purposeful advice here –– what I could do, or even what the wine developers should do about this :-)

Regards, rekuli
User avatar
dimesio
Moderator
Moderator
Posts: 13266
Joined: Tue Mar 25, 2008 10:30 pm

Re: wine on linux-x64_64: why need ia32 compat libs to compi

Post by dimesio »

rekuli wrote: If I want to compile wine as a 64bit aplication that runs normal 32bit windows software, why do I need ia32 libs to compile?
32 bit libraries are needed to run 32 bit apps. There is no way around this.

As for compiling Wine, the default is 32 bit. To compile 64 bit Wine you need to specify --enable-win64 when running ./configure. However, by itself, 64 bit Wine won't be of much practical use, as most Windows apps are still 32 bit. http://wiki.winehq.org/Wine64.
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Re: wine on linux-x64_64: why need ia32 compat libs to compi

Post by DanKegel »

Try this, it's the easiest way to build a 32/64 bit wine on Ubuntu:

http://wiki.winehq.org/BuildingBiarchWineOnUbuntu
rekuli
Level 2
Level 2
Posts: 26
Joined: Tue Dec 22, 2009 10:12 pm

Re: wine on linux-x64_64: why need ia32 compat libs to compi

Post by rekuli »

dimesio wrote:
rekuli wrote: If I want to compile wine as a 64bit aplication that runs normal 32bit windows software, why do I need ia32 libs to compile?
32 bit libraries are needed to run 32 bit apps. There is no way around this.

As for compiling Wine, the default is 32 bit. To compile 64 bit Wine you need to specify --enable-win64 when running ./configure. However, by itself, 64 bit Wine won't be of much practical use, as most Windows apps are still 32 bit. http://wiki.winehq.org/Wine64.
I was talking about *compiling* wine for x86_64, not running a x86-32bit wine on amd64. For the win32 apps, the 32bit components of directx and a standard contingent of ia32 compatibility libs are sufficient. But there are more and different ia32libs required to *build* wine-x86_64, which is a contradiction in itself. And I am well aware that building wine as 64bit means that it runs win64 apps only (that is why I wrote about defining wines *own* integer sizes within the sources).

Again:
Wine misses definitions like this:

#define winint unsigned int
#if defined HOST_64BIT && defined WINENGINE_32BIT
#define winint uint32

#else
#if defined HOST_64BIT && defined WINENGINE_64BIT
#define winint uint64

#endif
#endif
… and subsequent use of winint instead of host-native integer "int".

DanKegel: tnx for that hint, I'll give it a look.
User avatar
dimesio
Moderator
Moderator
Posts: 13266
Joined: Tue Mar 25, 2008 10:30 pm

Re: wine on linux-x64_64: why need ia32 compat libs to compi

Post by dimesio »

Your original post (which you just quoted yourself) said
If I want to compile wine as a 64bit aplication that runs normal 32bit windows software
and that's what I responded to.

As to why you need 32 bit libs to compile 64 bit Wine, the Wine64 wiki page mentions that
The x86_64 ABI differs between Linux and Windows. One of the major differences is the size of the "long" type, which is 64 bits in Linux but 32 bits in Windows.
My guess is that has something to do with it (but I'm not a developer, so I could be completely wrong).
Locked