# INSTALLING PgAccess UNDER IRIX 5.3.

This HOWO-TO make PgAccess working under Irix is written by Stuart Rison

These are the steps that I had to follow to get pgaccess to run on an INDIGO2 running postgreSQL 6.3.2 under IRIX 5.3. I make no guarantee whatsoever that the same step will work for others but at least it should point you in the right direction. Also, I am a biologist by training so I only got pgaccess working by fudging (that is, trial and error) this means that some of the steps may be unnecessary (e.g. compiling $postgreSQL_source/src/interfaces/libpgtcl as both a shared and static library) and they certainly haven't been optimised (I know nothing about compiler switches etc.).

1) Requirements:

You will need:

- postgreSQL source (http://www.postgresql.org)
- tcl8.0 source (http://www.tclconsortium.org/)
- tk8.0 source (http://www.tclconsortium.org/)
- pgaccess source (http://www.flex.ro/pgaccess)

2) Installation:

a) tcl/tk:

You must first install tcl and then tk (in that order). I just used ./configure, no switches and gmake. Their installation should be trouble free. Then you must move headers and libraries to the right places so:

Header files: both tcl and tk have a header file (tcl.h and tk.h). The tcl.h file is in $tcl_source_dir/generic and the tk.h file is in $tk_source_dir/generic; both should be copied to /usr/local/include.

Libraries: compilation (with cc) of tcl and tk yield libraries libtcl8.0.a and libtk8.0.a in $source_dir/unix. Both should be copied to /usr/local/lib.

b) postgreSQL:

Make sure you have a fully patched postgreSQL source. If your ./configure says it can't load 'IRIX' settings then you most probably will need to patch ./configure.

Configure using ./configure with the following switches: ./configure --with-includes=/usr/local/include

--with-libraries=/usr/local/lib --with-tcl [this and previous line as one]

Then make, make install as usual

c) Compiling libpgtcl:

The source for libpgtcl is in $postgreSQL_directory/src/interfaces/libpgsql.

I do this twice. Once with just gmake. This produces a static library libpgtcl.a which I leave where it is (I don't know what to do with it but it may just come in handy). The I modify Makefile manually with a text editor. Essentially I modify two line:

before:

# Shared library stuff

install-shlib-dep := shlib :=

after:

# Shared library stuff

install-shlib-dep := install-shlib shlib := libpgtcl.so.1

Then gmake -f Makefile_modified. This creates two shared (.so) libraries: libpgtcl.so and libpgtcl.so.1. I can't tell the difference between them so I copied them both to /usr/lib/.

d) running pgaccess:

Uncompress pgaccess (usually with gunzip and tar). So long as 'wish' (a binary produced when compiling tk8.0) is somewhere in your path, you should be able to run pgaccess with:

wish -f $pgaccess_dir/pgaccess.tcl [postgreSQL_database_name]

e) et voila!

3) Concluding remarks:

As I stated at the start of this document, following the procedure indicated above worked for me. I am sure, however, that a few of the steps are unnecessary/non-optimised/stupid etc. If any Unix (IRIX) boffin is reading this and you spot anything you would like to comment/correct etc. please e-mail me (stuart@ludwig.ucl.ac.uk). Also, if you just have questions and think I might help, please contact me at the same e-mail.

Finally, I can accept no responsibility if these steps don't work for you or if it all goes horribly wrong and you 'damage' your computer trying them. Let common sense prevail!

Good luck

Stuart Rison LICR University College London London W1P 8BT
stuart@ludwig.ucl.ac.uk