Using a 64-bit operating system is somewhat like being left-handed: you feel with some justification that you’re orbiting among the elite, but the world is designed against you. Installing Wine on 32-bit Ubuntu was a breeze: just a couple lines of APT. However, for 64-bit systems you have to compile Wine yourself. Even following the directions on the Wine wiki, I ran into compile errors:
ld: Relocatable linking with relocations from format elf64-x86-64 (/usr/lib/libsicuuc.a(ubidi.ao)) to format elf32-i386 (gdi32.Q3Qz7R.o) is not supported winebuild: ld -m elf_i386 -r failed with status 256 winegcc: ../../tools/winebuild/winebuild failed. make: *** [gdi32.dll.so] Error 2 make: Leaving directory `/home/drimbar/wine-0.9.1-winehq/dlls/gdi' make: *** [gdi] Error 2 make: Leaving directory `/home/drimbar/wine-0.9.1-winehq/dlls' make: *** [dlls] Error 2 Compilation failed, aborting install.
So here’s what I did, combining tips from the Wine wiki and this forum.
First, get some fonts for Wine.
sudo apt-get install libfreetype6-dev sudo apt-get install fontforge
Next, some compiling dependencies.
sudo apt-get install gcc flex bison libc6-i386 libc6-dev-i386
This next part worried me a little bit when the Wine wiki said to do it; here you make symbolic links for your 32-bit library files, but I already had these symbolic links pointing to other files. I’m not sure where the existing links came from, but I just wrote over them.
cd /usr/lib32 sudo ln -s libX11.so.6 libX11.so sudo ln -s libXext.so.6 libXext.so sudo ln -s libfreetype.so.6 libfreetype.so sudo ln -s libz.so.1 libz.so
I initially omitted this next step but got OpenGL compile errors.
sudo ln -s libGL.so.1 libGL.so sudo ln -s libGLU.so.1 libGLU.so
Set the library directories and the compiler environment.
LDFLAGS="-L/lib32 -L/usr/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" CC="gcc-3.4 -m32"
Then I entered the extracted Wine directory and configured the installation files.
I edited the
dlls/gdi32/Makefile file to point to the 32-bit libraries. I replaced
EXTRALIBS = /usr/lib/libsicuuc.a /usr/lib/libsicudata.a -lstdc++ -lgcc_s
EXTRALIBS = /usr/lib
/libsicuuc.a /usr/lib/libsicudata.a -lstdc++ -lgcc_s
Unfortunately the 32-bit libsicudata.a library file now linked to didn’t already exist, so I had to download it from here and move it to the /usr/lib/ directory. It’s a little voodoo programming, because I have no idea what libsicudata.a does, but without it I got compile errors.
make depend make all
Finally, no errors at this point, so I could install.
sudo make install