Build vs. Installation i386 / x86_64 Linux confusion

Questions about Wine on Linux
Locked
cparke
Newbie
Newbie
Posts: 2
Joined: Fri Mar 10, 2017 9:20 pm

Build vs. Installation i386 / x86_64 Linux confusion

Post by cparke »

Can somebody please explain/clarify for me how the wine-staging installation works in Linux these days on the 64-bit architecture?

When I install Wine 2.3 staging using the Ubuntu PPA, three main packages appear: wine-staging, wine-staging-amd64, and wine-staging-i386:i386. On 64-bit Ubuntu, installing wine-staging as instructed on the download page results in both wine-staging-amd64 and wine-staging-i386:i386 being installed (both architectures). On disk. both wine and wine64 are in the /bin directory, however just one wineserver and it is a 64-bit EXE. Apparently, this means the Windows registry files and Windows installation is considered 64-bit. Installation was into the /opt/wine-staging directory.

So okay, how do I build this myself? I don't want wine-staging and dealing with bugs, I want wine-stable and I have to pull down the source and build that myself. I pulled down the source for Wine 2.0 and used the tools/wineinstall script, but it just built everything 32-bit, but my previous Wine installation registry was 64-bit and it's incompatible with that! Installation also was into /usr/local. The "Building Wine" Wiki page discusses Multiarch and a shared WoW64, but I think that's a bit out of date and warns that 64-bit Wine has to be installed entirely separately and is buggy. It sounds complicated and bleeding edge.

I just want to build Wine 2.0 stable the same way as Wine 2.3 staging was built for the repository, so I can continue to use the my existing 64-bit Wine installation and won't get breaking updates anymore. But how is this being done so that the 64-bit wineserver works for both clients of both architectures?
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Build vs. Installation i386 / x86_64 Linux confusion

Post by dimesio »

cparke wrote: I pulled down the source for Wine 2.0 and used the tools/wineinstall script, but it just built everything 32-bit
Now you know one of the reasons that script was removed in 2.3. (The other is that the script doesn't warn users about missing dependencies. There's a good chance even your 32 bit build was broken.) https://www.winehq.org/announce/2.3
The "Building Wine" Wiki page discusses Multiarch and a shared WoW64, but I think that's a bit out of date and warns that 64-bit Wine has to be installed entirely separately and is buggy. It sounds complicated and bleeding edge.
That page is up-to-date; it's the wineinstall script that's obsolete. It is possible to build pure 64 bit Wine, but it won't run much of anything and isn't supported. You have to build a shared WoW64 setup, which is what the package you used provided. Yes, building it on Ubuntu is complicated, because you need to use a container. https://wiki.winehq.org/Building_Biarch_Wine_On_Ubuntu

One of our active users also maintains a script for building Wine on Ubuntu that you could try; search the forum for info. (I haven't tried it myself, as I don't use Ubuntu.)

If you're only doing this because you don't want experimental patches, then just use the WineHQ development packages instead of the staging ones. https://wiki.winehq.org/Ubuntu
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Build vs. Installation i386 / x86_64 Linux confusion

Post by Bob Wya »

@cparke,

If you're looking for a way to have your "cake" and eat it...
I've got a build script (as dimesio mentioned) for building Bi-arch/multilib Wine on Ubuntu/Debian.

It's quite a long monolithic BASH script - because I intentially made it as "hands off"/automated as possible. See Github: bobwya/build-multilib-wine ...
  • The script use dual-arch Schroot (Debian Chroot) environments to do the actual building - these Schroot environments can be deleted after each build (if you need the disk space) or simply be updated/ reused...
  • The script won't work with Ubuntu 14.04 (or earlier!!)
  • The script is intended to (locally) install as many copies of Wine/ Wine Staging, as you can be bothered building, in your (Linux) users HOME directory.
  • The script officially support any version of Wine - from version 1.8 to the (bang-up-todate) Git master branches...
  • The script doesn't pull in runtime dependencies of Wine - so you would still need the winehq-staging or winehq-devel package installed to your system root drive.
  • When wine is built to a non-default PREFIX it can be run directly from there (without any interaction with the system-wide WineHQ officially packaged version)...
    Just use the full path:

    Code: Select all

    "${HOME}/usr/bin/wine" winecfg
    Not sure when that feature was introduced to Wine - but previously you had to set a few WINE* env variables to get this (local installation) to work properly...
Full disclaimer I'm not a very active Ubuntu user these days (I mainly use Gentoo). But if you have any issues with the script I'll try and fix them!

Bob
cparke
Newbie
Newbie
Posts: 2
Joined: Fri Mar 10, 2017 9:20 pm

Re: Build vs. Installation i386 / x86_64 Linux confusion

Post by cparke »

dimesio wrote:
cparke wrote: I pulled down the source for Wine 2.0 and used the tools/wineinstall script, but it just built everything 32-bit
Now you know one of the reasons that script was removed in 2.3. (The other is that the script doesn't warn users about missing dependencies. There's a good chance even your 32 bit build was broken.) https://www.winehq.org/announce/2.3
Strange that I found it all then! wine-staging is v2.3 and the script is still included!
dimesio wrote: You have to build a shared WoW64 setup, which is what the package you used provided. Yes, building it on Ubuntu is complicated, because you need to use a container. https://wiki.winehq.org/Building_Biarch_Wine_On_Ubuntu
Is it somehow easier to do on another distro? What makes Ubuntu different or harder? APT package management? If I had instructions to build it properly on another distro like Gentoo or something (what does WineHQ use?), then that would be helpful, but the only documentation on the Wiki is for Ubuntu.
dimesio wrote: One of our active users also maintains a script for building Wine on Ubuntu that you could try; search the forum for info. (I haven't tried it myself, as I don't use Ubuntu.)

If you're only doing this because you don't want experimental patches, then just use the WineHQ development packages instead of the staging ones. https://wiki.winehq.org/Ubuntu
I'll take a look for that script, but it's strange to me that you say development might be better, I thought the opposite!
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: Build vs. Installation i386 / x86_64 Linux confusion

Post by dimesio »

cparke wrote: Is it somehow easier to do on another distro? What makes Ubuntu different or harder? APT package management? If I had instructions to build it properly on another distro like Gentoo or something (what does WineHQ use?), then that would be helpful, but the only documentation on the Wiki is for Ubuntu.
Building Wine on RPM-based distros such as openSUSE and Fedora is much easier because their multilib capabilities are sufficient to build the 32 bit parts without a container or chroot. Gentoo has its own unique way of doing things; Bob Wya can tell you more about that.
I'll take a look for that script, but it's strange to me that you say development might be better, I thought the opposite!
https://wiki.winehq.org/FAQ#Which_versi ... d_I_use.3F
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Build vs. Installation i386 / x86_64 Linux confusion

Post by Bob Wya »

dimesio wrote:
cparke wrote: Is it somehow easier to do on another distro? What makes Ubuntu different or harder? APT package management? If I had instructions to build it properly on another distro like Gentoo or something (what does WineHQ use?), then that would be helpful, but the only documentation on the Wiki is for Ubuntu.
Building Wine on RPM-based distros such as openSUSE and Fedora is much easier because their multilib capabilities are sufficient to build the 32 bit parts without a container or chroot. Gentoo has its own unique way of doing things; Bob Wya can tell you more about that.
Arch-Linux has excellent multilib support. Most 64-bit packages have an analogue 32-bit version. There are various Wine build scripts.

When I first started using Gentoo - a rudimentary system of 32-bit meta packages was used to implement multilib support on a 64-bit install.
Thanks to Michał Górny's hardwork (updating the Gentoo package and build tools) - most Gentoo packages now support a 32-bit ABI on a 64-bit system.
The meta 32-bit multilib packages are fully depreciated (thank god!)
Again there are various Wine packages for Gentoo.
In fact the main Gentoo Wine maintainer (NP) is planning to update his multislot build script - with plans to use this to implement the "official" Gentoo Wine package.
This will support installation of multiple versions of Wine simultaneously (Wine / Wine Staging / Wine Staging+Gallium Nine).

I have previously compiled Wine from source on 64-bit Ubuntu (around the 10.04 release I think) - using only native tools.
Then Debian made a choice a number of years ago to stop shipping a full set of 32-bit Development libraries.
Canonical re-package Debian testing - so passed on this change in Ubuntu.
This makes it impossible to build Wine natively - on a 64-bit Debian/Ubuntu installation.
You have to use a container (LXC, Chroot or VM) to build the 32-bit part on a 64-bit System.

Bob
Locked