Building 32-bit Wine on a 64-bit (x86-64) system

If you just want to use Wine, there is no need to compile it using the instructions here. Just go to the downloads page and click the link for your distribution.

If you want to run 64-bit Windows programs, see Wine64.

If you want to build Wine on a 32-bit system, see Recommended Packages.

If you want to build biarch (both 32 and 64 bit together) Wine on Ubuntu 12.04 or higher, see BuildingBiarchWineOnUbuntu.


Ubuntu

There are three methods: using a 32 bit lxc container, using a 32 bit chroot, or manually linking in the development libraries needed to compile Wine.

lxc container

lxc containers are like fancy, very easy to use chroot jails. Many linux distros are starting to support them, so this is not really Ubuntu-specific.

They are supported well on Ubuntu 12.04 and higher. For more information on lxc and Ubuntu, see https://help.ubuntu.com/community/LXC and https://www.stgraber.org/2012/05/04/lxc-in-ubuntu-12-04-lts/

First, install lxc:

sudo apt-get install lxc lxc-templates

Now create a 32 bit container, and tell it to bind your home directory into the container:

sudo lxc-create -t ubuntu -n my32bitbox -- --bindhome $LOGNAME -a i386 --release trusty

Then start the container; at the console login prompt it gives you, log in with your username and password.

sudo lxc-start -n my32bitbox

Now you're inside the container, in your real home directory. Before you continue, you will need some deb-src lines in your sources.list file. Here is an easy way to add them (only run this command once):

sudo sh -c "sed s/deb/deb-src/ /etc/apt/sources.list >> /etc/apt/sources.list"

Do an out-of-tree build of Wine as normal. You'll have to install all the needed prerequisites first. For instance:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get build-dep wine   # or, if that fails, sh install-wine-deps.sh
cd $HOME
mkdir wine32
cd wine32
~/wine-git/configure
make -j4

Finally, shut down the container. From inside the container, you can do this with the command

sudo shutdown -h now

chroot Method

For more information on chroot and Ubuntu, see https://help.ubuntu.com/community/BasicChroot and https://help.ubuntu.com/community/DebootstrapChroot

First, install the schroot and debootstrap packages:

sudo apt-get install schroot debootstrap 

Now create a configuration file for schroot:

sudo editor /etc/schroot/chroot.d/precise_i386.conf 

Put this in the new file:

[precise_i386]
description=Ubuntu Precise
personality=linux32
directory=/srv/chroot/precise_i386
root-users=your_username
type=directory
users=your_username 

Create a working installation of Ubuntu inside the chroot. Replace "precise" with your Ubuntu version. You can replace http://archive.ubuntu.com/ubuntu/ with an appropriate mirror from https://launchpad.net/ubuntu/+archivemirrors:

sudo mkdir -p /srv/chroot/precise_i386
sudo debootstrap --variant=buildd --arch=i386 precise /srv/chroot/precise_i386 http://archive.ubuntu.com/ubuntu/ 

Make apt-get work from within the chroot:

sudo cp /etc/apt/sources.list /srv/chroot/precise_i386/etc/apt/ 

Enter the chroot:

schroot -c precise_i386 -u root 

Get the basic packages:

apt-get update
apt-get install ubuntu-minimal
sudo apt-get install software-properties-common 

Install the build dependencies:

apt-get build-dep wine 

You might need to add the wine repository first if you get an error such as:

E: You must put some 'source' URIs in your sources.list 

To do so, simply run:

add-apt-repository ppa:ubuntu-wine/ppa
apt-get update 

Download the Wine source tree into your chroot:

apt-get install git
git clone git://source.winehq.org/git/wine 

Note that the default schroot rebinds the /home directory on the host system so that it appears in the chroot system. This means your home folder is basically shared.

Compile:

cd wine
./configure
make 

To run wine, you'll first need to define the X DISPLAY

export DISPLAY=:0
./wine notepad 

To be able to use Wine from outside the chroot, Wine's dependencies must be installed outside the chroot. The easiest way is to exit the chroot and install a prepackaged copy of Wine:

exit
sudo apt-get install wine 

You can now run Wine from outside the chroot:

exit
cd wine
./wine notepad 

Manually Linking Libraries Method

To manually link the development libraries needed by Wine you'll need sudo privileges and all of the 32-bit libraries need to be installed ("sudo apt-get build-dep wine" will quickly install everything). However, this action alone will not provide all of the necessary symbolic links. In order to get these linkages you can install a convenience package that will make them for you:

sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get update
sudo apt-get install ia32-libs-dev

Alternatively, you can copy-paste the following code into a terminal window to setup the symbolic links:

cd /usr/lib/i386-linux-gnu
sudo ln -s libfreetype.so.6 libfreetype.so
sudo ln -s libX11.so.6 libX11.so
sudo ln -s libXau.so.6 libXau.so
sudo ln -s libXcursor.so.1 libXcursor.so
sudo ln -s libXi.so.6 libXi.so
sudo ln -s libXext.so.6 libXext.so
sudo ln -s libXxf86vm.so.1 libXxf86vm.so
sudo ln -s libXrandr.so.2 libXrandr.so
sudo ln -s libXrender.so.1 libXrender.so
sudo ln -s libXinerama.so.1 libXinerama.so
sudo ln -s libXcomposite.so.1 libXcomposite.so
sudo ln -s libGLU.so.1 libGLU.so
sudo ln -s libOSMesa.so.6 libOSMesa.so
sudo ln -s libgnutls.so.26 libgnutls.so
sudo ln -s libsane.so.1 libsane.so
sudo ln -s libv4l1.so.0 libv4l1.so
sudo ln -s libv4l2.so.0 libv4l2.so
sudo ln -s liblcms.so.[0-9] liblcms.so
sudo ln -s libcapi20.so.3 libcapi20.so
sudo ln -s libcups.so.2 libcups.so
sudo ln -s libfontconfig.so.1 libfontconfig.so
sudo ln -s libgsm.so.1 libgsm.so
sudo ln -s libtiff.so.[0-9] libtiff.so
sudo ln -s libmpg123.so.0 libmpg123.so
sudo ln -s libodbc.so.1 libodbc.so
sudo ln -s libopenal.so.1 libopenal.so
sudo ln -s libldap-2.4.so.2 libldap.so
sudo ln -s libldap_r-2.4.so.2 libldap_r.so
sudo ln -s liblber-2.4.so.2 liblber.so
sudo ln -s libxml2.so.2 libxml2.so
sudo ln -s libxslt.so.1 libxslt.so
sudo ln -s libssl.so.0.9.8 libssl.so
sudo ln -s libcrypto.so.0.9.8 libcrypto.so
sudo ln -s libjpeg.so.8 libjpeg.so
sudo ln -s libgphoto2.so.6 libgphoto2.so
sudo ln -s libgphoto2_port.so.10 libgphoto2_port.so
sudo ln -s libexif.so.12 libexif.so
sudo ln -s mesa/libGL.so libGL.so
cd /usr/lib/i386-linux-gnu/mesa
sudo ln -s libGL.so.1 libGL.so
cd /lib/i386-linux-gnu
sudo ln -s libdbus-1.so.3 libdbus-1.so
sudo ln -s libpng12.so.0 libpng.so
sudo ln -s libpng12.so.0 libpng12.so
sudo ln -s libncurses.so.5 libncurses.so

You will probably also need a couple missing 32-bit libraries, those can be obtained by executing:

sudo apt-get install libosmesa6:i386 libosmesa-dev libjpeg-turbo8-dev:i386

Please note that there are a couple libraries that are not fully supported with this method due to the way multilib works on Ubuntu 12.04+, specifically libtiff and libgstreamer are known to not be detected on configure.

Debian

Squeeze

For me the following worked:

1) aptitude install:

ia32-libs ia32-libs-dev ia32-libs-gtk lib32asound2 lib32asound2-dev lib32bz2-1.0 lib32gcc1 lib32gomp1 lib32ncurses5 lib32ncurses5-dev lib32stdc++6 lib32v4l-0 lib32v4l-dev lib32vdpau1 lib32z1 lib32z1-dev libgl1-nvidia-alternatives-ia32 libgl1-nvidia-glx-ia32 linux-headers-2.6.32-5-amd64 linux-headers-2.6.32-5-common linux-image-2.6.32-5-amd64 linux-kbuild-2.6.32 nvidia-glx-ia32 nvidia-libopencl1-ia32 nvidia-vdpau-driver-ia32 bison ccache flex fontforge gcc gettext git-core libasound2-dev libaudio-dev libc6-dev libcups2-dev libdbus-1-dev libelfg0 libesd0-dev libexif-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libgcrypt11-dev libgif-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libgnutls-dev libgpg-error-dev libgphoto2-2-dev libgsm1-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libhal-storage-dev libice-dev libjpeg62-dev liblcms1-dev libldap2-dev libmad0 libmad0-dev libncurses5-dev libodbcinstq1c2 libogg-dev libopenal-dev libopenal1 libpng12-dev libpopt-dev libsane-dev libsm-dev libssl-dev libtasn1-3-dev libtiff4-dev libtiffxx0c2 libusb-dev libvorbis-dev libvorbisfile3 libx11-dev libxau-dev libxcomposite-dev libxcursor-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxml2-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxslt1-dev libxt-dev libxv-dev libxxf86vm-dev m4 make mesa-common-dev unixodbc unixodbc-dev x11proto-composite-dev x11proto-core-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-video-dev x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev libcapi20-3 libcapi20-dev libieee1284-3-dev linux-libc-dev prelink ~

2) ./configure --prefix=/home/miguel/bin/wine32

3) make

4) make install

Wheezy

Install the build dependencies:

apt-get build-dep wine 
apt-get install libgstreamer-plugins-base0.10-dev libhal-dev liblcms2-dev libosmesa6-dev ocl-icd-opencl-dev

This is all you need to compile a 64-bit Wine (which is most likely not what you want). But to be able to also compile its 32-bit version you will also need to install the following 32-bit development packages:

apt-get install gcc-multilib libasound2-dev:i386 libgsm1-dev:i386 libjpeg8-dev:i386 liblcms2-dev:i386 libldap2-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libv4l-dev:i386 libx11-dev:i386 libxinerama-dev:i386 libxml2-dev:i386 zlib1g-dev:i386 

Furthermore, until the development packages for the following libraries are multiarch compatible you will also have to make do with installing the following 32-bit libraries:

apt-get install libcapi20-dev:i386 libcups2:i386 libdbus-1-3:i386 libfontconfig:i386 libfreetype6:i386 libglu1-mesa:i386 libgnutls26:i386 libgphoto2-2:i386 libncurses5:i386 libosmesa6:i386 libsane:i386 libxcomposite1:i386 libxcursor1:i386 libxi6:i386 libxrandr2:i386 libxslt1.1:i386 ocl-icd-libopencl1:i386 

And then manually creating the following symbolic links:

cd /usr/lib/i386-linux-gnu 
ln -s libcups.so.2 libcups.so
ln -s libexif.so.12 libexif.so
ln -s libfontconfig.so.1 libfontconfig.so
ln -s libfreetype.so.6 libfreetype.so
ln -s libGL.so.1 libGL.so
ln -s libGLU.so.1 libGLU.so
ln -s libgnutls.so.26 libgnutls.so
ln -s libgphoto2.so.2 libgphoto2.so
ln -s libgphoto2_port.so.0 libgphoto2_port.so
ln -s libOSMesa.so.6 libOSMesa.so
ln -s libsane.so.1 libsane.so
ln -s libtiff.so.4 libtiff.so
ln -s libXcomposite.so.1 libXcomposite.so
ln -s libXcursor.so.1 libXcursor.so
ln -s libXi.so.6 libXi.so
ln -s libXrandr.so.2 libXrandr.so
ln -s libXrender.so.1 libXrender.so
ln -s libxslt.so.1 libxslt.so
ln -s libXxf86vm.so.1 libXxf86vm.so
ln -s /lib/i386-linux-gnu/libdbus-1.so.3 libdbus-1.so
ln -s /lib/i386-linux-gnu/libpng12.so.0 libpng12.so
ln -s /lib/i386-linux-gnu/libtinfo.so.5 libtinfo.so
ln -s libpng12.so libpng.so
echo 'INPUT(libncurses.so.5 -ltinfo)' >libncurses.so

Getting GStreamer support is optional and a bit more complex yet. So you may want to skip this part. The difficulty is not only that the GStreamer's development package does not support multiarch, but also that the 64-bit glibconfig.h header cannot be used to compile 32-bit code. Here are the steps to work around all these issues:

First install the non-development 32-bt package and create symbolic links as usual:

apt-get install libgstreamer-plugins-base0.10-0:i386 
cd /usr/lib/i386-linux-gnu
ln -s libgstapp-0.10.so.0 libgstapp-0.10.so
ln -s libgstbase-0.10.so.0 libgstbase-0.10.so
ln -s libgstreamer-0.10.so.0 libgstreamer-0.10.so
ln -s libgobject-2.0.so.0 libgobject-2.0.so
ln -s libgmodule-2.0.so.0 libgmodule-2.0.so
ln -s libgthread-2.0.so.0 libgthread-2.0.so
ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 libglib-2.0.so

Then grab the glibconfig.h.diff patch and apply it as follows:

cd /usr/lib/x86_64-linux-gnu/glib-2.0/include 
patch </tmp/glibconfig.h.diff

Note: Adjust the /tmp/glibconfig.h.diff path to match where you saved the glibconfig.h.diff patch.

Finally Wine's configure script will still be complaining about missing HAL support. That's because libhal1:i386 conflicts with libhal1:amd64 so that one cannot install the needed 32-bit libraries anyway. Debian developpers also declared that this will not be fixed. However HAL is deprecated on Wheezy anyway so this should not matter much.

Sid

Set up chroot (run once)

mkdir /home/build/chroot32/ -p 
sudo apt-get install debootstrap
cd /home/build
sudo debootstrap --arch i386 sid chroot32 http://ftp.se.debian.org/debian/
sudo mount -o bind /proc /home/build/chroot32/proc
sudo cp /etc/resolv.conf /home/build/chroot32/etc/resolv.conf
sudo chroot /home/build/chroot32

(you're now in the chroot)

apt-get update 
apt-get install locales sudo vim
echo 'export LC_ALL="C"'>>/etc/bash.bashrc
echo 'export LANG="C"'>>/etc/bash.bashrc
echo "127.0.0.1 localhost $HOSTNAME" >> /etc/hosts
source /etc/bash.bashrc
adduser sandbox
usermod -g sudo sandbox
echo 'Defaults !tty_tickets' >> /etc/sudoers
su sandbox

Install 32bit packages and Wine build-deps:

sudo dpkg --add-architecture i386 
sudo apt-get update
sudo apt-get install ia32-libs-i386 libgstreamer-plugins-base0.10-0
sudo apt-get install libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libglu-dev:i386 libosmesa-dev:i386 libdbus-1-dev:i386 libgnutls-dev:i386 libncurses-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-2-dev:i386 liblcms2-dev:i386 libgstreamer-plugins-base0.10-dev:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig-dev:i386 libgsm1-dev:i386 libtiff-dev:i386 libpng-dev:i386 libjpeg-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap-dev:i386 libxrender-dev:i386 libxml2-dev:i386 libxslt-dev:i386 libhal-dev:i386 gettext:i386 prelink:i386 bzip2:i386 bison:i386 flex:i386 oss4-dev:i386 checkinstall:i386 ocl-icd-libopencl1:i386 opencl-headers:i386 libasound2-dev:i386 build-essential binutils-multiarch

Build and install Wine (every new build)

Enter chroot: (skip if you're already in chroot):

sudo mount -o bind /proc /home/build/chroot32/proc 

Needed (some of) these mounts since it stopped working:

sudo mount --bind /sys /home/build/chroot32/sys 
sudo mount --bind /tmp /home/build/chroot32/tmp
sudo mount --bind /dev /home/build/chroot32/dev
sudo mount --bind /dev/pts /home/build/chroot32/dev/pts
sudo cp /etc/resolv.conf /home/build/chroot32/etc/resolv.conf
sudo chroot /home/build/chroot32
su sandbox

Upgrade packages (optional):

sudo apt-get update 
sudo apt-get upgrade

Download Wine source:

Tarball:

cd /home/sandbox 
wget http://sourceforge.net/projects/wine/files/Source/wine-<version>.tar.bz2
tar xvf wine-<version>.tar.bz2
cd wine-<version>/

or git:

git clone git://source.winehq.org/git/wine-git 
cd wine-git/

Build Wine (tarball or git):

./configure --verbose 
time make -j3
sudo checkinstall --install=no

(answer checkinstall questions)

Exit chroot:

exit 
exit

Install Wine:

sudo cp /home/build/chroot32/home/sandbox/wine-<version>/wine_<version>-1_i386.deb . 
sudo chown $USER:$USER wine_<version>-1_i386.deb
sudo dpkg -i wine_<version>-1_i386.deb

Gentoo

NOTE: This will compile wine and install it into your system. It is a really bad idea to install stuff manually into your gentoo system. If you want to be on the safe side, omit the "make install" command. You can still run wine from the source directory using the wine wrapper found at the root of the directory.

  1. Emerge wine and wine should install fine, if on the other hand you want to compile wine by hand follow the steps below.
  2. Install the x86 compatibility libraries (emul-linux-x86-xlibs, emul-linux-x86-soundlibs, ..)
  3. Download the wine source and assuming gcc and all needed development packages are installed (see Recommended Packages) you can compile wine using: configure --prefix=/emul/linux/x86/usr --x-libraries=/emul/linux/x86/usr/lib/X11 (in case of xorg 7.0, else */usr/X11R6/lib), make depend && make, make install

  4. Run wine by executing /emul/linux/usr/bin/wine (you can also make a symlink /usr/bin/wine -> /emul/linux/usr/bin/wine and the same for wineserver, then you can just type wine). If wine complains that it can't find libwine.so.1 make sure /emul/linux/usr/lib is part of the LD_LIBRARY_PATH or run ldconfig -v.

If nothing seems to work try using ebuild to compile it once and copy the source from /var/tmp/portage/wine-9999/work/wine somewhere. Ebuild /usr/portage/app-emulation/wine/wine-9999.ebuild fetch unpack compile. To update CVS add clean to the beginning.

openSUSE

Make sure you have the following 32 bit development packages installed in addition to Recommended Packages

  • capi4linux-32bit
  • cups-libs-32bit
  • fontconfig-devel-32bit
  • freeglut-devel-32bit
  • freetype2-devel-32bit
  • gcc-32bit
  • giflib-devel-32bit
  • glibc-devel-32bit
  • hal-32bit
  • libjpeg-devel-32bit
  • liblcms-devel-32bit
  • libpng-devel-32bit
  • libxml2-devel-32bit
  • libxslt-devel-32bit
  • Mesa-devel-32bit
  • ncurses-devel-32bit
  • openldap2-devel-32bit
  • openssl-devel-32bit
  • sane-32bit
  • unixODBC-devel-32bit
  • xorg-x11-devel-32bit
  • xorg-x11-libICE-32bit
  • xorg-x11-libICE-devel-32bit
  • xorg-x11-libSM-devel-32bit
  • xorg-x11-libX11-devel-32bit
  • xorg-x11-libXext-32bit
  • xorg-x11-libXext-devel-32bit
  • xorg-x11-libXp-32bit
  • xorg-x11-libXrender-devel-32bit
  • xorg-x11-libXt-32bit
  • zlib-devel-32bit Additional for SuSE 11.x:
  • libasound2-32bit
  • libcom_err-devel-32bit
  • libgnutls26-32bit
  • libgphoto2-32bit
  • libopenssl0_9_8-32bit

For openSUSE 11.x you will need to create these symlinks:

cd /usr/lib
sudo ln -s libasound.so.2.0.0 libasound.so
sudo ln -s libfreetype.so.6 libfreetype.so
sudo ln -s libgphoto2.so.2.4.0 libgphoto2.so
sudo ln -s libcups.so.2 libcups.so
sudo ln -s libssl.so.0.9.8 libssl.so
sudo ln -s libcrypto.so.0.9.8 libcrypto.so
sudo ln -s libhal.so.1.0.0 libhal.so
sudo ln -s libgphoto2_port.so.0.8.0 libgphoto2_port.so
sudo ln -s libgnutls.so.26 libgnutls.so
sudo ln -s libgstreamer-0.10.so.0.29.0 libgstreamer-0.10.so
sudo ln -s libgstapp-0.10.so.0.24.0 libgstapp-0.10.so
sudo ln -s libgstbase-0.10.so.0.29.0 libgstbase-0.10.so
cd /lib
sudo ln -s libdbus-1.so.3.4.0 libdbus-1.so
sudo ln -s libkeyutils.so.1 /usr/lib/libkeyutils.so
sudo ln -s libgobject-2.0.so.0.2800.0 /usr/lib/libgobject-2.0.so
sudo ln -s libgmodule-2.0.so.0.2800.0 /usr/lib/libgmodule-2.0.so
sudo ln -s libgthread-2.0.so.0.2800.0 /usr/lib/libgthread-2.0.so
sudo ln -s libglib-2.0.so.0.2800.0 /usr/lib/libglib-2.0.so 

Note: the targets of the above symlinks may need to be adjusted depending on what versions of the libraries you have installed on your system.

Run configure with:

./configure --x-libraries=/usr/X11R6/lib 

The --x-libraries switch is important, otherwise it will pick up the 64bit X libraries and just not work.

Fedora 20

Install the development packages needed to compile Wine as follows:

yum install alsa-lib-devel.i686 alsa-lib-devel audiofile-devel.i686 audiofile-devel cups-devel.i686 cups-devel dbus-devel.i686 dbus-devel fontconfig-devel.i686 fontconfig-devel freetype.i686 freetype-devel.i686 freetype-devel giflib-devel.i686 giflib-devel lcms-devel.i686 lcms-devel libICE-devel.i686 libICE-devel libjpeg-turbo-devel.i686 libjpeg-turbo-devel libpng-devel.i686 libpng-devel libSM-devel.i686 libSM-devel libusb-devel.i686 libusb-devel libX11-devel.i686 libX11-devel libXau-devel.i686 libXau-devel libXcomposite-devel.i686 libXcomposite-devel libXcursor-devel.i686 libXcursor-devel libXext-devel.i686 libXext-devel libXi-devel.i686 libXi-devel libXinerama-devel.i686 libXinerama-devel libxml2-devel.i686 libxml2-devel libXrandr-devel.i686 libXrandr-devel libXrender-devel.i686 libXrender-devel libxslt-devel.i686 libxslt-devel libXt-devel.i686 libXt-devel libXv-devel.i686 libXv-devel libXxf86vm-devel.i686 libXxf86vm-devel mesa-libGL-devel.i686 mesa-libGL-devel mesa-libGLU-devel.i686 mesa-libGLU-devel ncurses-devel.i686 ncurses-devel openldap-devel.i686 openldap-devel openssl-devel.i686 openssl-devel zlib-devel.i686 pkgconfig sane-backends-devel.i686 sane-backends-devel xorg-x11-proto-devel glibc-devel.i686 prelink fontforge flex bison libstdc++-devel.i686 pulseaudio-libs-devel.i686 libgphoto2-devel.i686 openal-soft-devel openal-soft-devel.i686  gsm-devel.i686 samba-winbind libv4l-devel.i686 cups-devel.i686 libtiff-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 gettext-devel.i686 libmpg123-devel.i686 mesa-dri-drivers.i686 lcms2-devel.i686

Run the configure script, compile Wine, and install it as follows:

./configure
make && make install

Note: gnutls-devel.i686 relies on ldns which has multilib problems: https://bugzilla.redhat.com/show_bug.cgi?id=1017958 Install ldns.i686 using rpm -i [...] --excludepath /usr/share/man/man3/

Note: isdn4k-utils-devel.i686 has multilib problems: https://bugzilla.redhat.com/show_bug.cgi?id=1045909

CentOS 5

Here is a script that installs 32 bit wine-1.2.2 on a 64 bit centos 5. It downloads and builds all required packages. This builds wine using all cores on the computer, so watch out you don't explode it if someone else is on. This is what the script installs:

yum groupinstall "Development Tools" yum install alsa-lib-devel audiofile-devel cups-devel dbus-devel fontconfig-devel freetype-devel giflib-devel hal-devel lcms-devel libICE-devel libjpeg-devel libpng-devel libSM-devel libusb-devel libX11-devel libXau-devel libXcomposite-devel libXcursor-devel libXext-devel libXi-devel libXinerama-devel llibxml2-devel libXrandr-devel libXrender-devel libxslt-devel libXt-devel libXv-devel libXxf86vm-devel mesa-libGL-devel mesa-libGLU-devel ncurses-devel openldap-devel openssl-devel pkgconfig sane-backends-devel xorg-x11-proto-devel glibc-devel prelink fontforge flex bison gnutls-devel pulseaudio-libs-devel gcc.i386 gcc-c++.i386 autoconf.i386 automake.i386 binutils.i386 ccache.i386 elf*.i386 libtool.i386 lua.i386 make.i386 pkgconfig.i386 patchutils.i386 tolua++.i386 bzip2-devel.i386 glibc-devel.i386 zlib-devel.i386 libX*.i386 libX*-devel.i386 mesa*-devel.i386 gphoto2-devel isdn4k-utils-devel XFree86-devel bison flex gcc prelink pkgconfig libstdc++-devel.i386    yum groupinstall "X Window System" 

You can get the Required Packages that are also needed to install wine. These are not in the centos 5 repositories so you must build them yourself. There are also rpms in it that you must install.

Contents: gnutls-2.8.6.tar.bz2, flex-2.5.35.tar.bz2, libtiff-3.5.5-2.i386.rpm , libtool-ltdl-1.5.22-7.el5_4.i386.rpm, mpg123-1.3.1-1.el5.rf.i386.rpm, openal-0.0.9-0.9.20060204cvs.el5.kb.i386.rpm, openal-0.0.9-0.9.20060204cvs.el5.kb.x86_64.rpm, libtool-ltdl-1.5.22-7.el5_4.x86_64.rpm, mpg123-1.9.1-1.el5.rf.x86_64.rpm, and wine-1.2.2.tar.bz2 

EL6 (RHEL6 and SL6)

Required packages for proper building of 32-bit Wine on 64-bit EL6

yum install alsa-lib-devel.i686 libsndfile-devel.i686 readline-devel.i686 glib2.i686 glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 pulseaudio-libs-devel.i686 cmake portaudio-devel.i686 openal-soft-devel.i686 audiofile-devel.i686 freeglut-devel.i686 lcms-devel.i686 libieee1284-devel.i686 openldap-devel.i686 unixODBC-devel.i686 sane-backends-devel.i686 fontforge libgphoto2-devel.i686 isdn4k-utils-devel.i686 mesa-libGL-devel.i686 mesa-libGLU-devel.i686 libXxf86dga-devel.i686 libXxf86vm-devel.i686 giflib-devel.i686 cups-devel.i686 gsm-devel.i686 libv4l-devel.i686 fontpackages-devel ImageMagick-devel.i686 openal-soft-devel.i686 libX11-devel.i686 docbook-utils-pdf libtextcat tex-cm-lgc

Trying to rebuild the epel 6 wine srpms (wine-1.2.3-1.el6.src.rpm) in 32-bit mode, I had to do the following manual changes to the spec files:

  • portaudio.spec: add an "export CC='gcc -m32 -march=i686'" in an %ifarch %{ix86}
  • wine.spec: add an "export CC='gcc -m32 -march=i686'" in an %ifarch %{ix86}, and remove 'TARGETFLAGS="" %{?_smp_mflags}' after %{make}

The resulting packages (src and binary) are available here http://www.gymglish.com/opensource/rpms/centos6-rpms/

Then, I could build the rpms in this order:

rpmbuild -ba --sign --target i686 portaudio.spec
rpmbuild -ba --sign --target i686 openal-soft.spec
rpmbuild -ba --sign --target i686 nss-mdns.spec
rpmbuild -ba --sign --target i686 wine.spec
rpmbuild -ba --sign wine-docs.spec


  • We should probably also have a page called UsingWineOn64bit for users (as opposed to developers).


CategoryDevelopment

WineOn64bit (last edited 2014-07-09 12:59:16 by PatrickRudolph)