Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to build wine from source. apt-get build-dep wine installed some dependency packages. When running the configure script, following error occurs:

checking for X... no
configure: error: X 32-bit development files not found. Wine will be built
without X support, which probably isn't what you want. You will need
to install 32-bit development packages of Xlib/Xfree86 at the very least.
Use the --without-x option if you really want this.

Where can I find the 32bit development packages of Xlib/Xfree86 on 12.04 64bit?

share|improve this question
not related to the question, but why not use the wine ppa? – Alexandre Mar 9 '12 at 1:15
i use wine quite often and sometimes new game releases won't work without patching wine. before wine 1.5.6, diablo 3 required patching and star wars the old republic still require custom patches. – whitepixel Jul 31 '12 at 19:01
@whitepixel Same problem with world of tanks. I'll be happy if somebody (or developers) create repository with fixed wine for games. ^.^ – nk9 Oct 5 '12 at 21:28… – Vanuan Nov 25 '12 at 15:51

You might need to compile wine yourself if you wanted to add custom patches. Currently for example the World of Warcraft and Diablo 3 Launchers/Downloaders depend on a patch that has not yet made it into the official wine repository.

Unfortunately ubuntu does either not ship the according 32-bit development files anymore or they currently cannot co-exist with its 64-bit pendant.


share|improve this answer
Does this bug still apply for Wine 1.7? – FuzzyToothpaste Oct 5 '14 at 15:41

To pass this error, you need to install X11 library development headers, for instance:

sudo apt-get install libx11-dev:i386

However when configuring wine, it won't solve the problem completely, as you'll get another error about FreeType 32-bit development files not found which would be more challenging (unless configuring --without-freetype).

So the easiest way is either to install wine binary package or build 32-bit wine on 64-bit machine using LXC (Linux Containers) as described in here.

share|improve this answer

I've been leveraging pdebuild which is a combination of pbuilder and debuild to build wine i386 on my laptop running Ubuntu 12.04 amd64.

I would first read through this page to understand what's going on and to setup your pbuilder environment:

once you get things setup, you can pick the latest ppa and build from there:

$ dget -u -x
$ cd wine1.5-1.5.9
$ DIST=precise ARCH=i386 pdebuild

You can place patches in the wine1.5-1.5.9/debian/patches directory and add in the file into the wine1.5-1.5.9/debian/patches/series file and also run dch -i to increment the version number on the package before running the pdebuild command to apply your own patches.

You could probably just use pbuilder and build wine from trunk as well, but I like to build from deb packages whenever I can.

share|improve this answer

AFAIK, the only way is to use chrooted environment:

share|improve this answer

You can download the source code using apt-get source wine1.*. Then cd to the folder, apply packages, and use dpgk to pack everything up again, which makes it compile as well. Then you turn it into a .deb and install.

Something like this:

sudo apt-get build-dep wine1.3
apt-get source wine1.3
cd wine1.3-*
patch -p1 < foo.patch
dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i wine1.3*.deb
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.