Recommended Packages (Building Wine on 32bit)

To build Wine, you may need to install a bunch of supporting libraries. The instructions on this page are for an operating system with full support for 32-bit applications. If you are using a pure 64-bit operating system, go to Wine on 64-bit.

generally speaking:


  • Use "./configure --verbose" to get Hints for some Packages


For Ubuntu, Fedora, SuSE, OpenSolaris, and CentOS 5.8 64 bit, the easiest way to do this is to download and run http://winezeug.googlecode.com/svn/trunk/install-wine-deps.sh as root (e.g. with sudo). Try running that before reading the rest of this page.

Right-click on the link and [save link as]. To run it use:

sudo sh ./install-wine-deps.sh

Note for valgrind users

If Valgrind is installed on the build machine, the wine you build will have valgrind annotations, and valgrind can be used to find accesses to freed heap blocks in Windows apps running on Wine. But even if valgrind.h wasn't found at build time, you can still use valgrind to find other memory errors, like accesses to uninitialized memory.

Ubuntu and Linux Mint

Note: As releases of Ubuntu (as well as its official derivatives like Kubuntu, Xubuntu, etc) and Linux Mint (and similar unofficial derivatives like elementaryOS, ZorinOS, Linux Deepin, etc) released in 2012 and 2013 ship with Wine 1.4, the previous stable release of Wine, it is important to first enable the Wine PPA, as it provides newer versions of stable (1.6.x) and beta (1.7.x) Wine packages.

You can install the same development packages that were used to create the packaged Wine using the terminal-based built-in package manager:

sudo apt-get build-dep wine1.6

Enable Wine PPA Sources Repo

  • If you encounter the following error "E: Unable to find a source package for wine1.6" after enabling the Wine PPA, then you need to enable the Wine PPA's sources repository. If you encounter this error without the enabling of the Wine PPA, skip to instructions found in the below Enable Ubuntu Sources Repo section. It is easier to enable this repository by opening the GUI repository sources application with the following command:

    • sudo software-properties-gtk
      

      If you are running a KDE derivative like Kubuntu and Linux Mint KDE, then you should instead run sudo software-properties-kde. Alternatively, you can simply search through the application menu for an entry called Software Sources or Software & Updates.

      Once the application has loaded, click the Other Sources tab and enable/check the line that looks like http://ppa.launchpad.net/ubunut-wine/ppa/ubuntu packagebase main (Source Code).

    If you prefer to enable the Wine PPA's sources repository from the terminal, then this can be done as below, but noting that distropkg in the filename will vary depending on your Ubuntu or Linux Mint version (e.g. precise, maya, saucy, petra):

    • sudo gedit /etc/apt/sources.list.d/ubuntu-wine-ppa-distropkg.list
      
      Once the file is loaded, uncommenting the line (removing the '#' from the beginning of the line) that contains 'deb-src', save the file and close gedit.
    After the repository has been enabled, the repositories have to be refreshed with:
    sudo apt-get update
    

    You should then re-attempt the installation of the development packages, sudo apt-get build-dep wine1.6.

Enable Ubuntu Sources Repo

  • If you encounter the following error "E: You must put some 'source' URIs in your sources.list", then you need to enable additional sources repository. It is easier to enable this repository by:

    • re-opening the GUI repository sources application, sudo software-properties-gtk, and in the ''Ubuntu Software'' tab, enable/check the entry titled Source code. If you are using Linux Mint 13 or 14, then you need to click on the ''Other Software'' tab and enable/check the entry that looks similar to Ubuntu 12.XX packagebase (Source Code). If you are using Linux Mint 15 and above, simply enable/check the Enable source code repositories entry in the ''Official repositories'' section.

    If you prefer to do it from the terminal, then this can be done with:
    • sudo gedit /etc/apt/sources.list
      

      And then uncommenting a line that looks similar to the one below. If the line isnt found in the file, then adding a line similar to the one below, but replacing packagebase with the Ubuntu package base name, which will be seen throughout the file (e.g. precise, saucy, trusty):

      deb-src http://archive.ubuntu.com/ubuntu/ packagebase main restricted universe multiverse
      
      Save the file and close gedit.

    Then refresh the repositories, sudo apt-get update, and re-attempt the installation of the development packages, sudo apt-get build-dep wine1.6.

Note: These instructions have been updated for use in Ubuntu 12.04 LTS and Linux Mint 13, as well as their later releases.


Fedora

  • alsa-lib-devel
  • cups-devel
  • dbus-devel
  • fontconfig-devel
  • freetype-devel
  • giflib-devel
  • gnutls-devel
  • gsm-devel
  • hal-devel
  • isdn4k-utils-devel
  • lcms-devel
  • libGLU-devel
  • libICE-devel
  • libjpeg-devel
  • libpng-devel
  • libSM-devel
  • libusb-devel
  • libv4l-devel
  • libX11-devel
  • libXau-devel
  • libXcomposite-devel
  • libXcursor-devel
  • libXext-devel
  • libXi-devel
  • libXinerama-devel
  • libxml2-devel
  • libXrandr-devel
  • libXrender-devel
  • libxslt-devel
  • libXt-devel
  • libXv-devel
  • libXxf86vm-devel
  • mesa-libGL-devel
  • ncurses-devel
  • openal-devel
  • openldap-devel
  • openssl-devel
  • pkgconfig
  • sane-backends-devel
  • xorg-x11-proto-devel

Fedora Core 5 Note: I've seem some trouble with the SELinux enabled FC5 libGL.so* giving the following error during the ./configure script:

libGL.so.1: cannot enable executable stack as shared object...

To fix it, type:

chcon -t textrel_shlib_t /usr/lib/libGL.so.*
execstack -c /usr/lib/libGL.so.*

Programs :

  • bison
  • flex
  • prelink

Note that, unless you are tracking Git and know what you are doing, you SHOULDN'T have valgrind. Also, unless you plan to work on the TrueType fonts you don't need FontForge.

The script http://kegel.com/wine/fc5.sh, adapted from Lei's wbel3 script below, should install all the needed packages for Fedora Core 5 systems. Please read the comments in the script before running it.

Fedora Core 9 Note: Run ulimit -s unlimited before compiling.


RHEL / WBEL

  • cups-devel
  • fontconfig-devel
  • freetype-devel
  • gphoto2-devel
  • isdn4k-utils-devel
  • libjpeg-devel
  • libpng-devel
  • libxml2-devel
  • libxslt-devel
  • ncurses-devel
  • openldap-devel
  • openssl-devel
  • sane-backends-devel
  • XFree86-devel
  • zlib-devel

Programs :

  • bison
  • flex
  • gcc
  • prelink
  • pkgconfig

Unless you plan to work on the TrueType fonts you don't need FontForge.

Lei Zhang wrote a script to install the required packages for WBEL 3 and RHEL 3 (untested): linux.ucla.edu/~leiz/software/wine/wbel3.sh.txt as well as a script to automatically build Wine RPMs for those platforms: linux.ucla.edu/~leiz/software/wine/wine_rpmbuild.sh.txt


Debian

The simplest way to get the required packages is using apt-get build-dep wine respectively aptitude build-dep wine.

Using build-dep will select libgl1-mesa-dev to provide libgl-dev; if you are an Nvidia user you may prefer to replace it with nvidia-glx-dev afterwards.

If you prefer to install them manually, the required packages are as follows:

  • Audio:
    • winealsa.drv: libasound-dev (libasound2-dev)
    • Optionally: oss4-dev
  • Multimedia:
    • libgstreamer-plugins-base0.10-dev
    • libv4l-dev
  • Capi Isdn support:
    • libcapi20-dev
  • Color management:
    • liblcms-dev (liblcms1-dev)
  • Printing with CUPS:
    • libcupsys-dev (libcupsys2-dev)
  • Scanner:
    • libsane-dev
  • Drive autodetection:
    • libhal-dev
    • libdbus-1-dev
  • To get more information when valgrind-ing Wine:
    • valgrind
  • The following, but only if you plan to work on the TrueType fonts, and can install them from testing - do not install these from Sarge:

    • fontforge/testing
  • If you are using Debian Etch with Nvidia:
    • nvidia-glx-dev
  • And all of the following packages (when two package names are specified, the first one is the virtual package name and the one in parentheses is the one providing that package):
    • bison
    • flex
    • gcc
    • libc6-dev
    • libfontconfig-dev (libfontconfig1-dev)
    • libfreetype6-dev
    • libgl-dev (libgl1-mesa-dev or xlibmesa-gl-dev)
    • libglu-dev (libglu1-mesa-dev or xlibmesa-glu-dev)
    • libgphoto2-dev (libgphoto2-2-dev)
    • libgsm1-dev
    • libice-dev
    • libjpeg-dev (libjpeg62-dev)
    • libldap-dev (libldap2-dev)
    • libmpg123-dev
    • libncurses5-dev
    • libopenal-dev
    • libpng-dev (libpng12-dev)
    • libsm-dev
    • libssl-dev
    • libtiff4-dev
    • libusb-dev
    • libx11-dev
    • libxcomposite-dev
    • libxcursor-dev
    • libxext-dev
    • libxi-dev
    • libxinerama-dev
    • libxml2-dev
    • libxrandr-dev
    • libxrender-dev
    • libxslt-dev (libxslt1-dev)
    • libxt-dev
    • libxxf86vm-dev
    • make
    • prelink


FreeBSD 6.3

You will need the Ports system. Then install the following packages using the Ports system:

  • cd /usr/ports/devel/bison && make install

  • cd /usr/ports/graphics/libgphoto2 && make install

  • cd /usr/ports/graphics/sane-frontends && make install

  • cd /usr/ports/security/ca_root_nss && make install

The other packages that Wine depends on seem to be installed by default so they are not listed here.

NOTE: To get Wine to properly find all the dependencies, you should run configure with: CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure


PC-BSD 1.5

You will need the Ports system. Then install the following packages using the Ports system:

  • cd /usr/ports/graphics/libgphoto2 && make install

  • cd /usr/ports/security/ca_root_nss && make install

Most of the other packages that Wine depends on seem to be installed by default so they are not listed here.

NOTE: To get Wine to properly find all the dependencies, you should run configure with: CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure

Otherwise, you'll get some strange errors, since configure won't find the headers.


Mac OS X

You will find the following packages on your Mac OS X installation DVD (at least on Leopard). Most if not all are installed when you install the Xcode IDE.

  • CoreAudioSDK for CoreAudio.h

  • OpenGLSDK
  • X11SDK for /usr/X11/include and libs (see notes below)
  • DevSDK for /usr/include/*.h /usr/lib/*.{a,la,dylib}
  • DeveloperToolsCLI for /usr/bin/make, autoconf, /usr/share/man/ etc.
  • gcc4.2ADC to use gcc-4.2 instead of gcc-4.0

Other key libraries

  • Fontforge: http://fontforge.sourceforge.net/ - Not required to compile, but most text will not be readable without it (not required for all/newer versions of OS X)

  • FreeType: http://freetype.org/

    • FreeType will have to be configured with ./configure CFLAGS="-arch i386"  to avoid the following errors because a 64 bit version of FreeType is built: checking for -lfreetype... not found configure: error: FreeType 32-bit development files not found. Fonts will not be built.

  • LibJPEG: http://www.ijg.org/

  • LibTIFF: http://www.libtiff.org/ - Not required to compile, but required by some applications (does not compile correctly on OS X 10.8 as of Nov 2012)

  • LibXML2: http://xmlsoft.org/ (not required for all/newer versions of OS X)

  • LibXSLT: http://xmlsoft.org/xslt/ (not required for all/newer versions of OS X)

Add --enable-maintainer-mode or --verbose to your ./configure line to see a full list of packages that Mac OS X does not provide but Wine may possibly need.

  • X11/XQuartz - If you are running Mac OS X 10.5 (Leopard) through 10.7 (Lion), you can install X11 from your Mac OS X installation DVD by running the optional installs package. If you are running other versions, you will need to download and install XQuartz.

  • Xcode - Xcode is included on your Mac OS X installation DVD in the 'Optional Installs' folder. Either install the version that shipped with your operating system's DVD, or download the latest version from the Apple macosforge web site. If you do not wish to install the full Xcode suite, locate and install at least the GCC, CoreAudioSDK and X11SDK packages... (Notes for building with GCC 4.5 on Mac can be found Building GCC 4.5)

/!\ Note that since Xcode 3.x (as distributed with Leopard), a bug in the MacOS linker causes all 16 bit applications (incl. installers) to crash. If you have a Tiger system, use Xcode 2.x from your DVD. If you are a developer, you can obtain Xcode 2.x from Apple's Developer Connection (ADC). Or you may patch the Xcode 3.x linker source code per the instructions given in bug #14920. Otherwise use ./configure --disable-win16

/!\ As of Mac OS X 10.6 (Snow Leopard) the compiler compiles to 64-bit by default. This caused problems when attempting to compile the stable 1.0.1 release of Wine, but the newer builds deal with this issue.


Checking for additional libraries - include/config.h

After running configure while things are compiling, you can check if you're missing some build dependencies by looking at include/config.h


CategoryDevelopment

Recommended Packages (last edited 2014-09-27 12:35:03 by ZhenboLi)