178 lines
4.4 KiB
Plaintext
178 lines
4.4 KiB
Plaintext
|
|
This document describes, how to create an environment able to
|
|
compile secondo on a fresh installed Open SuSe Linux 11.3.
|
|
|
|
(1) First, be sure that the Linux system is up to date.
|
|
|
|
(2) After a standard installation of SuSe 11.3, no develeper tools
|
|
are installed. So, you have to install various packets to be able
|
|
to compile Secondo.
|
|
|
|
Start the package management (yast) and install the following packages:
|
|
|
|
make
|
|
flex
|
|
bison
|
|
libjpeg-devel
|
|
swipl
|
|
gsl-devel
|
|
readline-devel
|
|
gmp-devel
|
|
java-1_6_0_openjdk-devel
|
|
gcc
|
|
gcc-c++
|
|
graphviz-devel
|
|
|
|
Yast will report a lot of additional packages to be installed. Just accept all
|
|
suggested changes.
|
|
|
|
(3) Unfortunately, there is no package available including the C++ API of the
|
|
Berkeley DB. Hence, it is necessary to configure and make the Berkely DB
|
|
manually
|
|
|
|
Get the Berkeley DB without encryption filename "db-?.?.??.NC.tar.gz"
|
|
for example from oracle.com.
|
|
|
|
copy the file into an empty directory and unpack the file using the following
|
|
command:
|
|
|
|
tar -xzf *.tar.gz
|
|
|
|
This creates a single directory having the name of the file without .tar.gz.
|
|
Change to this directory.
|
|
|
|
After that, change to the build_unix directory and enter the commands
|
|
|
|
mkdir $HOME/BDB
|
|
|
|
../dist/configure --prefix=$HOME/BDB --enable-cxx
|
|
|
|
This should be finished correctly
|
|
|
|
Then type
|
|
|
|
make
|
|
|
|
and after compilation has finished, type
|
|
|
|
make install
|
|
|
|
(4) After finishing the installation of the Berkeley DB, a file is needed to
|
|
set some environments variables. Because the locations for libraries and
|
|
includes differ for 32 and 64 bit systems, two different sets of commands are
|
|
required. Depending on your installed system, either choose the section for 32
|
|
bit or 64 bit platforms and copy the content into a file called
|
|
$HOME/.secondorc
|
|
|
|
If you are unsure about your system, you may type
|
|
|
|
uname -a
|
|
|
|
to find out about the running Linux kernel.
|
|
|
|
File contents for $HOME/.secondorc on a 32 bit environment:
|
|
|
|
################## .secondorc for 32 bit SuSe 11.3 environment #######
|
|
|
|
if [ -n "$1" ]; then
|
|
export SECONDO_BUILD_DIR=$1
|
|
else
|
|
export SECONDO_BUILD_DIR=$PWD
|
|
fi
|
|
|
|
export SECONDO_PLATFORM=linux
|
|
export BDB_DIR=$HOME/BDB
|
|
|
|
export BERKELEY_DB_DIR=$BDB_DIR
|
|
export BERKELEY_DB_LIB=db_cxx
|
|
|
|
export J2SDK_ROOT=//usr/lib/jvm/java-1.6.0-openjdk/
|
|
export SWI_HOME_DIR=/usr/lib/swipl-5.10.0/
|
|
export PL_LIB_DIR=$SWI_HOME_DIR/lib/i686-linux
|
|
export PL_LIB=swipl
|
|
export PL_INCLUDE_DIR=$SWI_HOME_DIR/include
|
|
export PL_VERSION=50647
|
|
export readline=true
|
|
export PATH=$PATH:.
|
|
export SECONDO_CONFIG=$SECONDO_BUILD_DIR/bin/SecondoConfig.ini
|
|
export JAVAVER="1.6"
|
|
|
|
export PATH=.:$BDB_DIR/bin:$PATH
|
|
|
|
|
|
export LD_LIBRARY_PATH=$BDB_DIR/lib:/usr/lib/swipl-5.10.0/lib/i686-linux/
|
|
|
|
# enable the pd system
|
|
export PATH=$PATH:$SECONDO_BUILD_DIR/Tools/pd
|
|
export PD_HEADER=$SECONDO_BUILD_DIR/Tools/pd/pd_header_listing
|
|
|
|
|
|
|
|
##################### end of file ######################################
|
|
|
|
|
|
File contents for $HOME/.secondorc on a 64 bit environment:
|
|
|
|
########### .secondorc for 64 bit SuSe 11.3 environment ##################
|
|
|
|
if [ -n "$1" ]; then
|
|
export SECONDO_BUILD_DIR=$1
|
|
else
|
|
export SECONDO_BUILD_DIR=$PWD
|
|
fi
|
|
|
|
|
|
export SECONDO_PLATFORM=linux64
|
|
|
|
# berkeley db
|
|
export BDB_DIR=/home/secondo/BDB
|
|
|
|
export BERKELEY_DB_DIR=$BDB_DIR
|
|
export BERKELEY_DB_LIB=db_cxx
|
|
|
|
|
|
# java
|
|
export J2SDK_ROOT=/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/
|
|
export JAVAVER="1.6"
|
|
|
|
# prolog related
|
|
export SWI_HOME_DIR=/usr/lib64/swipl-5.10.0
|
|
export PL_LIB_DIR=$SWI_HOME_DIR/lib/x86_64-linux/
|
|
export PL_LIB=swipl
|
|
export PL_INCLUDE_DIR=$SWI_HOME_DIR/include
|
|
export PL_VERSION=51000
|
|
export JPL_DLL=$PL_LIB_DIR/libjpl.so
|
|
export JPL_JAR=$SWI_HOME_DIR/lib/jpl.jar
|
|
|
|
|
|
# other
|
|
export readline=true
|
|
|
|
export PATH=$PATH:.
|
|
#export SECONDO_CONFIG=$SECONDO_BUILD_DIR/bin/SecondoConfig.ini
|
|
|
|
export PATH=.:$BDB_DIR/bin:$PATH
|
|
|
|
|
|
export LD_LIBRARY_PATH=$BDB_DIR/lib:$PL_LIB_DIR
|
|
|
|
# enable the pd system
|
|
export PATH=$PATH:$SECONDO_BUILD_DIR/Tools/pd
|
|
export PD_HEADER=$SECONDO_BUILD_DIR/Tools/pd/pd_header_listing
|
|
|
|
|
|
|
|
############## end of file #################################
|
|
|
|
|
|
(5) Download and unpack the Secondo source code, so that it is rooted at
|
|
a directory ~/secondo. If you choose an other directory for the source
|
|
root, you need to adapt the command in the next step.
|
|
|
|
(6) Add the following entry into the file $HOME/.bashrc file:
|
|
|
|
source ~/.secondorc $HOME/secondo
|
|
|
|
|
|
Now, you are finally able to compile Secondo (see Secondo User's Manual).
|