Secondo on Mac-OS Catalina: Installation Instructions
To be able to compile the Secondo database system, some tools and libraries must be installed. This document describes how to install all required tools.Prerequisite
OS X 10.15 uses 'zsh' as the default shell. Secondo uses some functions that are only available in the 'BASH' shell. Using zsh with Secondo can lead to some problems. Therefore, we recommend using the BASH as the default shell for the user that should work with SECONDO. The default shell can be set via command line by calling 'chsh -s /bin/bash' and re-login. As an alternative, the shell can be set in the system preferences under 'Users and Groups' → press the Ctrl key and click your user name → select 'Advanced Options' → 'Login Shell' → '/bin/bash' and re-login.
Fresh Installation
Step 1: Installing xcode command line tools
- open a terminal
- enter the following line:
gcc --version
Step 2: Installing Java-SDK
- open a terminal or use the one of the xcode installation
- enter the following line
javac -version
Step 3: Installing the Berkeley DB
Secondo uses the Berkeley-DB as a storage manager. Thus, an installation of this tool is required. Because of licensing issues, this library cannot be distributed together with Secondo.- open a browser and navigate to the Berkeley-DB download page
- download the db...tar.gz file of the latest Berkeley-DB version
- this requires an Oracle account
if you don't have such account, just create it. it's for free - open a terminal and navigate to the folder containing the db....tar.gz archive
- enter the following commands
(for other versions of the Berkeley-DB, just change the names in the first two commands):
tar -xzf db-18.1.40.tar.gz
cd db-18.1.40
cd build_unix
../dist/configure --prefix=$HOME/BDB --enable-cxx
make
mkdir $HOME/BDB
make install
Step 4: Installing SWI-Prolog
- open a browser and go to the home of SWI-Prolog
- click on Download → Swi-Prolog
- click on Stable release (the SDK is tested with Prolog 8.0.3)
- click on the MacOSX version to download the dmg file
- open Finder, go to Downloads and double click on this dmg file
- some time later, a SWI-Prolog icon is shown together with the application folder
- drag the SWI-Prolog icon into the application folder
Step 5: Install further tools and set environments variables
- open a terminal and navigate into a directory of your choice
- download the required tools for Catalina
curl -L https://github.com/secondo-database/secondo-database.github.io/raw/main/files/Installation/Mac/SDK_OSX_CATALINA.tar.gz --output SDK_OSX_CATALINA.tar.gz - unpack the downloaded file
tar -xzf SDK_OSX_CATALINA.tar.gz - change the directory
cd SDK_Catalina - run the installation script
./Install_On_Catalina.sh - if applicable change your .profile file according to the instructions printed out during the installation process
Step 6: Compiling Secondo
- open a terminal and navigate into the Secondo directory
cd $HOME/secondo - compile Secondo
make - Start Secondo according to the Secondo's User Manual
brew install gmp or brew install libjpeg).
Upgrade
To upgrade from a previous OS X / SDK version, please execute the following commands:
mkdir secondo-downloadcd secondo-downloadcurl -L https://ftp.gnu.org/gnu/bison/bison-3.0.5.tar.gz --output bison-3.0.5.tar.gztar zxvf bison-3.0.5.tar.gzcd bison-3.0.5./configure --prefix=$SECONDO_SDKmakemake installcd ..curl -L https://github.com/westes/flex/files/981163/flex-2.6.4.tar.gz --output flex-2.6.4.tar.gztar zxvf flex-2.6.4.tar.gzcd flex-2.6.4./configure --prefix=$SECONDO_SDKmakemake installcd ..cd ..rm -r secondo-download
If you have upgraded your Prolog Installation, please execute the following commands:
JPL=$(find /Applications -name "libjpl.dylib")PL=$(find /Applications -name "libswipl.dylib")SWIPLDIR=$(dirname $PL)install_name_tool -add_rpath $SWIPLDIR $JPLIn your Secondo source directory please execute:
make cleanmake
That is all, your Secondo SDK is successfully upgraded.