Installing Open GENIE

Open GENIE is available as a binary distribution for the common machine types and in a source code distribution for anything else. If the binary distribution is available for your machine and operating system, this is the easiest way to install Open GENIE.

The binary distribution kits are marked with the name of the machine, the operating system and the manafacturer of the machine range if known.

for example

alpha-dec-osf3.2

means that the version of Open GENIE in the binary distribution was made for a machine with an alpha/AXP processor, in a machine manafactured by Digital Equipment Corporation and running Version 4.0 of the OSF/1 operating system (Now Digital UNIX).

Generally, all these should match with your system for a binary kit to work. If you are running a version of Unix but are unsure of these details, you can download the file config.guess and run it on your system with the command "sh config.guess". This script will attempt to guess which flavour of unix you are running and report back with a string similar to the one above. If it matches one of the GENIE binary distributions this will be the appropriate version to use for your machine.

Installation instructions for VMS, Unix machines and Windows-NT/95 are different so there are different sections describing how to install each one. If your machine does not have a binary version of the kit available, you may be able to build one from the source code, to do this you will need to read the section on Source Code Installation. Binary Installation


Binary Installation

Choose the binary installation instructions below which match the type of hardware on which you are installing Open GENIE.

Unix installation
VMS installation
Windows/NT Windows-95 installation

Unix Installation

All unix kits are supplied as compressed tar files (made by the tar program on the appropriate machine). To de-compress you will need to have gunzip installed (if you do not have this, it is available here as a tar file for building on your system).

To install Open GENIE follow the instructions given here for a Digital Alpha machine but substitute the appropriate names and version numbers for your distribution kit of Open GENIE

gunzip genie-1.0-alpha-dec-osf3.2.tar.gz
tar xvf genie-1.0-alpha-dec-osf3.2.tar
cd genie-1.0-alpha-dec-osf3.2

To install GENIE in the default system location (i.e. data files in /usr/local/genie and executables in /usr/local/bin) type:

./configure
make install

You will need to do the "make install" from the super user or "root" account If you wish to see what "make install" will do without actually performing the install, type

make -n install

The last command can only be executed by the superuser and does a system wide installation. If you do not have access to the superuser account, you may change the "./configure" command to give different default installation directories for yourself, for example

./configure --prefix=$HOME/genie --exec-prefix=$HOME/bin

will change the default installation directories putting any binary files into your account's "$HOME/bin" directory and the rest of genie into a "$HOME/genie" directory (your "bin" directory will need to be in your path to run genie automatically).

Once GENIE is installed, it can be invoked by running the "genie" script in the "bin" directory. If the "bin" directory is specified in your shell PATH environment variable, you should be able to just type

genie

If you are using a C shell, you will need to type

rehash

before the command will work properly.

VMS Installation

Here are the steps needed to get Open GENIE running on a Dec alpha/AXP machine running VMS6.2 or later.

Step 1 - Uncompressing the kit

All VMS/alpha kits are supplied as compressed zip files (made by the public domain zip program). To de-compress you will need to have unzip installed (if you do not have this, it is available here as a VMS alpha executeable).

If unzip is not installed by default on your system, you may need to set up the command by typing the line below

$ unzip :== $ disk:[directory]unzip_axp.exe

where "disk:[directory]" is the location of the unzip_axp.exe file.

Next, uncompress the Open GENIE kit using the command below (you will need approximately 40000 blocks of disk space to successfully uncompress and install Open GENIE).

$ unzip genie-1_0-alpha-dec-vms6_2.zip

This will create a directory "disk:[directory.OPENGENIE_1_0]".

If you already have Tim pearson's PGPLOT package installed on your machine, you can skip to Step 3. You can check by seeing if both logical names PGPLOT_DIR and PGPLOT_FONT are already defined.

Step 2 - setting up PGPLOT for Open GENIE

If you do not have PGPLOT installed on your system you will need to copy the file PGXWIN_SERVER.EXE and put it into the [.OPENGENIE_1_0] directory. If you copied it at the same time as you got the installation kit you can simply rename it.
ie

$ rename pgxwin_server.exe [.opengenie_1_0]*.*

Next, change into the OpenGENIE directory and type the following command to convert the format of the GRFONT.DAT file. Note you will need to end the command with two CTRL-Z characters as shown.

$ exchange/network/transfer_mode=block/fdl=sys$input grfont.dat grfont.dat
RECORD
FORMAT VARIABLE
^Z^Z
$

Step 3 - Editing your LOGIN.COM

For normal usage, Open GENIE can be run from this directory by adding lines similar to the ones below to your LOGIN.COM file.

$ define GENIE_DIR		disk:[directory]	! substitute your local names here
$ define GENIE_SMALLTALK_IMAGE  genie_dir:genie.im
$ define GENIE_GCL_INIT         genie_dir:default_genieinit.gcl
$ define GENIE_EXE              genie_dir:gmain.
$ define GENIE_SHARED_LIBRARY   genie_dir:genie.so
$ define GENIE			genie_shared_library
$
$! Only define the next two if you do not have PGPLOT installed
$ define PGPLOT_DIR		genie_dir
$ define PGPLOT_FONT		pgplot_dir:gfont.dat
$
$! set up commands
$ opengenie :== $GENIE_EXE
$ gmodule   :== @GENIE_DIR:GMODULE

To test the installation re-run your login.com

$ @sys$login:login.com
$ opengenie

The next step is only necessary if you wish to make Open GENIE available system wide otherwise your installation is now complete.

Step 4 - System wide installation

If you wish to install Open GENIE on a system which is shared between several users you will need to put the logical name definitions above into the system startup file SYSTARTUP_VMS.COM and the two symbol definitions into SYLOGIN.COM. You may also want to install the shared library and executeable as known shareable images which you can do by adding the lines

$ INSTALL ADD GENIE_DIR:GENIE.SO /OPEN /HEADER /SHARED
$ INSTALL ADD GENIE_DIR:GMAIN.   /OPEN /HEADER /SHARED

to the SYSTARTUP_VMS.COM file after the logical name definitions.

Windows-NT/95

Windows/NT and Windows-95 are not supported in the first release of Open GENIE but will be made available in subsequent releases.


Source Code Installation

Unless you are prepared to compile a fairly complex software system written in C/C++ we recommend that you check for a binary installation of Open GENIE and install that instead :-).

Source code installation is normally more complicated than the Binary installation but it is useful if:

  1. You need to install Open GENIE on a machine/operating system combination for which we have not yet provided a binary installation.
  2. You wish to develop or modify the Open GENIE code in some way.

It is also very likely that you will need to have some familiarity with the C, C++ and FORTRAN compilers on your system. Generally we would recommend that you install GNU g++ and use either g77 or the native FORTRAN compiler for building Open GENIE.

Before embarking on a source code build, it may well be worth mailing us at genie@isise.rl.ac.uk to check that we are not planning to do a similar build or that someone else has not already done one.

The source code is distributed in a compressed tar file which you will need to unwind in a suitable development area. The PGPLOT and Splash libraries are distributed as separate distributions which will need to be unpacked in pgplot and splash subdirectories respectively. Following this the trees must be patched to update them with modifications and files added for Open GENIE. The commands needed will be similar to the ones shown below.

cat genie-1.1.tar.gz | gunzip | tar xf -
cd genie-1.1
cat ../pgplot5.1.1.tar.gz | gunzip | tar xf -
cd splash
cat ../../splash1.7.tar.Z | gunzip | tar xf -

The pgplot tree should now be in the "pgplot" subdirectory and splash in the "splash" subdirectory. The patches can be applied with the commands

cd genie-1.1/pgplot
patch -p2 -s < pgplot-5.1.1.patch
cd ../splash
patch -p2 -s < splash-1.7.patch

These patches should apply fully without asking questions, if you get a question such as "File to patch:", check that pgplot and splash were extracted correctly so that the paths "genie-1.1/pgplot/makemake" and "genie-1.1/splash/Makefile.in" both point to valid files.

Ideally, the code will now build automatically if you type.

cd genie-1.1
./configure
make all

this builds the development version of Open GENIE which can be run by typing "./parser" from within the "src" direcotory. To go the whole way and build an install kit you will need to do a

make kit

to build a compressed tar file for a binary installation. This can then be installed to a users directory or system wide as described in the section on Binary Installation. Note that to build a kit you will also need a copy of GNU autoconf installed (see ftp://ftp.nd.rl.ac.uk/pub/packages/gnu).

If you are struggling we will give advice on genie@isise.rl.ac.uk. When you do contact us for advice, please provide us with examples of the errors that occur in the mail message. Remember that we probably can only guess at what might be wrong as we are unlikely to have the same system that you have to test things on.

Please check out the operating system specific notes below, they could save you a lot of time !

Operating system specific notes (README files)

At the moment our primary development platform is Digital UNIX (OSF/1) on alpha AXP and this is generally the one which works best for building without a hitch. Linux works fine with a little fiddling. IRIX (for version 5.3) works but is likely not to work immediatly for later versions. VMS, only attempt this if you are strong willed and familiar with VMS/POSIX and have it installed on VMS 6.2 or later. VMS building on VAX is not recommended although we have done it!

We provide notes to help you with building on specific operating systems, these notes can also be found in the README.<os> files of the source code distribution.


Linux

This is not an exhaustive list but should help:

1. The version of g++ on the Linux we build on (1.2.13) does not find its own include files by default. Before building define the include path with

export CPLUS_INCLUDE_PATH=/usr/include/g++-include

2. Some files need shuffling in the pgplot distribution to build correctly with gcc and Linux requires a reduced drivers file (most of the others don't build)

( cd pgplot/sys_linux; ln -s f77_gcc.conf f77_cc.conf )
( cd  pgplot; mv linux_drivers.list drivers.list )

3. It may also be necessary to edit "src/Makefile" and remove the flag -extend_source from the $(F77) rule

4. After the first build attempt, cd library and do make -i (f77 return status of 4 stops a correct build)

5. cd src and touch lexcommands.c. To ensure that flex doesn't overwrite this with unworking code.

6. go into pgplot and edit the makefile to remove -f2c from the begining of the "LIBS=" line. Re-make to build the pgxwin_server properly

7. Now try "make all" again, it should run through this time.


IRIX

First run ./configure, currently this picks up f2c if it is installed which is probably not what is wanted.

Now edit ./config.cache and change the line

f2c_c_cos=${ac_cv_lib_f2c_c_cos='yes'}

to read "no"