I found there is no way to get Win4Lin running on my 64-bit kernel, so I'm looking at the alternatives. I also found some other problems with 64-bit, and I'll list them here in case other people are considering a 64-bit version of Linux.
First, some terminology that I've had to learn:
pure64: All code is compiled for 64-bit. Because AMD64's support both 32 and 64-bit code, this isn't your only option. You can run both 32-bit and 64-bit apps with a 64-bit kernel, at the same time. I don't think you can run 64-bit apps with a 32-bit kernel.
32-bit chroot: 'chroot' is a way of having a sub-installation of Linux that is just for running certain apps. You must create an directory which looks like a full Linux installation to the programs that run in it, and has everything those apps need to run (all libraries, data files etc) as they cannot access anything outside the 'chroot jail' they are in. A 32-bit chroot is when you have a chroot that uses only 32-bit apps and libraries. You need this because 32-bit and 64-bit libraries and apps don't always play well together.
Now, the problems:
Win4Lin 5 - can't run on a 64-bit kernel.
Any third party binaries, especially libraries and plugins, that you don't have the source code to and can't recompile. In my experience, you will only ever find a 32-bit version of these things, and often these don't work with 64-bit apps. Examples include trying to use the Flash plugin with a 64-bit version of Firefox.
Downloading random deb packages -- these are almost always built for i386 platform, and finding amd64 builds can take some doing.
Building your own i386 debs. I have one Debian package that I release for an app I'm writing - kio-sword. Compiling for i386 is now 'cross-compiling', and that isn't nearly as straight forward as compiling for your own architecture.
Some solutions to these are below:
-
Alternatives for running Windows apps. These include:
Full emulation software (e.g. Bochs, VMWare). Disadvantages: slow, not integrated well into your existing system (can't access files directly), and expensive (VMWare)
-
WINE for running Windows apps directly under Linux. If you have a Windows installation this can work very well, as it can use real Windows DLLs as well as the free ones that WINE have produced.
I installed WINE using i386 debs (compiled for 32 bit, so I had to force it), and it seems to run fine. However, the only two programs I really need to run -- Excel and Internet Explorer -- do not work perfectly. Actually IE6 doesn't run at all, and Excel does run, but some advanced things that I need, like VBA forms, don't seem to work. Messing around with using native DLLs instead of WINE's might fix this, but it might not.
Don't use those plugins! (I'm happy to do without flash/Java plugins, but my housemate who uses my computer finds it more annoying when they don't 'just work' in Linux). Alternatively, do some faffy things, like install a 32-bit version of Firefox and the 32-bit flash plugin, or install them in a 32-bit chroot... quickly gets messy and so difficult to use that it's not worth the bother.
Not much of a problem - thankfully, re-compiling debs for amd64 from source is usually pretty straight-forward. The source packages often contain everything you need, and Debian build tools are excellent once you learn how to use them (which admittedly is not for beginners).
apt-get build-dep {packagename}
helps a lot.Follow this howto on cross-compiling on Debian to compile i386 debs. An alternative is setting up a 32-bit chroot for compilation: on Debian you can use debootstrap to set up a 32-bit chroot fairly easily, and once you've done it, using it for compilation purposes wouldn't be bad (unlike using it for other apps).
To conclude, 64-bit Linux, especially if you want to do the 'power user' things I'm used to doing, has some rough edges! I may end up doing a 32-bit Ubuntu installation, because the above is quite a lot of work, and there are some must-haves which are still can't-haves.
For more information, Gentoo has a nice AMD 64 Howto on problems (and solutions) with AMD 64 which applies to some extent to other distributions.