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.


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

If the xcode tools are already present, the gcc's version is printed out. Otherwise a window pops up. Just click on install.

Step 2: Installing Java-SDK

If the Java SDK is already installed, the java compiler's version is displayed. Otherwise a browser is opened showing Oracle's Java download page. Accept the licence, download the latest SDK for Max-OS and install it.

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.

Step 4: Installing SWI-Prolog

Step 5: Install further tools and set environments variables

Step 6: Compiling Secondo

Note: Some algebras of SECONDO are using further dependencies. We recommend installing the Homebrew package manager for OS X. Using the package manager, these dependencies can be easily installed (e.g., brew install gmp or brew install libjpeg).


To upgrade from a previous OS X / SDK version, please execute the following commands:

mkdir secondo-download
cd secondo-download

curl -L --output bison-3.0.5.tar.gz
tar zxvf bison-3.0.5.tar.gz
cd bison-3.0.5
./configure --prefix=$SECONDO_SDK
make install
cd ..

curl -L --output flex-2.6.4.tar.gz
tar zxvf flex-2.6.4.tar.gz
cd flex-2.6.4
./configure --prefix=$SECONDO_SDK
make install
cd ..

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 $JPL

In your Secondo source directory please execute:

make clean

That is all, your Secondo SDK is successfully upgraded.
Last Changed: 2020-11-02 (JNI)