Wine's i386 build dependencies are not coinstallable on amd64

Bug #944321 reported by Susan Cragin on 2012-03-01
This bug affects 57 people
Affects Status Importance Assigned to Milestone
wine1.4 (Ubuntu)
wine1.6 (Ubuntu)

Bug Description

apt-get build-dep wine is recommended as a way of getting Wine's build dependencies in several places, however this will fail to produce a functional wine on amd64

--- original report ---

I have 64-bit precise with all updates.

The apt-get build-dep script for compiling wine is missing some items. In addition, some of the missing items are not present in the Ubuntu 64-bit repository (I checked).

The missing files seem to be primarily needed 32-bit libraries.

Message when run ./configure

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.

But the 32-bit development packages are not only not part of the script, they are not in the 64-bit repository at all.

Martin Pitt (pitti) on 2012-03-02
affects: apport (Ubuntu) → wine1.4 (Ubuntu)
Scott Ritchie (scottritchie) wrote :

The Wine package now builds differently on amd64 than on i386 - it builds 64-bit only, and then i386 support is pulled in a cross architecture way. It has to be this way, both to get 64 bit support and because due to multiarch the build daemons no longer have access to i386 packages on amd64.

You can try apt-get build-dep wine1.4:i386 if you're doing a local compile of just Wine. Building the package, however, will require an i386 install to get your own version of i386 wine package.

Changed in wine1.4 (Ubuntu):
status: New → Invalid
Susan Cragin (susancragin) wrote :

apt-get build-dep wine1.4:i386 and/or wine1.4-i386:386 do not work.
The script defaults to wine1.4

Scott Ritchie (scottritchie) wrote :

Yes, 32-on-64 builds of Wine in Precise are substantially more complicated now, because -dev packages are not cross-architecture coinstallable.

I recommend setting up a 32-bit chroot for building 32-bit wine.

Dan Kegel (dank) wrote :

oh, crap.

Dan Kegel (dank) wrote :

Why aren't dev packages coinstallable?

Vlad (badfiles) wrote :

I run
@vlad:/tmp/wine-1.5.1# sudo apt-get build-dep wine

then I get
@vlad:/tmp/wine-1.5.1# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for cpp... cpp
checking whether gcc -m32 works... no
configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries.

and I try
@vlad:/tmp/wine-1.5.1# sudo apt-get build-dep wine1.4:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to find a source package for wine1.4:i386

Are you guys kidding?

Changed in wine1.4 (Ubuntu):
status: Invalid → Confirmed
status: Confirmed → Opinion
status: Opinion → New
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wine1.4 (Ubuntu):
status: New → Confirmed
Scott Ritchie (scottritchie) wrote :

Again, dev packages are not co-installable but they should be.

To build the wine package 12.04 you need to build the i386 parts in an i386 pbuilder and the amd64 parts natively or in an amd64 pbuilder, and then install the wine-i386 package from the i386 pbuilder result alongside the amd64 packages.

Also Vlad, apt-get build-dep foo:i386 does not work because there is no such thing as an arch-specific source package -- apt-get build-dep gets the host architecture packages for the source package in question. This is fine, as there's no way to build cross-architecture packages without pbuilder or other chroot anyway.

I'll wiki/script how to do this somewhere soonish, there's been a good chunk of demand.

tizbac (tizbac2) wrote :

Still no way of building it?

Laryllan (laryllan) wrote :

Hi Scott,

i'd like a how-to or sth too.
Needing wine and cannot get it to work on precise.

Thanks for your help.

The X package is now co-installable? I used:

$ sudo apt-get install libx11-dev:i386

Which made configure continue. Now the problem is that I can't install libfreetype6-dev:i386 without also removing gcc :-(

Bryan Pederson (haykeye13) wrote :

This is affecting me as well. Anyway to finally get the fonts to install and continue trying to build wine?

<quote>This is affecting me as well. Anyway to finally get the fonts to install and continue trying to build wine?</quote>

Ubuntu 12.04 is unfortunately severally broken. Eric Pouech managed to compile 32-bit wine with a lot of hacks. See

michael (scrat-here) wrote :

libfreetype6-dev_2.4.8-1ubuntu2_i386.deb seems to be very ugly even removed:

build-essential dkms g++ gcc gcc-multilib libcairo2-dev libfontconfig1-dev libfreetype6-dev libgtk2.0-dev libpango1.0-dev libxft-dev nvidia-current

Who but some sick...would want to remove gcc and nvidia?

I reinstalled all 12.04 as I wasn't sure about what packages were removed. Now I don't know if I try again a wine 1.5.3 build.

PLEASE FIX, thanks

Timur Losev (blacklove0) wrote :

Finally. I got some results.

Just want to warn: I am not pro-linux-user. I am just a programmer.

I installed gcc-snapshot for compiling 32bit applications(-m32 flag).
I compiled freetype-249 and wine on gcc-snapshot.

configure command for freetype:
../configure CC="/usr/lib/gcc-snapshot/bin/gcc" CFLAGS="-m32 -I/usr/lib/i386-linux-gnu/glib-2.0/include/ -I/usr/lib/gcc-snapshot/include/c++/4.8.0/ -I/usr/lib/gcc-snapshot/include/c++/4.8.0/x86_64-linux-gnu/32/bits/ -I/usr/include/i386-linux-gnu/" LDFLAGS="-L/usr/lib/gcc-snapshot/lib32/ -L/usr/lib/i386-linux-gnu/ -L/lib/i386-linux-gnu/"

configure command for wine:
../configure CC="/usr/lib/gcc-snapshot/bin/gcc" CFLAGS="-I/usr/lib/i386-linux-gnu/glib-2.0/include/ -I/usr/lib/gcc-snapshot/include/c++/4.8.0/ -I/usr/lib/gcc-snapshot/include/c++/4.8.0/x86_64-linux-gnu/32/bits/ -I/usr/include/i386-linux-gnu/ -I/home/void/Documents/wine_deps/freetype-2.4.9/include/" LDFLAGS="-L/usr/lib/gcc-snapshot/lib32/ -L/usr/lib/i386-linux-gnu/ -L/lib/i386-linux-gnu/ -L/home/void/Documents/wine_deps/ftlibs/" --with-opengl=yes --with-freetype=yes -with-opencl=yes --without-gsm --without-hal

freetype libs you can find by the link below. You have to put it to /usr/lib/i386-linux-gnu/

As Eric Pouech said, a ton of symlinks are missing ( Here is only small list). I spent a lot of time to fix that issue.

And also I fixed and applyed "rawinput" patch.

There is my custom build of wine:
with debug and trace

I tested build on Deus EX Human Revolution - works perfect!

Timur Losev (blacklove0) wrote :

btw, version buit by me is 1.5.6 - latest from repo

Timur Losev (blacklove0) wrote :

I nearly forgot, here is glibconfig.h with 32bit support. Eric Pouech indicated where to put it.

Hope this help

It's hardly a fix, but a workaround that I used is to install 32bit Ubuntu into a virtual machine with VirtualBox. I compiled wine there and then copied the folder to the host machine. After that you only need to make sure that the 32bit libraries are installed, which can be done by running "sudo apt-get install ia32-libs".

ia32-libs appears to be nothing but a near-empty transitional package now, but it triggers the installation of i386 packages for most of the system's critical libraries.

kenjiru (kenjiru) wrote :

I've also tried to install libfreetype6-dev:i386 and it started removing random packages. Until I figure it out, it removed : build-essential dkms g++ gcc gcc-multilib nvidia-current. Please fix this package!

I find unacceptable to require people to install a 32bit system just for compiling wine!

The issue is that you need the development headers for your libraries, which are not co-installable. Your system can easily install both the 64 and 32bit version of libraries to run applications. When compiling software though, you need the header files that inform the compiler about the functionality of those libraries. This will be different between 32 and 64bit version of those libraries. Unfortunately at this time it seems the dev packages are not co-installable, and because of this, they have broken dependencies.

This issue goes a bit beyond a simple fix though, so it will almost certainly be a future release before a fix can be engineered for it, with how quickly multi-arch itself got rolled out though, I doubt it will be a terribly long wait.

killown (systemofdown) wrote :

sudo apt-get install libfreetype6-dev:i386 removes libc6-dev:i386 libfreetype6-dev:i386 linux-libc-dev:i386 zlib1g-dev:i386

Can't compile wine because that

Eric Appleman (erappleman) wrote :

Has the situation in quantal improved at all?

haha01haha01 (haha01haha01) wrote :

I also wish to know that, with quantal being rolled out next week, I need to know whether I am going with 32 or 64 and the compilability of wine is my most major concern. Has anybody tried to do this on quantal64 and can update us on the situation?

Eric Appleman & haha01haha01, I've installed Quantal and had a go myself, it still has the freetype problem when trying to compile wine. Guess I'm stuck with my virtualbox method for now. This is so very annoying for those of us trying to build wine from source, it's more or less necessary for some of us.

haha01haha01 (haha01haha01) wrote :

Thanks for your research Daniel, it looks like I'm going with 32-bit then.

By the way, I think you can use a chroot to compile wine on 64-bit, you don't need to set up a whole vm for that.

haha01haha01, I actually find the vm a little more straightforward. It's just like compiling wine used to be before the blasted multiarch troubles. And I'm definitely not experienced in messing around with chroots.

B Bobo (yout-bobo123) on 2012-11-26
tags: added: multiarch ubuntu-disaster
dk (dev-gaminglounge) wrote :

This is important guys - please fix this.

Scott Ritchie (scottritchie) wrote :

This is not a simple fix and requires substantial engineering. It is, however, specced out and in progress:

Now, you could argue that we should not have attempted multiarch at all until multiarch cross was ready, but if that were the case we still wouldn't have 64 bit wine today. More broadly, making Wine building slightly more difficult on 64-bit systems seems to be just about the only visible downside to the multiarch transition.

tags: removed: ubuntu-disaster
K1773R (k1773r) wrote :

its a good idea to implement a new feature into a LTS and break the system itself... just sad ubuntu team, its getting worse and worse!

Dan Kegel (dank) wrote :

lxc is the easiest way to do the chroot. shows how to build just the 32 bit part; shows how to build and install a biarch 32/64 bit wine.

Changed in wine1.6 (Ubuntu):
importance: Undecided → Wishlist
Changed in wine1.4 (Ubuntu):
status: Confirmed → Won't Fix
summary: - apt-get build-dep script for wine missing xorg and
+ Wine's i386 build dependencies are not coinstallable on amd64
Changed in wine1.6 (Ubuntu):
status: New → Triaged
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers