文档章节

如何在64位Linux上编译安装32位wine。

javasql
 javasql
发布于 2014/05/31 17:53
字数 3441
阅读 4798
收藏 7

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

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 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 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'>>/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 16

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 gnutls-devel.i686 libgphoto2-devel.i686 openal-soft-devel openal-soft-devel.i686 isdn4k-utils-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

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

./configure make && make install

Fedora 17

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 gnutls-devel.i686 libgphoto2-devel.i686 openal-soft-devel openal-soft-devel.i686 isdn4k-utils-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

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

./configure make && make install

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

from:http://wiki.winehq.org/WineOn64bit#head-b62ae8f996e97e1df7258bb8eaec2e83e54ca799

© 著作权归作者所有

共有 人打赏支持
javasql
粉丝 27
博文 21
码字总数 15029
作品 0
成都
产品经理
加载中

评论(2)

javasql
javasql

引用来自“JeffreyWu”的评论

折腾,为什么不直接用windows
需要在linux下用photoshop等极个别软件
大王叫我来卖萌
大王叫我来卖萌
折腾,为什么不直接用windows
centos6.9源码安装wine3.0稳定版

使用源代码安装Wine 3.0 第1步:安装依赖包 我们需要用一些核心开发工具,如gcc, flex, bison, debuggers等来安装'Development Tools',这些软件必须要编译和构建新的包,使用YUM命令来安装。...

zzzzzga
06/26
0
0
Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!

WineQQ 最新解决方案:WineQQ2012 Beta2 收藏分享2012-7-3 10:50| 发布者: 红黑魂| 查看数: 2038| 评论数: 1|来自: ubuntusoft 摘要: 在腾讯一天不发布新的可用的QQ for Linux 前,Linuxer 对...

key4su
2012/07/19
0
0
如何在64位版本Linux上开发运行32位应用程序

最近换了Linux系统,由i686换成了x86-64,导致在进行开发的时候出用不了原来SDK中32位的开发工具。于是,博主找到如下文章,博主亲测实用: 如何在64位版本Linux上开发运行32位应用程序 内容...

临峰不畏
2015/08/27
0
0
lxc中装的软件在lxc外能用吗?就是64系统,lxc中32位系统,退出lxc后执行程序直接调用var/lib/lxc/lxc名字/roofs根目录中的链接库

我的系统是ubuntu 14.04.1 trusty amd64,在lxc中create 32-bit的ubuntu并且编译安装了32位的wine程序,在create的时候我将mybox(32bitubuntu)的用户目录和我当前的用户目录绑定在一起,lxc...

zhoujubao
2015/02/01
348
1
Wine 2.0.1 稳定版发布,附 Ubuntu 下安装教程

全新稳定的 Wine 2.0.1 发布了,可在 Ubuntu 16.04 LTS 和 17.04 上安装,但需要添加新的 Wine 存储库来获取。 下面将介绍 Wine 2.0.1 的一些新特性,以及如何在 Ubuntu 16.04 LTS 及更高版本...

局长
2017/04/25
6.2K
34

没有更多内容

加载失败,请刷新页面

加载更多

Kali Linux Docker 練習

docker pull kalilinux/kali-linux-docker docker run -t -i kalilinux/kali-linux-docker /bin/bash apt-get update apt-get install htop apt-get install nmap apt-get install wpscan ap......

BaiyuanLab
22分钟前
0
0
通俗大白话来理解TCP协议的三次握手和四次分手

最近在恶补计算机网络方面的知识,之前对于TCP的三次握手和四次分手也是模模糊糊,对于其中的细节更是浑然不知,最近看了很多这方面的知识,也在系统的学习计算机网络,加深自己的CS功底,就...

onedotdot
27分钟前
1
0
TiDB 在爱奇艺的应用及实践

爱奇艺,中国高品质视频娱乐服务提供者,2010 年 4 月 22 日正式上线,推崇品质、青春、时尚的品牌内涵如今已深入人心,网罗了全球广大的年轻用户群体,积极推动产品、技术、内容、营销等全方...

TiDB
31分钟前
0
0
Web系统大规模并发:电商秒杀与抢购

一、大规模并发带来的挑战 在过去的工作中,我曾经面对过5w每秒的高并发秒杀功能,在这个过程中,整个Web系统遇到了很多的问题和挑战。如果Web系统不做针对性的优化,会轻而易举地陷入到异常...

xtof
今天
3
0
代码质量管理平台-sonarqube

在工作中,往往开发的时候会不怎么注重代码质量的人很多,存在着很多的漏洞和隐患等问题,sonarqube可以进行代码质量的审核,而且十分的残酷。。。。。接下来我们说下怎么安装 进入官网下载:...

落叶清风
今天
9
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部