Skip to content

Instantly share code, notes, and snippets.

@doleron
Last active May 8, 2024 16:46
Show Gist options
  • Save doleron/b759165f4e91fb41a9c152d9e2858bfd to your computer and use it in GitHub Desktop.
Save doleron/b759165f4e91fb41a9c152d9e2858bfd to your computer and use it in GitHub Desktop.
Installation of ECLiPSe prolog interpreter

This instructions are intended to run on any linux debian, using Ubuntu 20.04 here.

The ECLiPSe prolog website is https://eclipseclp.org/index.html

Disclaimer: ECLiPSe prolog is not Eclipse IDE !

pre flight

as usual, update the machine

$ sudo apt update
$ sudo apt upgrade

install prerequisites

$ sudo apt install tk8.6

install ECLiPSe

create a folder for ECLiPSe

$ mkdir eclipse_prolog $ cd eclipse_prolog

get the files

$ wget https://eclipseclp.org/Distribution/Builds/7.0_54/x86_64_linux/eclipse_basic.tgz -P eclipse_prolog $ wget https://eclipseclp.org/Distribution/Builds/7.0_54/x86_64_linux/eclipse_doc.tgz -P eclipse_prolog

uncompress them

$ tar xpfz eclipse_prolog/eclipse_basic.tgz -C eclipse_prolog $ tar xpfz eclipse_prolog/eclipse_doc.tgz -C eclipse_prolog

optional: delete tgz files:

$ rm eclipse_basic.tgz
$ rm eclipse_doc.tgz

move folder to opt

$ cd ..
$ sudo mv eclipse_prolog /opt/

Run the configuration utility

$ sudo ./RUNME

Reply the questions. For my needs, the default options were good with two exceptions:

Where is your Java Runtime Environment installed (s to skip) []? 
Hit return to accept, or enter new value: 

This question is because the ECLiPSe installation can generate the java bindings required to use ECLiPSe prolog in java programs. Since I'm not planing to use this feature so far, (I don't have even a JDK on the system) I prefer to replied it by typing s.

The next question

You appear to already have the ECLiPSe reference documentation.

Do you wish to regenerate it [n]? 
Hit return to accept, or enter new value: 

Yes, sure! Documentation is always welcome. Type y to generate the docs for ECLiPSe!

If everything worked fine you'll end up with:

ECLiPSe installation done.
You should now add /opt/eclipse_prolog/bin/x86_64_linux
to your PATH environment variable.

Thus, to finish the installation, open ~\profile file with your preferred text editor:

$ nano ~/.profile

and append:

export PATH=$PATH:/opt/eclipse_prolog/bin/x86_64_linux/

save the file and run:

$ source ~/.profile

Note: redefining the PATH variable in ~/.profile will make ECLiPSe be available in any folder for your user. If you want to make ECLiPSe available for all users use the file /etc/environment instead.

Test installation

Open a terminal (or use the one opened already) and type:

$ eclipse

This open the command-line eclipse application:

ECLiPSe Constraint Logic Programming System [kernel threads]
Kernel and basic libraries copyright Cisco Systems, Inc.
and subject to the Cisco-style Mozilla Public Licence 1.1
(see legal/cmpl.txt or http://eclipseclp.org/licence)
Source available at www.sourceforge.org/projects/eclipse-clp
GMP library copyright Free Software Foundation, see legal/lgpl.txt
For other libraries see their individual copyright notices
Version 7.0 #54 (x86_64_linux), Wed Feb 26 22:13 2020
[eclipse 1]: 

To exit type:

[eclipse 1]: exit(0).

Do not forget the full end point mark!

ECLiPSe is shipped with a GUI. To open it type:

tkeclipse

That's all. Hope you enjoy ECLiPSe and prolog programming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment