Home - Forums - Documentation - Gallery - Bugs

Contents

Setting up Crystal Space and CEL on Linux in a Non Standard Directory


NOTE: This is a work in progress. It is not complete, and may not even be understandable.


I've decided to write about my journey in getting Crystal Space and CEL setup on Linux, as, many people seem to be having the same problems as I've been having, getting them compiled and functioning properly.

Getting the sources

First, let's start by choosing between the current stable release, or the latest svn.

Stable

If you value the stability of an unchanging setup, and want to avoid updating to broken code, you should stick with the latest stable release of each of them. You can find them here.

Extract the archives to where you want Crystal Space and CEL installed.

For example:

If you want them installed to your home directory then you should have:
/home/[your username]/crystalspace/
/home/[your username]/cel/
or whatever you want to call them.

This is because we are not actually going to install them as such (i.e. "jam install"), but just build them (jam).

Latest

If you want to stay up to date with the latest features, you don't mind having to recompile each time you update, and can live with errors and broken code from time to time, change to the directory you want them installed in, and download the latest svn with the following command line commands:

For Crystal Space:

svn co https://svn.sourceforge.net/svnroot/crystal/CS/trunk crystalspace

And for CEL:

svn co https://svn.sourceforge.net/svnroot/cel/cel/trunk cel

External Libraries

Here's some links to lists of external libraries you can use with Crystal Space and CEL:

Crystal Space

CEL

Setting things up

There are some libraries I use with Crystal Space and CEL that I have installed in non standard directories, which can take a little extra to set up.

If an external library (installed in non standard directory) uses pkg-config (you can tell by, when you install the library, it will put a file in "[path where external library is installed]/lib/pkgconfig" called "[name of library].pc"), then (as far as I know) you need to set the pkg-config search path before you run ./configure (else ./configure won't find them). Set that path like this:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/[path where external library is installed]/lib/pkgconfig

The compiled Crystal Space and CEL libraries need to know where the external libraries are, and, if you have installed them in a non standard directory, you need to tell the Crystal Space and CEL libraries where they are somehow. You can set the LD_LIBRARY_PATH environment variable to where the external libraries are installed, but you'll have to keep setting it again in every new termanal, or set it in a startup file like $HOME/.bashrc. Another option is to set LD_RUN_PATH before you compile Crystal Space and CEL. This is the way I do it, because I couldn't seem to get LD_LIBRARY_PATH to set in $HOME/.bash_profile (and $HOME/.bashrc is only read by interactive shells and user scripts). So I set LD_RUN_PATH like this:

export LD_RUN_PATH=$LD_RUN_PATH:/[path where external library is installed]/lib

Misc Problems

I had a problem compiling python support for Crystal Space where it said "Virtual memory exhausted!". If you get this, and you have made sure you have enough virtual memory (you can check by using the command "free"), then check to make sure you don't have a limit on how much virtual memory can be used, by using the command:

ulimit -a

If it says something like:

virtual memory (kbytes, -v) 50000

(or any other number), then set it to unlimited using this command:

ulimit -v unlimited

| User page | Discussion | View source | History |