WINE in jail [Was: i386_set_ldt and wine on AMD64]

Kostik Belousov kostikbel at gmail.com
Fri Dec 12 05:41:41 PST 2008


On Fri, Dec 12, 2008 at 01:00:41PM +0100, Lapo Luchini wrote:
> 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.
> 
> Easiest approach to avoid that part seems to be seting up a full i386
> jail inside the amd64 host, and install WINE normally from the ports.
> 
> >From man jail(8):
> 
>   host# D=/here/is/the/jail
>   host# cd /usr/src
>   host# mkdir -p $D
>   host# make world DESTDIR=$D
>   host# make distribution DESTDIR=$D
>   host# mount -t devfs devfs $D/dev
> 
> But as suggested here <http://en.jnlin.org/2008/06/07/12/> I actually:
> 
>   host# make world distribution TARGET_ARCH=i386 TARGET=i386 DESTDIR=$D
>   host# ln -s ld-elf.so.1 $D/libexec/ld-elf32.so.1
This is not needed on recent HEAD or RELENG_7.

> 
> Then added IP alias for jail use, set up a unionfs over ports (to avoid
> having them double) and can correctly login in the jail:
> 
>   host# ifconfig em0 inet $IP/32 alias
>   host# mount -t unionfs -o noatime,below /usr/ports $D/usr/ports
>   host# jail $D $HOSTNAME $IP /bin/tcsh
> 
> >From there I normally installed WINE:
> 
>   jail# cd /usr/ports/emulatos/wine
>   jail# make install clean
> 
> ???but then it just ???bus error??? dumps on me??? something to do with LDT:
> 
>   jail# winecfg
>   Bus error (core dumped)
>   jail# gdb `which wine-pthread` wine-pthread.core
>   (gdb) bt
>   #0  0x7df3b2e9 in wine_ldt_init_fs () from /usr/local/lib/libwine.so.1
>   #1  0x7bf00fb3 in init_pthread_functions ()
>   #2  0x7e36a81f in thread_init () from /usr/local/lib/wine/ntdll.dll.so
>   #3  0x7e345d98 in __wine_process_init () from
>   /usr/local/lib/wine/ntdll.dll.so
>   #4  0x7df3bd74 in wine_init () from /usr/local/lib/libwine.so.1
>   #5  0x7df571eb in wine_casemap_upper () from
>   /usr/local/lib/libwine.so.1

Hmm, so you have a wine on amd64 and willingness to test ?
Please, try
http://people.freebsd.org/~kib/misc/amd64_ldt.2.patch
patch is against HEAD.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-amd64/attachments/20081212/c2e407c0/attachment.pgp


More information about the freebsd-amd64 mailing list