I'm trying to do this:
Build 32bit on 64 bit Linux using an automake configure script?
Doesn't work for me :(
Compileing wine. 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 "[email protected]"
| #define PACKAGE_URL "http://www.winehq.org"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
Configuration fails with: Cannot build a 32-bit program, you need to install 32-bit development libraries.
The 32-bit Wine prefix cannot be converted into the 32-bit Wine prefix to the 64-bit Wine prefix without an installed installation of 32bits.It’s essentially a matter of blowing away your wine prefix and replacing it with a 32 bit one. Is My Wine 32 Or 64 Bit?
So the basic approach to compile both 32-bit and 64-bit wine is: Build 32-bit wine in lxc, referring to the 64-bit wine and 32-bit tools 1. built in the previous steps On the page Building Biarch (Shared WoW64) Wine On Ubuntu we can read the following instructions: Install the 64-bit prerequisites:
I guess, only guess, it is due because WineHQ is always installed to work as 64 bit mode Windows, but those apps were made in the age of 32 bit, so... I've been looking for some easy instructions to install, from the scratch, a clean 32 bit mode WineHQ, but...
Rename your ~/.wine directory and create a new Wine environment by running $ WINEARCH=win32 winecfg. This will get you a 32-bit Wine environment. Not setting WINEARCH will get you a 64-bit one. I will test your idea. But..
I guess you use Ubuntu x64 which now supports multi-architecture. In other words on a 64 bit system you can build only Wine-x64 version. Building 32bit Wine on Ubuntu 12.04 x64 seems to buggy as for now.
So just run:
./configure --enable-win64
To build 32-bit wine on 64-bit machine, you can use LXC (Linux Containers) which is an operating-system-level virtualization environment for running multiple isolated Linux systems. It's the easiest solution so far, as Linux (such as Ubuntu or Debian) makes building 32-bit wine hard because the 64-bit system doesn't come with a full set of 32-bit development libraries (See: Bug #990982).
So the basic approach to compile both 32-bit and 64-bit wine is:
On the page Building Biarch (Shared WoW64) Wine On Ubuntu we can read the following instructions:
Install the 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 your 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 host to the lxc container:
sudo cp -R /etc/apt /var/lib/lxc/my32bitbox/rootfs/etc
Start the container; at the console login prompt it gives you, log in with your username and password.
sudo lxc-start -n my32bitbox
Now you're inside the container, in your real home directory. If you are not in the container (you do not have the prompt username@my32bitbox), then open a new terminal and:
sudo lxc-attach -n my32bitbox
login yourusername+password
Now, you are in the container. Do an out-of-tree build of Wine as normal, just to get the tools. You'll have to install all the needed prerequisites first. For instance:
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 the 64-bit build for data, and the 32-bit tools build 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 the 32-bit wine to force the last little bit of building:
cd $HOME/wine32
sudo make install
While still inside the container, shut it down:
sudo shutdown -h now
This drops you back out into your real machine. Next, you need to remove all existing Wine packages. You can do this from the command line but it's probably easier with aptitude or one of the GUI package management tools. You will need wine-mono, wine-gecko, and optionally winetricks for your compiled version of wine. However, these packages may depend on the existing wine installation which may force you to remove them.
Install the newly built wine into 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 it exists since it did not come from a package. Thus it is possible to later break its dependencies or install a conflicting version of wine without a warning from the package management tools. You can prevent this by creating a package or by blocking conflicting packages with apt-pinning by setting "Pin-Priority: -1" for the packages.
Notes:
sudo
or you need to switch to a user account.~/wine32/wine32 ~/.wine/path_to_winapp/my_app
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With