Posted by Vince Wadhwani on Dec 30, 2007

If you're going to compile Wine for Debian Unstable or Sidux (required at the moment for certain 3D gaming) you'll want to install a ton of packages first. Why? Well, wine supports a bunch of different things and if you don't have the correct packages installed before compiling you may find that somethings are not supported. Rather than go through that, let's get as many things installed before we compile. Let's get started with a few good apt-get installs. If you get an error, first make sure you have all the correct repositories enabled.

First thing is to take the easy route:

 sudo apt-get build-dep wine

The above should grab a bunch of packages for you. If you get an error, make sure that your sources.list file has the appropriate source lines enabled (you should see a line that starts with deb and a corresponding line that starts with deb-src

Next, let's grab everything that the above command may have missed:

apt-get install gcc libc6-dev flex bison make linux-libc-dev m4 fontforge libaudio-dev libcapi20-3 libcapi20-dev libcupsys2-dev libdbus-1-dev libesd0-dev libexif-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev  libgcrypt11-dev libgl1-mesa-dev libglib1.2-dev libglib2.0-dev libglu1-mesa-dev libgnutls-dev libgpg-error-dev libgphoto2-2-dev libhal-dev libice-dev libicu-dev libieee1284-3-dev libjpeg62-dev liblcms1-dev libldap2-dev libltdl3 libltdl3-dev liblzo-dev libmad0 libmad0-dev libmng-dev libncurses5-dev libodbcinstq1c2 libogg-dev libopencdk10-dev libpng12-dev libpopt-dev libqt3-headers libqt3-mt libqt3-mt-dev libsane-dev libsm-dev libssl-dev libtasn1-3-dev libtiff4-dev libtiffxx0c2 libusb-dev libvorbis-dev libvorbisfile3 libx11-dev libxau-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 mesa-common-dev odbcinst1debian1 unixodbc unixodbc-dev x11proto-core-dev  x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-video-dev x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev x-dev xtrans-dev zlib1g-dev gcc-4.2-multilib

If it's been a while since this was posted packages may have changed names. Check for error output (if any) and correct as needed. If you're compiling for 64 bit you'll also want to get these additional packages:

sudo apt-get install ia32-libs libc6-dev-i386 lib32z1-dev 

That should be everything you need. Then just go, download the source, change into the directory and type:

./configure
make
make depend
sudo make install
make clean

With that out of the way, wine should be ready to go. If you find a package that isn't needed or is missing please leave a comment below or send me an email so I can update this post! For additional reading, check the Wine Wiki for instructions for installing Wine on 64 bit Operating Systems.