Hi,

Thanks for the hints but if I got it right there's no way to get win32 
progs/libs running on an amd64 NetBSD. Well, that's a pity but I'll 
stick to wine64 then. For all the browser plugins (what was mostly my focus of 
all win stuff) I'll "just" need to try to get pipelight working. 
Yet another challenge:) Thanks again!

Best regards,
r0ller

-------- Eredeti levél --------

Feladó:
coypu@SDF.ORG

Tárgy: Re: how to build 32-bit pkgsrc on amd64

Címzett: r0ller <
r0ller@freemail.hu
>


On Sun, Nov 27, 2016 at 09:36:11PM +0100, r0ller wrote:
> Hi All,
>
> There's a guide on how to build 32-bit pkgsrc on amd64 ( 
https://mail-index.netbsd.org/pkgsrc-users/2008/12/16/msg008887.html ) which I 
tried yesterday but with no success. During building bootstrap, I get an error:
>
> "ld: Relocatable linking with relocations from format elf32-i386 to 
format elf64-x86-64 is not supported"
>
> I googled a bit but the only advice I found was to pass the -m32 option to 
the compiler. The only way to do that was to modify the bootstrap script so 
that it puts all the lines into mk.conf already in step 2, that were described 
in?the guide a step later (step 3). However, that didn't help either. 
Actually, what I'd like to achieve is to have the 32-bit libs for wine so 
that my wine64 installation can run both 32 and 64 bit programs. Is this the 
right way to do it? By the way, do I need to install then one of the 
netbsd32_compat libs for the 32bit libs? If so, then the latest one 
(netbsd32_compat40) seems to be targeting NetBSD4.0 compatibility -where do I 
find netbsd32_compat for 6.0 or 7.0? I feel a bit confused about the wine 
multilib setup and there isn't much info about how to do it on NetBSD. Any 
help is welcome:)
>
> Thanks & regards,
> r0ller

Since II've attempted to do t he same, I'll try to close you in on the 
details:

Generally, there is no need for netbsd32_compat itself now, as the compat 
libraries
already exist. You will however find that some stuff is still missing, and 
that's
fontconfig from 32bit Xorg.

An alternative I've used is unpacking a full NetBSD i386 install into a 
directory
(say "/emul/netbsd32") and then using:
cd /emul/netbsd32
mkdir usr/pkgsrc; cp /etc/resolv.conf etc/; cp /etc/mk.conf etc/
mount -t null /dev dev/; mount -t null /dev/pts dev/pts; mount -t null 
/usr/pkgsrc usr/pkgsrc
chroot . /bin/sh

This is sufficient fo rbuilding 32bit wine on a 64bit machine.

It's probably possible to just create a package that does this for us. 
However...

You will now run into the real problem of real wine* on netbsd/amd64, USER_LDT.
Programs you will attempt to run will all fail (all 32bit wine uses LDT stuff),
because a syscall returns an error message.

>From my best understanding (and I am not very familiar with x86):
LDT is 'User-settable local descriptor table', some way of storing data 
within
a process that is different. It is only used by 32bit Windows (and no unixes).

NetBSD/i386 has some code that allows using it, but NetBSD/amd64 disables it,
There are some differences between i386 and amd64, which mean in its current
state it will not even build (a kernel that supports this).

The differences are not particularly great, but personally I found it 
challenging
because I'm not familiar with x86.

* I call it real wine because most Windows is 32bit, and even most 64bit stuff
is hidden by a 32bit launcher, I imagine in order to give a friendly warning
instead of outright crashing.

Some people are using i386 + PAE to continue taking advantage of their 
amounts
of RAM purely for wine.

Reply via email to