Kohan: Immortal Sovereigns on Newer Linux Distributions

Symptom

On many newer Linux distributions, Kohan: Immortal Sovereigns will run until the point on the intro screen where it says "Loading Interface", then will appear to hang. Alt-Enter out and if you've run Kohan from a terminal you'll notice that it has crashed.

Solution

Kohan was originally compiled with glibc 2.1, and it appears as though there are some compatibility issues with newer versions of glibc. Run Kohan with glibc 2.1, and it should work fine.


Details

The Problem

I bought a bunch of Linux games right after Loki went under and everyone was liquidating their stock. One of those games was Kohan: Immortal Sovereigns, and this game quickly became one of my all-time favorites. The gameplay is different enough from most other Real-Time Strategy games that I don't seem to ever tire of it.

Unfortunately, my computer apparently did tire of the game. When I upgraded to RedHat 9, I started having this problem where the game would appear to be loading up fine, but when it got to the point on the intro screen where it says "Loading Interface", it would appear to hang. Alt-Enter out to the terminal from which I ran kohan, and there's a bunch of crash output there. I would have to kill the game and try again. Two or three tries, and the game would run.

Then I upgraded to Fedora Core 2. Now Kohan hung every time, and I couldn't play it at all.

The Solution

Fortunatly, this problem can be overcome! Kohan was built with glibc version 2.1, while newer distributions ship with newer versions of glibc. And glibc isn't always backwards-compatible. This seems to be the root of the problem, and it is easily fixable.

First, you will need to get glibc 2.1. Please be careful not to over-write your current glibc! If you mess up glibc, you'll be up a creek. Thus, it's a good idea to install glibc 2.1 to a non-standard location, for example /usr/local/glibc2.1/.

If you use an RPM-based distribution such as RedHat or Fedora, my suggestion is to install the compat-glibc-6.2-xxx RPM. You should be able to find this on RPMfind.net. This RPM will install glibc 2.1 to /usr/i386-glibc21-linux/.

If you're not on an RPM-based distribution, you can get older versions of glibc from The GNU C Library page. Again, do not install this to the standard library path, as it may muck up your current glibc!

Running Kohan

Of course, since you've installed glibc 2.1 to a non-standard location, it won't make any difference unless you can tell Kohan where to look for glibc. By default, it will still find and use your system's default glibc and still have problems.

The easiest way to tell a program where to look for libraries is the LD_LIBRARY_PATH environment variable. You will want to set the path to glibc 2.1 as the first thing in that path. But you only want to do this for Kohan. If you do this system-wide, you will break most of your other programs!

To set LD_LIBRARY_PATH for a single program, you can set the variable on the command line before the command. For example (adjust the paths accordingly):
[you@yourhost]$ LD_LIBRARY_PATH=/usr/i386-glibc21-linux/lib:$LD_LIBRARY_PATH /usr/local/games/kohan/kohan
If you don't want to type this every time you play kohan, create a desktop shortcut or a simple shell script with this line.

No Guarantees

At this point, your understanding of this problem and its solution is as good as mine. I have outlined here what I did to get Kohan running, and I imagine it will work for you if you're having the same problem. But I cannot guarantee anything, and I probably won't be able to answer your questions if you have any. But feel free to ask anyway, and I'll see what I can do.



kgs3c@cs.virginia.edu
Last modified: Tue May 25 15:40:45 2004