wiki:SkandhaInstall
Last modified 12 years ago Last modified on 07/24/06 11:52:46

Skandha4 is a graphics engine used by several SIG projects, including the Dynamic SceneGenerator and the BrainBrowser. Much more information is available at the Skandha4 project page This page is mostly about how to help the skandha4 servers running on Linux machines limp along.

Installing Skandha

Currently it is very difficult to get skandha to compile since skandha code has not been updated for a long time, but there have been changes in opengl and other libraries. The good news is that you probably won't need to since Andrew did it once and his binary works fine. Most of the projects primarily use lisp code which you can edit without recompiling skandha.

Picky about paths

There are several hard-coded paths that skandha expects to find, mostly in the lisp code. Most should be available through a combination of NFS mounts and symbolic links. The exception is /usr/people/hinshaw, which is available at /usr/local/data/archive/people/hinshaw/crown/hinshaw/

ls -ld /usr/people/andrew
ls -ld /usr/people/brinkley
ln -s /usr/local/data/archive/people/hinshaw/crown/hinshaw/ /usr/people/hinshaw
ln -s /usr/local/data/data* /usr/local
ln -s /usr/local/data/share/skanhda4 /usr/local/share/skanhda
ln -s /usr/local/data/share/skanhda4 /usr/local/share/skanhda4

So you should have all the directories like /usr/local/data1 and /usr/local/data11. }}}

Lock file workaround

There is a hardcoded temporary lock file path in src/skandha4/pub/xcore/c/flck.c and sometime the code broke and the first skandha to start up never releases the lock. So if you need to run more than one skandha do this. Unfortunately tmpwatch tries to reap the file, so this needs to be run regularly, for example from /etc/cron.daily/:

#!/bin/sh
chattr -i /var/tmp/.kblock
# touch to avoid tmpwatch reaping
touch /var/tmp/.kblock
# make sure nothing can access the file
chattr +i /var/tmp/.kblock

I haven't seen any ill effects of preventing the lock, it may only do something useful on Irix.

Running the server

The src/bin/skandha4 file is a script that sets up environment variables; we need to edit it to include the local libraries:

LD_LIBRARY_PATH=\/home/dsg/lib:/usr/local/lib:
export LD_LIBRARY_PATH
LD_RUN_PATH=\/home/dsg/lib:/usr/local/lib:
export LD_RUN_PATH

Then start the server with something like:

#!/bin/sh
ROOT=$HOME/public_html/dsg-skull/
GNUTERM=osmesa
GNUTERM_SIZE=512,512 # normal
export ROOT GNUTERM GNUTERM_SIZE
PORT=63070
cd $ROOT
export TMP=$ROOT
/home/dsg/src/bin/skandha4 -t$ROOT/skandha-transcript-devel -p$PORT xdada-server-skull

To make sure it works, telnet localhost 63070 and type (exit). If it hangs or says error: unbound function something is wrong.