i386_set_ldt and wine on AMD64

Nathan Whitehorn nathanw at uchicago.edu
Sat Dec 30 18:02:19 PST 2006

On Dec 30, 2006, at 7:39 PM, Roland Smith wrote:

> On Sat, Dec 30, 2006 at 05:10:08PM -0500, Siavosh Benabbas wrote:
>> Hi,
>> I know that this is brought up several time on this list, but I  
>> wanted to
>> run wine on my FreeBSD AMD64 machine.
>> I know that a 64-bit wine is nearly impossible but I thought that  
>> an i386
>> compilation should work.
> You'd need a cross-compiler to start with. That's the easy part.
> Then you'd need ports infrastructure to compile 32-bit ports on  
> amd64. At
> this moment that doesn't exist yet:
> http://wikitest.freebsd.org/G%C3%A1borK%C3%B6vesd%C3%A1n
> This could be a _huge_ undertaking, because things like patches and  
> parts
> of the port Makefile might depend on if you're cross-compiling or
> not. I'm not sure if that is worth the effort. Time might be better
> spent getting ports to compile natively for all supported platforms  
> and
> using a virtual machine for things that don't work.
> Then you'd need to compile 32 bit versions of all the libraries  
> that wine
> depends on. If you have a look at the dependancies of wine, and  
> recurse
> through them, you'll see that this is a lot of libraries.
> Do you have any programs that require amd64 because of address  
> space or
> other concerns? (if you have processes that run out of memory, have  
> you
> played with the kernel tunables? See /boot/defaults/loader.conf)
> Otherwise, why not run i386 if you require wine?

One thing you can do (I had to do this for ghostscript, which is  
broken on amd64) is to set up a second machine with i386, build the  
ports there, too, and then run the binaries out of an NFS-mounted / 
usr/local/bin32. This requires also setting up a lib32 to go with it,  
and setting up some scripts to set LD_32_LIBRARY_PATH to the right  
things (ldconfig -32 is broken in interesting ways on 6-STABLE at the  
moment). Of course, with wine dynamically loading libraries at run  
time, it might have /usr/local/lib hardcoded into it and might break  
anyway. Hard to say.

So, in sum: if you need wine, just run i386.

More information about the freebsd-amd64 mailing list