Open allquixotic opened 8 years ago
pkgsrc does have the previous Wine stable (1.6.2) and turns out I can make it build 32bit on SmartOS with just two minor modifications and run 'wine cmd' properly. I'll do that for the starters.
The next step would be to update it to the current 1.8 stable, where more work will likely be involved (must be a reason why nobody has cared to updated it in the past 2.5 years).
wine 1.9.11 (latest devel release) builds fine on SmartOS joyent zone, 32-bit, and here is proof (cmd.exe is a 32-bit Windows program running at the end there).
Build notes:
#ifdef _SCO_DS
block that includes<sys/regset.h>
, but it also does#define gregs regs
, which we don't want (breaks the compile). Would be nice if we could add an#ifdef __sun
block to only#include <sys/regset.h>
but not#define gregs regs
, unlike__SCO_DS
.These two changes are minor enough that upstream might be willing to accept some form of fix for them, though probably not the hackjob fixes I cooked up in 5 minutes after diagnosing the problems.
Caveats/challenges:
gcc -m32
on a 64-bit zone just fine, but I don't think we have the 32-bit system libraries in the 64-bit package set, do we?--enable-win64
flag to./configure
or./autogen.sh
. However, it is potentially desirable to enable running 32-bit binaries within a 64-bit instance of SmartOS. Ubuntu, Fedora, et al. solve this problem by having multiple architectures library support and have, e.g., 32-bit libs in /usr/lib and 64-bit libs in /usr/lib64. SmartOS would have to do something similar to be able to ship 32-bit Wine on 64-bit SmartOS instances, unless we were able to compile it statically and just ship the wine binaries including all the 32-bit dependencies in the final linked binaries.Also, on Ubuntu and Fedora, somehow they have a multi-arch wine command that I think can run both 32-bit and 64-bit Windows binaries (that is, both Win32 and Win64) in a single binary. I'm not sure how this works (wrapper script, perhaps?) but I know it does require the dual 32-bit/64-bit libraries, so that would be a prerequisite at least (unless, again, we want to statically link the world and ship that).
Purpose
The purpose of getting wine running on SmartOS: