Can't Build 32Bit Wine on 64Bit Linux

can't compile wine on 64 bit ubuntu

libfreetype6-dev is the package that I needed. The issue is that this package installs the header files needed for the compilation in /usr/include/freetype2 but the configure script is looking for the headers in /usr/include/freetype . So the solution I found was to add a symbolic link in /usr/include that points to /usr/include/freetype2 that is called freetype. This can be done in the terminal like this.

sudo ln -s /usr/include/freetype2 /usr/include/freetype

Build 32bit on 64 bit Linux using an automake configure script?

Passing the following argument to configure script allowed me to build the 32bit library on 64bit Linux

./configure --build=i686-pc-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32

How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake


export CFLAGS=-m32

64bit debian and 32bit Wine

The package libgphoto2-2:i386 is not available on debian jessie , it is only available on debian wheezy and the libgphoto2-l10n replace it.

the libgnutls26:i386 is only available for debian Wheezy and Sid , it can not be installed on debian jessie.

The wine program is available on jessie backports with multiarch support (Architecture=All)

Edit your sources.list, open the terminal and run the following:

sudo apt edit-sources

Add the following line:

deb http://httpredir.debian.org/debian jessie-backports main

Save your file then run:

sudo dpkg --add-architecture i386
sudo apt update

Install the 32 bit version of wine:

sudo apt install -t jessie-backports wine32

How to execute shell scripts from 32-bit Wine on 64-bit Linux?

I am a user of the program in question and I did some experimenting with it.

Not 32-bit vs. 64-bit but "shared object" vs. "executable" ?

Running file /bin/dash it prints:

/bin/dash: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), ...

Running file /bin/bash however prints:

/bin/bash: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), ...

dash is a "shared object" while bash is an "executable". Clearly /bin/dash seems to work like an executable in some way (I don't know the technical details here), but it seems that this difference matters to Wine.

I got the same error as you reported (can't start 64 bit process) for Wine 1.4, but the error I got on newer versions of Wine was wine: Bad EXE format for Z:\bin\sh..

If you actually just replace /bin/sh with /bin/bash (even though that's a 64-bit binary) it will work. Wine also didn't seem to like running a symlink, but copying over /bin/bash worked.

So first back up the existing (symlinked) /bin/sh with:

sudo cp /bin/sh /bin/sh_orig

Then copy bash to sh:

sudo cp /bin/bash /bin/sh

Then when I ran Wine with the program and its calls to /bin/sh work fine.

Alternatively, you download a 32-bit shell directly

Pull down the .deb file for the 32-bit bash shell:

 wget http://us.archive.ubuntu.com/ubuntu/pool/main/b/bash/bash_4.3-6ubuntu1_i386.deb

I your home directory, extract it into a folder:

mkdir ~/bash_4.3-6ubuntu1_i386
dpkg -x bash_4.3-6ubuntu1_i386.deb ~/bash_4.3-6ubuntu1_i386

Copy the bash script into /bin/sh:

sudo mv /bin/sh /bin/sh64original
sudo cp ~/bash_4.3-6ubuntu1_i386/bin/bash /bin/sh
sudo chown root:root /bin/sh

Or run schroot, but still must copy /bin/bash to /bin/sh

Basile Starynkevitch mentioned above about setting up a 32-bit shell in an schroot environment. I did that with an Ubuntu 14.04 32-bit environment and ran into the same issue with the dash vs. bash "shared object" vs. "executable" (but when I copied /bin/bash to /bin/sh it worked), so that helped me realize that the distinction wasn't the 32-bit vs. 64-bit difference but the format of the shell executables that mattered to Wine.

If you would like I can post details for setting up the schroot evnironment but basically I followed the instructions at https://help.ubuntu.com/community/DebootstrapChroot but needed to configure the /etc/apt/sources.list to have the full list of packages (as are installed in my default host system) for apt-get install wine to work.



Related Topics



Leave a reply



Submit