Last modified 4 years ago Last modified on 10/11/13 10:16:25

Installing Opal

This is a short description how to install the Opal System. This description is biased towards a single-user machine running Linux or MacOS X; but it should be easy to adapt the procedure to other Unix flavours.

The current release of Opal is only available as source release. Installation takes more time, but it is easier and less dependent on particular distributions.

In case of problems please send a message to opal-users@….

Installation of the Opal system

We describe a simple procedure to install the Opal system.

Get the source archive from the following link: ocs-2.4b.tar.gz

The Opal system requires the developers' version of the packages tcl, tk, readline, flex as well as gcc, which carry different names in different distributions unfortunately. Under MacOS X Xcode is required.

Installation is done by root. We assume that the archive has been placed in /tmp. To install OCS system-wide in /opt/ocs-2.4b the following steps have to be performed:

1) $ cd /tmp
2) $ gunzip < ocs-2.4b.tar.gz | tar xf -
3) $ cd ocs-2.4a
4) $ ./configure
5) $ make install

To install in a different target-directory, the simple configure line can be replaced by

$ ./configure --prefix=<directory>

to install in <directory> instead of /opt/ocs-2.4b.

In line 4 the Opal system is configured for your Unix environment. configure searches for Unix tools, libraries, etc. You might encounter errors here, if something is not found. This will probably not be the case with Linux, but other flavours of Unix might keep their tools or libraries in places where configure does not look. In this case consult the more in-depth installation manual Installation of OCS.

Line 5 actually starts the installation of the Opal system. This may take a while.

Using Opal

Users must configure Opal individually. This concerns the shell's search path, and perhaps the Emacs mode.

Add these lines to your ~/.bashrc:

export PATH=<directory>/bin:$PATH 

where <directory> is either /opt/ocs-2.4b if no --prefix was given in the configure step or the directory named as --prefix.

Is everything working?

For the following tests, copy the examples in a local directory:

$ mkdir ~/ocs
$ cp -r <directory>/examples ~/ocs 

Testing ocs

First, test whether the script ocs works:

$ ocs info
You are using `2.4b (11-Oct-2013)'
located at `/opt/ocs-2.4b'.
The project ($OCSPROJECT) is not specified.

Testing the Opal compiler

This test calls the Opal compiler without using special libraries:

$ cd ~/ocs/examples/Integrator
$ ocs

The compiled program asks for input. Use something like (SIN x) for f and two real numbers for a and b.

$ ./integral

Testing OpalWin

If the following program works, Tcl and Tk have been correctly configured.

$ cd ~/ocs/examples/Graphics/Queens
$ ocs
$ ./queens

The program visualizes the search for the solutions to the eight queens problem.

Testing the Opal Interpreter

$ cd ~/ocs/examples/Rational
$ oasys
oasys version 1.1e (ocs version 2.4b), (c) 1989-2000 The OPAL Group, TU-Berlin 
>a Rational.sign
>f Rational.sign
Rational.sign>e 6/8 + 3/5
checking Rational.sign
checking Rational.impl
compiling Rational.impl
starting evaluator process