Cannot build 32-bit Wine on 64-bit Linux

I am trying to do this:
Build a 32-bit version on 64-bit Linux using automake configure script?
Doesn't work for me :( Wine compilation. I found this in config.log:

configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "Wine" | #define PACKAGE_TARNAME "wine" | #define PACKAGE_VERSION "1.5.19" | #define PACKAGE_STRING "Wine 1.5.19" | #define PACKAGE_BUGREPORT "wine-devel@winehq.org" | #define PACKAGE_URL "http://www.winehq.org" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } 

Configuration error with: Cannot build a 32-bit program, you need to install 32-bit development libraries.

+10
linux
Dec 08 '12 at 18:10
source share
7 answers
 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 

and

 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 

got an X error.

+10
Mar 06 '14 at
source share
β€” -

To build 32-bit wine on a 64-bit machine, you can use LXC (Linux Containers), which is an operating system-level virtualization environment for running several isolated Linux systems. This is the simplest solution, since Linux (for example, Ubuntu or Debian) makes 32-bit wine complex because the 64-bit system does not come with a full set of 32-bit development libraries (see Bug # 990982 ).

Thus, the main approach to compiling both 32-bit and 64-bit wines:

  • 64-bit wine assembly
  • Build 32-bit tools in lxc
  • Create a 32-bit wine in lxc, referring to 64-bit wines and 32-bit tools 1. built the previous steps
  • Install 32-bit wine
  • Install 64-bit wine

On the Create Biarch (Shared WoW64) Wine On Ubuntu page, we can read the following instructions:

  • Install 64-bit prerequisites:

     sudo apt-get update sudo apt-get build-dep wine 
  • Build 64-bit wine:

     mkdir $HOME/wine64 cd $HOME/wine64 ../wine-git/configure --enable-win64 make -j4 
  • Install lxc:

     sudo apt-get install lxc 
  • Create a 32-bit container named "my32bitbox" using the Ubuntu template and bind the home directory to the / home directory in the Container:

     sudo lxc-create -t ubuntu -n my32bitbox -- --bindhome $LOGNAME -a i386 
  • Copy the apt configuration from the node to the lxc container:

     sudo cp -R /etc/apt /var/lib/lxc/my32bitbox/rootfs/etc 
  • Run the container; at the console login prompt, he gives you a log with your username and password.

     sudo lxc-start -n my32bitbox 
  • You are now inside the container in your real home directory. if you are not in the container (you do not have an invitation @ username my32bitbox), then open a new terminal and:

     sudo lxc-attach -n my32bitbox login yourusername+password 
  • You are now in the container. Make a custom build of Wine as normal, just to get the tools. You will need to establish all the necessary prerequisites. For example:

     sudo apt-get update sudo apt-get install python-software-properties git-core sudo apt-get build-dep wine mkdir $HOME/wine32-tools cd $HOME/wine32-tools ~/wine-git/configure make -j4 
  • Still inside the container, do it again, this time pointing to a 64-bit build for data and 32-bit tools for tools:

     mkdir $HOME/wine32 cd $HOME/wine32 ~/wine-git/configure --with-wine64=$HOME/wine64 --with-wine-tools=$HOME/wine32-tools make -j4 
  • Still inside the container, install 32-bit wine to force the last piece of the building:

     cd $HOME/wine32 sudo make install 
  • While still inside the container, close it:

     sudo shutdown -h now 

    It throws you back to your real car. Then you need to remove all existing Wine packages. You can do this from a command but it is probably easier with aptitude or one of the GUI package management tools. You will need wine-mono, wine-gecko and possibly winetricks for your compiled version of wine. However, these packages may depend on the existing winery, which may force you to remove them.

  • Install the newly built wine in your real machine:

     cd $HOME/wine32 sudo make install cd $HOME/wine64 sudo make install 

    Warning. When you install a locally built version of Wine, the package management system will not know that it exists, because it is not from the package. Thus, you can either install a contradictory version of the wine without warning from the package management tools. You can prevent this package from being created or block conflicting packets using apt-pinning by setting β€œPin-Priority: -1” for these packets.

  • Then install Mono, Gecko, and possibly winetricks if you need to remove their packages due to the conflicting wine package.

Note. Many of the above commands require root privileges. Your user account must have root access via sudo or you need to switch to the user account.

+7
Jun 14 '15 at 13:06
source share

Which to some extent helped me on Debian Wheezy:

 dpkg --add-architecture i386 apt-get update 

to enable installation from i386 repositories

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

to install 32-bit libraries. I'm still having problems with X libs:

 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 it is technically not necessary.

+2
Aug 31 '13 at 21:54
source share

Do not do this. Wine is built for 32-bit by default, even on 64-bit systems (since it should run 32-bit programs for Windows). At the same time, it also creates 64-bit Wine. If you want to disable it, configure it with:

  ./configure --disable-win64 
+1
Dec 08 '12 at 18:15
source share

you can solve the error X:

 sudo apt-get install xorg-dev 
+1
Mar 05 '14 at 13:37
source share

I assume that you are using Ubuntu x64, which now supports multi-architecture. In other words, on a 64-bit system, you can only create a version of Wine-x64. Creating 32-bit wine on Ubuntu 12.04 x64 doesn't seem to work yet.

So just run:

 ./configure --enable-win64 
+1
Mar 09 '15 at 2:42
source share

The wiki wiki has an easy way to install the necessary 32-bit development libraries on a 64-bit system using chroot: http://wiki.winehq.org/WineOn64bit

0
Jan 12 '13 at 15:59
source share



All Articles