Installing Wine on Ubuntu Edgy (6.10) 64-bit

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[2]: *** [gdi32.dll.so] Error 2
make[2]: Leaving directory `/home/drimbar/wine-0.9.1-winehq/dlls/gdi'
make[1]: *** [gdi] Error 2
make[1]: 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

I had already downloaded and extracted the Wine source code, in my case version 0.9.29 that was just released a couple of days ago.

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.

./configure

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
with
EXTRALIBS = /usr/lib32/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

20 Comments

  1. This was so helpful! No errors or anything, worked first try.

  2. A note: The EXTRALIBS field on my compile was blank. When I added “/usr/lib32/libsicuuc.a /usr/lib/libsicudata.a -lstdc++ -lgcc_s” the compile failed giving a similar error message as the one at the beginning of this blog. I left the field blank and Wine compiled happily. Good luck to all!
    -Fuzzy

  3. can you add a link to your precompiled binary

    cheers

  4. You just made my day!

    The EXTRALIBS thing doesn’t seem to apply to Wine 0.9.30.

  5. Great guide man, got it working first time with no errors, if only you could do the same with beryl

  6. easier:

    download the last wine package for ubuntu:

    http://wine.budgetdedicated.com/archive/index.html

    install using dpkg:

    sudo dpkg –force-architecture -i wine_0.9.30~winehq0~ubuntu~6.10-1_i386.deb

  7. This may be me being stupid, but I don’t understand where you extract the Wine source code to, or which is the ‘Wine directory’

  8. Anywhere; it doesn’t matter. I extracted it to a directory for my downloads, then the “Wine directory” is whatever directory it creates when you extract it.

  9. Mmkay, I get it now. It was me being dumb, but in a different way than I thought. I didn’t even have the proper source package

  10. Okay, so I’ve done all this, but now when I try and run something in Wine through terminal, it gives me this:
    err:imagelist:ImageList_ReplaceIcon no color!
    err:imagelist:ImageList_ReplaceIcon no color!
    err:imagelist:ImageList_ReplaceIcon no color!
    err:imagelist:ImageList_ReplaceIcon no color!
    Application tried to create a window, but no driver could be loaded.
    The X11 driver is missing. Check your build!
    Application tried to create a window, but no driver could be loaded.
    The X11 driver is missing. Check your build!

    I followed your directions exactly, so I don’t understand what the problem is.

  11. Try installing the libxxf86dga1 package to see if that eliminates your errors.

    I don’t claim to be an expert on Wine, so you might want to try more official channels of help.

  12. It is installed. Oh well, I’ll live without Wine for the while, I suppose.

  13. If only this would work at my system….
    I tried a few things now for the last 4 hours…everytime I get the message

    ../../tools/winegcc/winegcc -B../../tools/winebuild -shared ./ddraw.spec clipper.o ddraw.o ddraw_thunks.o device.o direct3d.o executebuffer.o gamma.o light.o main.o material.o palette.o parent.o regsvr.o surface.o surface_thunks.o texture.o utils.o vertexbuffer.o viewport.o version.res -o ddraw.dll.so -lole32 -luser32 -lgdi32 -ladvapi32 -lkernel32 -lntdll -ldxguid -luuid -L/usr/lib -lXext -lX11 ../../libs/port/libwine_port.a -L/lib32 -L/usr/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32
    /usr/bin/ld: skipping incompatible /usr/lib/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/libXext.a when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib32/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../../../lib32/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../../libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../../libXext.a when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/../lib32/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/bin/../lib/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/bin/../lib/libXext.a when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib32/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/libXext.a when searching for -lXext
    /usr/bin/ld: cannot find -lXext
    collect2: ld gab 1 als Ende-Status zurück
    winegcc: gcc-3.4 failed.
    make[2]: *** [ddraw.dll.so] Fehler 2
    make[2]: Verlasse Verzeichnis ‘/root/wine-0.9.25/dlls/ddraw’
    make[1]: *** [ddraw] Fehler 2
    make[1]: Verlasse Verzeichnis ‘/root/wine-0.9.25/dlls’
    make: *** [dlls] Fehler 2

    I’m not sure if this has something to do with the /dlls/gdi32 because the make in this directory works

    Any idea?

  14. Something more….
    in my case the linking wasn’t so easy.

    e.g. /usr/lib32/libX11.so.6 does not exist….so I made link to /usr/lib/libX11.so.6

    I’m sure if this is useful

  15. Yes – I have the same problem:

    err:imagelist:ImageList_ReplaceIcon no color!
    Application tried to create a window, but no driver could be loaded.
    The X11 driver is missing. Check your build!

    Using wine-0.9.33 on Kubuntu edgy

  16. i got the same error as Georg


    /usr/bin/ld: skipping incompatible /usr/lib/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/libXext.a when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/bin/../lib/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/bin/../lib/libXext.a when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/libXext.so when searching for -lXext
    /usr/bin/ld: skipping incompatible /usr/lib/libXext.a when searching for -lXext
    /usr/bin/ld: cannot find -lXext
    collect2: ld returned 1 exit status
    winegcc: gcc failed.
    make[2]: *** [ddraw.dll.so] Error 2
    make[2]: Leaving directory `/home/ixai/.wine/wine-0.9.34/dlls/ddraw'
    make[1]: *** [ddraw] Error 2
    make[1]: Leaving directory `/home/ixai/.wine/wine-0.9.34/dlls'
    make: *** [dlls] Error 2

    anyone knows of a way to solve this?

  17. Initially I got the same errors as Ixai.
    I’m running Feisty Fawn, 64 bit.
    I installed all the packages listed here:
    http://ubuntuforums.org/showthread.php?t=29728 (mentioned above)
    Once I got them installed the config and compile went ok without errors.

  18. ‘course now that it’s built, it dumps core…
    bleah.

  19. ld: Relocatable linking with relocations from format elf32-i386 (obj/debug/TestAppLogAttr.o) to format elf64-x86-64 (obj/debug/TestApp.lo) is not supported

    what could be solution for such a problem ….
    my linux is 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

  20. ld: Relocatable linking with relocations from format elf32-i386 (obj/debug/TestAppLogAttr.o) to format elf64-x86-64 (obj/debug/TestApp.lo) is not supported

Post a Comment

Your email is never shared. Required fields are marked *

*
*

One Trackback

  • del.izi.oes am 13.03.07 at kleinski // on March 13, 2007 at 6:41 pm

    […] Il Filosofo » Installing Wine on Ubuntu Edgy (6.10) 64-bit – For 64-bit systems you have to compile Wine yourself. […]