Installation instructions for UpdateAPI


RDF Suite      RSSDB      RDF Update API      Download UpdateAPI      Installation      API specification      Usage      Error Handling     



Installing UpdateAPI

UpdateAPI is easy to install, because the source code consists of only one .c file and the compilation result is just one library file ( spi-api.so ). The instalation procedure consists of three steps, that are summurised as the ./configure && make && make install procedure. If you are familiar with it, you may not continue reading this document, exept in case of a problem during the compilation-installation. Installation of the API consists of three steps:


1. Configuration

Unzip the ziped file ( spi-api.tar.gz ) that it is available for downloading from here. Enter the source directory

    cd spi-api

and run the configure script with the nessecary parameters

    ./configure

This script will produce the makefile for the compilation step. UpdateAPI is using a few postgresql libraries to connect to the database. If postgres is installed in the system and the executables are accessible from the shell path, then the configure script will produce the correct result. If postgres executables are not accessible throuh the shell path, then the user should explicitily specify the lib and include location of postgresql. In order to check whether you have the postgres executables in your path, please check if you can run the pg_config command. For example, if you type:

    pg_config --version

the version of your postgres installation should be printed.

If postgres executables are accessible through your shell path, you may run configure with the following options:

./configure --with-pg-libdir=<postgres library path> --with-pg-includedir=<postgres include path>

These are the options with the explanation:
  --with-pg-libdir=<path>       explicitly specify the postgres library directory e.g. /usr/lib/postgres/lib
  --with-pg-includedir=<path>   explicitly specify the postgres include directory e.g. /usr/lib/postgres/include

For more information on the configure options, please type:

    ./configure --help


2. Compilation

In this phase, the user has succesfully configured the API and a Makefile has been produced in the source directory. Now it is time to compile the source code, by typing:

    make

Normally, make will finish without any errors. In case of an error, read carefully the 1.Configure section, remove the Makefile and start the installation procedure from the beggining. If the problem persists, please contact the author(s) of the program.


3. Installation

At this step, updateAPI has been succesfully compiled and the output library object is located in the BIN directory in the source folder. The library object is a file named 'rql-spi-api.so' and can be used as a library file. Most users prefer to use the file from this location ( spi-api/BIN/rql-spi-api.so ), but it is also possible to install it to the system. For that, you need to login as a superuser or root and type:

    make install

If you get an error like this:
    install: cannot create regular file `/usr/local/lib/rql-spi-api.so': Permission denied
    install: cannot create regular file `/usr/local/lib/updateAPI.o': Permission denied
    make: *** [install] Error 1

then you are probably not a privileged user. In case you don't have root or superuser access but you still want to install updateAPi library localy, you can specify an alternative installation location by reconfiguring updateAPI and passing the apropriate arguments (see ./configure --help for more information).

You can also install updateAPI manually, by copying rql-spi-api.so to your library folder.