Course Computer Systems for AI-programmers

"Computersystemen voor AI-programmeurs"

Softpkg

Description

The program softpkg provides a mechanism to generate the environment variables PATH, MANPATH, and LD_LIBRARY_PATH for use by any login-shell. In addition to these variables any other environment variable may be set by one of the package description files.

Activation

The softpkg program is called from your .cshrc, .profile or .bashrc script, which contains your personal preferences, and is automatically called at each login.

When you have changed something in your softpkg-preferences (as described later), it is wise to test the effect of this change before you logout (to prevent that you cannot login afterwards). You can also call this scripts from the commandline:

source ~/.cshrc

This is also a very handy command when you have to switch between two versions of the same software (for instance two versions of java or prolog).

Package descriptions

To know the appropriate values of the variables like PATH, MANPATH, and LD_LIBRARY_PATH for a certain packages, softpkg reads a package-description file. Most packages can be found at /usr/local/pkg.

You can add your own package description in your ${HOME}/pkg. For this course you need a package description which is available on the course pkg-directory: /home/cs_ai/pkg.

So please modify your ~/.cshrc by adding the following line before softpkg is called:

setenv PACKAGEPATH ${HOME}/pkg:/home/cs_ai/pkg:/usr/local/pkg

So please modify your ~/.profile by adding the following line before softpkg is called:

export PACKAGEPATH=$HOME/pkg/:/home/cs_ai/pkg/:/usr/local/pkg

~/.bashrc is not part of a standard FNWI-installation, so typically no call to softpkg is made. Modify your ~/.bashrc with the following lines:

export PACKAGEPATH=$HOME/pkg/:/home/cs_ai/pkg/:/usr/local/pkg

if [ -x /usr/local/bin/softpkg ]; then
     eval `/usr/local/bin/softpkg -b`
else
     PATH=/bin:/usr/local/bin
     export PATH
fi

Package addition

In the course 'Computer Systemen' the good old gcc-2 compiler and assembly is needed. Please modify your ~/.pkgrc file, and add a line gcc-2.95.3 and a line binutils-2.17 before the line DEFAULT

Activate your change by calling source ~/.cshrc, source ~/.profile or source ~/.bashrc (depended on your shell). Test your change by typing which gcc and which as. The answer should be:

     /home/cs_ai/packages/gcc-2.95.3/bin/gcc

     /home/cs_ai/packages/binutils-2.17/bin/as


Last updated February 10 2009

o This web-page and the list of participants to this course is maintained by Arnoud Visser (arnoud@science.uva.nl)
Faculty of Science
University of Amsterdam

visitors in arnoud@science.uva.nl