# Why can't wine and i386-wine be installed simultaneously?



## PaddyMac (Feb 13, 2018)

Every Linux distro I've used allows you to install both 32 and 64-bit versions of wine simultaneously. But on FreeBSD, you can only install one at a time. Why is this? Was this just a poor design choice, or is there some FreeBSD-specific complication that made this difficult or impossible to do? More importantly, can this be fixed?


----------



## shkhln (Feb 13, 2018)

I don't think there are any hard blockers, but making a combined 32- and 64-bit wine build without chroot or cross-repo repackaging hacks would require packaging 32-bit versions of 60+ dependencies (by either making new ports or modifying existing ports in some way) and that looks like a fair amount of work.

It is also worth pointing out that wine is actually compiled with relative paths to its shared libs (through some _rpath_ trickery), so it is possible to unpack at least the 64-bit wine-* package to /opt without installation and run it from there. More so, since wine's wow64 implementation basically consists of the 64-bit wineserver speaking to the 32-bit ntdll.dll.so, if you have two separate 32- and 64-bit wine-* packages (with the same wine version) to enable wow64 support it is sufficient to add both _wine_ and _wine64_ executable loaders to $PATH and start _wineserver_ from the 64-bit package: https://forums.freebsd.org/threads/wine-wow64-and-winetricks-at-x64-wine.62634/#post-370978.


----------



## SirDice (Feb 13, 2018)

PaddyMac said:


> Every Linux distro I've used allows you to install both 32 and 64-bit versions of wine simultaneously. But on FreeBSD, you can only install one at a time. Why is this?


Because the wine-i386 port is more a hack than anything else. It was created because the 64 bit version simply failed to work properly (this has since been fixed). You will notice that Wine is actually the _only_ port that has a i386 version to install on 64 bit. There is no proper framework to install 32 bit ports/packages on a 64 bit FreeBSD. This is different from Linux where you can add an architecture and everything will be dual installed.


----------



## priyadarshan (Feb 14, 2018)

Sometimes it is necessary for me to keep two disagreeing ports within same system or same jail.

I could not find any better alternative than to resort to a pretty ugly kludge.

1. Create `/opt`and `/opt-install`
2. Temporarily add  to `make.conf`:


```
PREFIX=/opt-install
```

3. Build the port to `/opt-install` and rsync that to `/opt`
4. Then remove the port with `make deinstall`.
5. Comment out `PREFIX=/opt-install` line in `make.conf`.

In that way, whatever sits in /opt is completely unrelated to the port system and it is blissfully ignored by ports and packages.

But I always wondered if there was a more straightforward, safer, saner and proper way to do that.


----------



## xchris (Feb 14, 2018)

In fact tt is possible to have a multiple versions of wine installed, not directly anyway, as you need to install the PlayOnBSD, from there you can install any version (even old one's) of wine, each one is being installed on its own directory.


----------



## shkhln (Jun 25, 2018)

https://reviews.freebsd.org/D14721

A valiant attempt. Though the "combined win32 wine-devel build" is completely unnecessary.


----------

