$Id: README,v 1.2 2000/07/08 09:24:40 iang Exp $ guile-pg 0.07 ============= This is a set of bindings providing a Guile interface to the PostgreSQL front-end library libpq. This is alpha code. It has bugs, and the interfaces may change from version to version. To build guile-pg you need to have installed both Guile >= 1.3.4 and the PostgreSQL frontend library libpq. This version of guile-pg has been tested with PostgreSQL version 7.0.2, but you may find it works with versions prior to this. Please report your experiences in this respect to me. Building and Installing Guile-pg -------------------------------- Generic install instructions are provided in the file INSTALL. If you're in a hurry: Get the latest source distribution from http://guile-pg.sourceforge.net/ or ftp://guile-pg.sourceforge.net/pub/guile-pg/ Unpack it. If you're using GNU tar you can do this by typing tar xzf guile-pg-x.xx.tar.gz If you're not using GNU tar then you need to explicitly unzip it first. Type: gzip -d -c guile-pg-x.xx.tar.gz | tar xf - Then change to the top-level directory guile-pg-x.xx and run the configure script, followed by make: cd guile-pg-x.xx ./configure make If the ./configure script failed because it couldn't find libpq or the libpq headers then you can use the --with-libpq option to direct configure to the appropriate directory. E.g. if you installed Postgres with the prefix ~/local/ix86, so that the libpq headers are in ~/local/ix86/include and the library in ~/local/ix86/lib then you would configure guile-pg using a line like ./configure --with-libpq=~/local/ix86 If your libpq include directory is somewhere other than where the lib dorectory is then you can use the more specific switches --with-libpq-includes and --with-libpq-libs. See the output of ./configure --help for details. If the configure script failed because it couldn't find guile-config, then make sure that script is on your path. The executable guile-pg will need to be able to load the shared libguile.so library. This might be on a default shared library path that your link-loader searches, or it might not. If it isn't then you will need to direct your linker to put this directory on the search path for dependencies. Do this by passing the appropriate options to the linker using the LDFLAGS environment variable when you run the configure script. If you use GCC with GNU ld and guile is installed under /opt/guile, say, then this can be achieved by setting the LDFLAGS environment variable as follows LDFLAGS='-Wl,-rpath -Wl/opt/guile/lib' ./configure If you use a C shell then you can use the env program: env LDFLAGS='-Wl,-rpath -Wl/opt/guile/lib' ./configure Now run the tests. These need to be run as a user with permissions to create databases. They also need permissions to write to the guile-pg build directory. You could do this by unpacking and building guile-pg as the Postgres superuser, or by making yourself a user with permissions to create databases. To do the latter use the PostgreSQL `createuser' command. The tests assume that the postmaster is either running on the local host or on the host pointed to by the PGHOST environment variable. If PostgreSQL is running on a different host then type export PGHOST=postgres.somewhere.org or setenv PGHOST postgres.somewhere.org if you use the other sort of shell. The tests will destroy any existing database called 'guile_pg_test', then create it anew. Once the tests have completed you can destroy the guile_pg_test database by typing destroydb guile_pg_test To run the tests type make check The basic tests should all pass. The large-object tests will fail because of bugs in PostgreSQL. If the basic tests passed then you may want to install guile-pg. To do this type make install If you didn't use the --prefix options to configure then the shared library code will have been installed wherever Guile's shared libraries are installed, and the scheme code for the postgres interface will have been installed where Guile's scheme files were. If you want to see what files would be installed where before you run make install, use the -n option of make to get a report of what would be done, without actually doing it. That is, type make -n install There is a reference manual in the source distribution. To see it type cd doc info --file ./guile-pg.info If you want to print out the documentation type cd doc make dvi dvips -o guile-pg.ps guile-pg.dvi then print the guile-pg.ps file. If you want to make an HTML version of the manual then type texi2html guile-pg.texi Reporting Bugs -------------- Please report bugs to guile-pg-devel@lists.sourceforge.net Thanks Ian Grant