### Commented transcript. Comments are prefixed by ###, as this line. ### Install SICStus Prolog 4.5.0 on Ubuntu 18. ### Extract the installer files you downloaded from the SICStus Prolog site. spdev@ubuntu:~$ tar xzf sp-4.5.0-x86_64-linux-glibc2.17.tar.gz spdev@ubuntu:~$ cd sp-4.5.0-x86_64-linux-glibc2.17/ ### Run the installer as root, using sudo, if you want to install SICStus for all users. ### Except for the license information, this installation accepts all defaults. spdev@ubuntu:~/sp-4.5.0-x86_64-linux-glibc2.17$ sudo ./InstallSICStus SICStus Prolog Release 4 ======================== http://www.sics.se/sicstus/ --------------------------------------- Binary Distribution Installation Script --------------------------------------- This script will install SICStus Prolog 4.5.0 on your computer. Before proceeding, make sure that you have downloaded the correct distribution and that you have your licensing information at hand, as you will be prompted for site-name, license code, and expiration date during the installation. It is also recommended that you read the Release Notes before installing SICStus Prolog. The Release Notes can be found online at http://www.sics.se/sicstus/docs/ During the installation, a cache-file (install.cache) will be created which will store your answers to be used as defaults if you need to run the installation script again. You may safely delete this file if you wish. The installation script will ask a couple of questions regarding the installation. Most of these questions have a default alternative in square brackets ([]). Pressing return will give you the default answer. If you do not understand the question, the default answer will usually do what you want. Note: You must have Perl installed and available in your PATH. Perl is available for free from www.cpan.org. Typically Perl is already installed. Report bugs and other problems to SICStus Support using http://www.sics.se/sicstus/bugreport/bugreport.html Install SICStus Prolog 4.5.0 [yes] ? Checking installation cache... no Where do you want to install SICStus [/usr/local/sicstus4.5.0] ? Directory /usr/local/sicstus4.5.0 does not exist. Create [yes] ? Creating uninstall script... You should now enter your site-name, license-code, and expiration date. Sitename ? Some Site Name License-code ? 3ak4-cb82-abcd-dcz4-78fh Expiration date ? permanent If you do not have a C compiler and its supporting files, and for some reason do not wish to install them, you can install a pre-built version of SICStus. One disadvantage with the pre-built installation is that SICStus libraries that interface to third-party products (Tcl/Tk, Berkeley DB, Java, ODBC) may not work, or may require environment variables such as LD_LIBRARY_PATH to be set. Another disadvantage is that spld and splfr may not work unless you manually adjust the configure file (/usr/local/sicstus4.5.0/bin/spconfig-4.5.0). Of course neither spld nor splfr will work anyway if you do not have a C compiler. If you are unsure, a prebuilt installation is most likely OK. You can always reinstall later, if needed. Install the pre-built binaries (choose "no" for full installation) [yes] ? Looking for perl.... /usr/bin/perl *************************************************************** The installation will proceed without further user interaction, unless there are errors. *************************************************************** Uncompressing sicstus.tar.compress... done. Unpacking sicstus.tar... (please wait) done. Copying files to /usr/local/sicstus4.5.0. This may take a few minutes... done. Creating development system symlinks...done. Installing development system binary...done. Creating copies of SICStus run-time for multiple run-time support...done. Installing SICStus utilities: spdet, spxref, mzn-sicstus, spfz done. Installing sprt and sprti...done. Installing save-dumps...done. Compiling license file...done. Completing uninstall info...done. Cleaning up... done. Installation complete. The SICStus development system has been installed as: /usr/local/sicstus4.5.0/bin/sicstus The documentation can be accessed locally by opening the URL: file:/usr/local/sicstus4.5.0/lib/sicstus-4.5.0/doc/html/ or on the SICStus website: http://www.sics.se/sicstus/docs/ Uninstall by running /home/spdev/sp-4.5.0-x86_64-linux-glibc2.17/UnInstallSICStus ### Verify that the installed sicstus works. NOTE: You must use the installed binary spdev@ubuntu:~/sp-4.5.0-x86_64-linux-glibc2.17$ /usr/local/sicstus4.5.0/bin/sicstus SICStus 4.5.0 (x86_64-linux-glibc2.17): Thu Jan 17 08:09:06 PST 2019 Licensed to Some Site Name | ?- write('Hello World'),nl. Hello World yes | ?- halt. ### This transcript was run on Ubuntu 18.04 LTS spdev@ubuntu:~/sp-4.5.0-x86_64-linux-glibc2.17$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic spdev@ubuntu:~/sp-4.5.0-x86_64-linux-glibc2.17$ ### The following illustrates what happens if you installed a ### pre-built version of SICStus and then try to use a library that ### links to third-party products (like Tcl/Tk): spdev@ubuntu:~/sp-4.5.0-x86_64-linux-glibc2.17$ /usr/local/sicstus4.5.0/bin/sicstus SICStus 4.5.0 (x86_64-linux-glibc2.17): Thu Jan 17 08:09:06 PST 2019 Licensed to Some Site Name | ?- use_module(library(tcltk)). % loading /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/tcltk.po... % module tcltk imported into user % loading /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/types.po... % module types imported into tcltk % loaded /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/types.po in module types, 0 msec 4784 bytes % loading foreign resource /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/x86_64-linux-glibc2.17/tcltk.so in module tcltk ! System error ! 'dlopen("/usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/x86_64-linux-glibc2.17/tcltk.so") failed in load_foreign_resource/1: libtk8.5.so: cannot open shared object file: No such file or directory' % loaded /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/tcltk.po in module tcltk, 14 msec 111360 bytes yes | ?- halt. ### You can install the dependencies after SICStus has been installed, if you detect that some dependency is missing. spdev@ubuntu:~/sp-4.5.0-x86_64-linux-glibc2.17$ sudo apt-get --quiet --assume-yes install gcc libc-dev tcl8.5-dev tk8.5-dev libdb-dev unixodbc-dev openjdk-11-jdk ... done. ### Now the Tcl/Tk library no longer gives a link error spdev@ubuntu:~/sp-4.5.0-x86_64-linux-glibc2.17$ /usr/local/sicstus4.5.0/bin/sicstus SICStus 4.5.0 (x86_64-linux-glibc2.17): Thu Jan 17 08:09:06 PST 2019 Licensed to Some Site Name | ?- use_module(library(tcltk)). % loading /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/tcltk.po... % module tcltk imported into user % loading /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/types.po... % module types imported into tcltk % loaded /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/types.po in module types, 1 msec 4784 bytes % loading foreign resource /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/x86_64-linux-glibc2.17/tcltk.so in module tcltk % loaded /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/tcltk.po in module tcltk, 15 msec 104880 bytes yes | ?- halt. spdev@ubuntu:~/sp-4.5.0-x86_64-linux-glibc2.17$