### Commented transcript. Comments are prefixed by ###, as this line. ### Install SICStus Prolog 4.5.0 on CentOS 7 (Red Hat Enterprise Linux is similar) ### Extract the installer files you downloaded from the SICStus Prolog site. [spdev@centos7 ~]$ tar xzf sp-4.5.0-x86_64-linux-glibc2.17.tar.gz [spdev@centos7 ~]$ 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@centos7 sp-4.5.0-x86_64-linux-glibc2.17]$ sudo ./InstallSICStus We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for spdev: 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.... /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@centos7 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 CentOS 7 [spdev@centos7 sp-4.5.0-x86_64-linux-glibc2.17]$ cat /etc/centos-release CentOS Linux release 7.6.1810 (Core) ### 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@centos7 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 ! 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, 12 msec 111360 bytes yes | ?- halt. ### You can install the dependencies after SICStus has been installed, if you detect that some dependency is missing. [spdev@centos7 sp-4.5.0-x86_64-linux-glibc2.17]$ sudo yum install java-1.8.0-openjdk-devel tcl-devel tk-devel libdb-devel unixODBC-devel ... Installed: java-1.8.0-openjdk-devel.x86_64 1:1.8.0.191.b12-1.el7_6 libdb-devel.x86_64 0:5.3.21-24.el7 tcl-devel.x86_64 1:8.5.13-8.el7 tk-devel.x86_64 1:8.5.13-6.el7 unixODBC-devel.x86_64 0:2.3.1-11.el7 ... Complete! ### Now the Tcl/Tk library no longer gives a link error [spdev@centos7 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 % loaded /usr/local/sicstus4.5.0/bin/sp-4.5.0/sicstus-4.5.0/library/tcltk.po in module tcltk, 13 msec 104880 bytes yes | ?- halt. [spdev@centos7 sp-4.5.0-x86_64-linux-glibc2.17]$