Table of Contents
Secondo Installation Manual @ UNIBZ
This document briefly describes Secondo DBMS installation for Kubuntu Linux 6.06 Dapper Drake. If any important detail is missing, please inform me via e-mail kasperovics(a]inf.unibz.it or add it yourself, if you have appropriate access permissions.
Install Necessary Packages
Below are listed the packages I have on my laptop in order to download and compile secondo. All the packages are from a standard Kubuntu Dapper Drake repository. Of course, not all necessary packages are listed - package dependencies should apply.
Package | Version |
---|---|
subversion | 1.3.1-3ubuntu1 |
gcc-4.0 | 4.0.3-1ubuntu5 |
flex-old | 2.5.4a-7 |
bison | 2.1-0.2ubuntu1 |
libc6-dev | 2.3.6-0ubuntu20 |
libstdc++6-4.0-dev | 4.0.3-1ubuntu5 |
sun-java5-bin | 1.5.0-06-1 |
sun-java5-demo | 1.5.0-06-1 |
sun-java5-jdk | 1.5.0-06-1 |
sun-java5-jre | 1.5.0-06-1 |
swi-prolog | 5.2.13-1 |
swi-prolog-clib | 5.2.13-1 |
libdb4.3 | 4.3.29-5build1 |
libdb4.3++c2 | 4.3.29-5build1 |
libdb4.3-dev | 4.3.29-5build1 |
libdb4.3++-dev | 4.3.29-5build1 |
libjpeg62 | 6b-11 |
libjpeg62-dev | 6b-11 |
libreadline5 | 5.1-7build1 |
libreadline5-dev | 5.1-7build1 |
Download from SVN
There are different ways how you can download anything from an SVN repository. I prefer graphical environments and Eclipse plugin “Subclipse” is the best I have found for Linux. However, the use a command-line tool svn
probably is more common. For this purpose you might wish to assign a path to Secondo SVN repository to an environment variable. This could be done in the following way:
echo "SECSVN=\"https://babbage.inf.unibz.it/dis/secondo\"" >> ~/.bashrc
The following command is used to list the content of the repository:</p>
svn list $SECSVN
This command should ask you your password to the Secondo SVN repository, assuming that your linux account matches to your repository account. If it is not so, press ctrl+c
and enter your repository account. To checkout a repository directory secondo/
to a current directory use the command:
mkdir ~/workspace cd ~/workspace svn checkout $SECSVN/secondo
You can synchronize your previously checked out local copy with the current repository using svn update
command.
NEW: Since 11.01.2007 the location of the repository has changed. If you have some work in your local copy from the old repository, do this:
cd ~/workspace/secondo svn switch --relocate svn+ssh://babbage.inf.unibz.it/var/lib/svn/dis/research/secondo https://babbage.inf.unibz.it/dis/secondo
Set Compilation and Operation Pathes
Create a file that exports all necessary pathes as environment variables. On my machine the file is called ~/.secondorc
. Below follows the content of the file.
export SECONDO_BUILD_DIR=$HOME/workspace/secondo export SECONDO_PLATFORM=linux export BERKELEY_DB_LIB="db_cxx" export BERKELEY_DB_DIR=/usr export J2SDK_ROOT=/usr/lib/jvm/java-1.5.0-sun export SWI_HOME_DIR=/usr/lib/swi-prolog export PL_LIB_DIR=$SWI_HOME_DIR/runtime/i386 export PL_INCLUDE_DIR=$SWI_HOME_DIR/include export SECONDO_JAVA=$J2SDK_ROOT/bin/java
You can use these definitions wheather calling source ~/.secondorc
command in a terminal session, where you're going to compile or run secondo, wheather adding it to your ~/.bashrc
file:
echo "source ~/.secondorc" >> ~/.bashrc
Secondo make file is expecting prolog runtime library to be called libpl.a
, however, in Kubuntu package the library is called libplmt.a
. To correct this error you can make a symbolic link running the following commands:
cd /usr/lib/swi-prolog/runtime/i386 sudo ln -sf libplmt.a libpl.a
In order to use installed Java2 SDK normally, you might have to setup JAVA_HOME
environment variable to point to the installed J2SDK directory. In my computer I have many java programs so I use a system-wide variable. On Kubuntu Linux system it is set with a command:
sudo echo "JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun" >> /etc/environment
To ensure that you have a correct java version and it is correctly stated in system pathes, run javac -version
.
Compile
To compile secondo, run the following commands in a terminal session:
source ~/.secondorc cd $SECONDO_BUILD_DIR make
NEW: If you get an error
NLLex.cpp: In member function `virtual int NLScanner::yylex()': NLLex.cpp:982: error: `yy_current_buffer' undeclared (first use this function)
This means you have got a wrong flex version. To correct the error just delete file NLLex.cpp, because it is generated by flex and will be recreated during the next make
.
Edit Configuration Files
Under Construction
Run
To run Secondo DBMS with a GUI client open two new terminal sessions. In the first session type the following commands:
source ~/.secondorc cd $SECONDO_BUILD_DIR/bin ./SecondoMonitor startup
In the second terminal type:
source ~/.secondorc cd $SECONDO_BUILD_DIR/Javagui ./sgui
Import and Commit
With any of the following commands the following option is compulsory -m “Your comment to the changes you're posting … ”
If you are going to post your directory to the repository for the first time use import
command. The following command imports the content of the current directory (but not the current directory itself!) into secondo/Algebras/DummyAlgebra
directory in the repository.
svn import $SECSVN/secondo/Algebras/DummyAlgebra -m "first import";
All the files imported are now under the version control. To post current changes to repository use commit
command. Don't forget -m
option. To add a new file to the version control use add
command. To remove file from version control use delete
command. Both commands add
and delete
are actually executed after the first commit
command.
Download from CVS
I'm going to regularly update Secondo SVN repository on babbage.inf.unibz.it
, however, if you prefer to download the latest version of Secondo directly from FernUniversität Hagen you have to use cvs
client. You can obtain a login and password writing a personal e-mail me or to Igor(.)Timko(a]unibz(.)it. To download the latest version of secondo to a directory ~/workspace
run the commands:
cd ~/workspace cvs -d ":pserver:your_login@some.server.com/path/to/cvsroot" login cvs -d ":pserver:your_login@some.server.com/path/to/cvsroot" export -f -r HEAD secondo-src cvs -d ":pserver:your_login@some.server.com/path/to/cvsroot" export -f -r HEAD secondo-databases cvs -d ":pserver:your_login@some.server.com/path/to/cvsroot" export -f -r HEAD secondo-data