@ciao-lang/ts-ciao-interface
Version:
Simple Ciao interface for node.
83 lines (82 loc) • 29.5 kB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Installing Ciao from the source distribution — The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">☰</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="GettingStarted.html">↑</a><a class="lpdoc-navbutton" href="GettingStarted.html">←</a><a class="lpdoc-navbutton" href="CommandLineUse.html">→</a><a class="lpdoc-navbutton" href="ciaosearch.html">🔍</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> »<br/> </li><li><a href="GettingStarted.html">Getting started</a> »<br/> </li><li><a href=""><strong>Installing Ciao from the source distribution</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Requirements">Requirements</a></li><ul><li><a href="#Installing dependencies">Installing dependencies</a></li></ul><li><a href="#Network-based installation">Network-based installation</a></li><li><a href="#Quick installation from source">Quick installation from source</a></li><li><a href="#Full installation instructions">Full installation instructions</a></li><li><a href="#Uninstalling">Uninstalling</a></li><li><a href="#Checking for correct installation">Checking for correct installation</a></li><li><a href="#Cleaning up the source directory">Cleaning up the source directory</a></li><li><a href="#Environment variables used by Ciao executables">Environment variables used by Ciao executables</a></li><li><a href="#Multiarchitecture installation">Multiarchitecture installation</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Installing Ciao from the source distribution</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#Install"></a>
<strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Manuel Carro" href="ciaosearch.html#Manuel Carro">Manuel Carro</a>, <a class="lpdoc-idx-anchor" id="Daniel Cabeza" href="ciaosearch.html#Daniel Cabeza">Daniel Cabeza</a>, <a class="lpdoc-idx-anchor" id="Jose F. Morales" href="ciaosearch.html#Jose F. Morales">Jose F. Morales</a>, <a class="lpdoc-idx-anchor" id="Manuel Hermenegildo" href="ciaosearch.html#Manuel Hermenegildo">Manuel Hermenegildo</a>.<p>
This describes the installation procedure for the Ciao system, including libraries and manuals, from a <em>source</em> distribution. For more specific details, please read also the <tt>INSTALLATION</tt> file that comes with each component of Ciao. However, in most cases following this summary suffices.<p><div id="Requirements"><h2>Requirements</h2> <p>A minimal build requires: <ul> <li>A computing device running a supported operating system (Linux, BSD, macOS, Windows, Android). <li>A supported architecture (<tt>amd64</tt>, <tt>x86</tt>, <tt>arm</tt>). <li>A relatively modern C compiler (GCC or clang). <li>A POSIX-like environment. </ul> <p>Although Ciao implements its own build system, the <a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#GNU">GNU</a> implementation of the <a class="lpdoc-idx-anchor" id="1" href="ciaosearch.html#make">make</a> command is (still) used internally. If any of the installation steps stop right away with <a class="lpdoc-idx-anchor" id="2" href="ciaosearch.html#make"><tt>make</tt></a> error messages, you probably need to install <tt>gmake</tt>.<p>Installing <a href="https://www.gnu.org/software/emacs/"><strong>Emacs</strong></a> is highly recommended: the Ciao distribution includes a very powerful <a class="lpdoc-idx-anchor" id="3" href="ciaosearch.html#development environment"></a> <em>application development environment</em> which is based on <a class="lpdoc-idx-anchor" id="4" href="emacs.html"><tt>emacs</tt></a> and which enables, e.g., syntax coloring, source code formatting, embedded top-level, source-level debugging, context-sensitive on-line help, etc.<p>In any case, it is easy to use Ciao from a terminal and edit code with any editor of your choice. The top level includes some minimal editing facilities when <a href="https://github.com/hanslub42/rlwrap">rlwrap</a> is available.<p>Finally, documentation generation in PDF format requires TeX and ImageMagick.<p><div id="Installing dependencies"><h3>Installing dependencies</h3> <p>Depending on the operating system and package management tool, you may need to install the following dependencies (using <tt>sudo</tt> or as administrator or <tt>root</tt> user):<p><ul> <li>Debian/Ubuntu: <pre class="lpdoc-codeblock">$ apt-get install build-essential
# (optional) for 32 bits compatibility mode (x86)
$ apt-get install gcc-multilib libc6-i386 libc6-dev-i386 g++-multilib
# (optional) for emacs-based IDE
$ apt-get install emacs
# (optional) for line edition from the terminal
$ apt-get install rlwrap
# (optional) for generating documentation in PDF format
$ apt-get install texlive texinfo imagemagick
</pre> (valid for both <tt>x86</tt> and <tt>arm</tt> architectures)<p><li>Fedora: <pre class="lpdoc-codeblock">$ dnf install gcc make which kernel-headers kernel-devel emacs
# (optional) for emacs-based IDE
$ dnf install emacs
# (optional) for 32 bits compatibility mode (x86)
$ dnf install glibc-devel.i686 glibc-devel libstdc++-devel.i686
# (optional) for line edition from the terminal
$ dnf install rlwrap
# (optional) for generating documentation in PDF format
$ dnf install texlive texinfo texinfo-tex ImageMagick
</pre> (use <tt>yum</tt> instead of <tt>dnf</tt> above in older versions of Fedora)<p><li>Arch Linux: <pre class="lpdoc-codeblock"># Optional, upgrade if needed
$ pacman -Syu
# Dependencies for build and development environment
# (base-devel: includes gcc, make, which)
$ pacman -S base-devel linux-headers
# (optional) for 32 bits compatibility mode (x86)
# NOTE: Remember to enable multilib (https://wiki.archlinux.org/index.php/Multilib)
$ pacman -S lib32-glibc lib32-libstdc++5
# (optional) for emacs-based IDE
$ pacman -S emacs
# (optional) for line edition from the terminal
$ pacman -S rlwrap
# (optional) for generating documentation in PDF format
$ pacman -S texlive-core texinfo imagemagick
</pre> <p><li>macOS: <ul> <li>Install command line tools for Xcode (from the App store) <li>Install emacs and ImageMagick (and texinfo if needed, but recent versions of macOS include it). A software management tool like homebrew or macports is recommended, e.g. (as root/sudo): <pre class="lpdoc-codeblock">$ brew install emacs-mac imagemagick
</pre> <li>Install TexLive. If using homebrew we recommend installing the MacTeX distribution, available from: <tt>https://www.tug.org/mactex</tt>. <li>Install the following packages: <pre class="lpdoc-codeblock"># (optional) for line edition from the terminal
$ brew install rlwrap
</pre> </ul> <p><li>FreeBSD: <ul> <li>Install GCC or clang and the following packages: <pre class="lpdoc-codeblock">$ pkg install gmake
# (optional) for emacs-based IDE
$ pkg install emacs ImageMagick expat
# NOTE: use emacs-nox and ImageMagick-nox if X11 support is not needed
# (optional) for line edition from the terminal
$ pkg install rlwrap
# (optional) for generating documentation in PDF format
$ pkg install texinfo texlive-full
</pre> </ul> <p><li>NetBSD: <ul> <li>Install GCC or clang and the following packages: <pre class="lpdoc-codeblock">$ pkgin install gmake
# (optional) for emacs-based IDE
$ pkgin install emacs ImageMagick expat
# (optional) for line edition from the terminal
$ pkgin install rlwrap
# (optional) for generating documentation in PDF format
$ pkgin install tex-texinfo texlive-collection-latex
</pre> </ul> <p><li>Windows (using Windows Subsystem or Linux): <ul> <li>Install <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">WSL</a> <li>Install some Linux distribution (e.g., Ubuntu) from the Windows Store. <li>Open a <tt>bash</tt> terminal and install the dependencies for the selected distribution (see points above), e.g., Debian/Ubuntu. </ul> <p><li>Android (using the Termux Linux environment): <ul> <li>Install <a href="https://termux.com/">Termux</a> <li>Install the following packages: <pre class="lpdoc-codeblock">$ pkg install clang make
# (optional) for emacs-based IDE
$ pkg install emacs
# (optional) for line edition from the terminal
$ pkg install rlwrap
</pre> </ul> <p></ul> <p><strong>Additional dependencies:</strong> <p>Some advanced libraries and components require an additional set of software packages:<p><pre class="lpdoc-codeblock"># Debian/Ubuntu:
$ apt-get install g++ libgsl0-dev libgsl0ldbl
$ apt-get install default-jdk ant ant-optional
# Fedora:
$ yum install gsl gsl-devel ant gcc-c++
</pre> <p>To install the Java JDK on Fedora, please visit Sun Java website (<tt>http://java.sun.com/javase/downloads/index.jsp</tt>) and follow the installation instructions there.<p></div></div><div id="Network-based installation"><h2>Network-based installation</h2> <a class="lpdoc-idx-anchor" id="5" href="ciaosearch.html#installation, network"></a> <p>Ciao can be installed from the network using a <tt>curl</tt> pipe from <tt>https://ciao-lang.org/boot</tt> to <tt>sh</tt> in a terminal. This is probably the fastest/easiest way to install Ciao from sources.<p>The network installer is delivered as an HTTPs redirection to <tt>https://raw.githubusercontent.com/ciao-lang/ciao/master/ciao-boot.sh</tt> (which contains the latest version of the <tt>ciao-boot.sh</tt> script). The bootstrap script recognizes that it is being called without sources automatically. Examples:<p><pre class="lpdoc-codeblock"># Interactive installation
curl https://ciao-lang.org/boot -sSfL | sh
# Minimal local installation with prebuilt binaries
curl https://ciao-lang.org/boot -sSfL | sh -s -- --prebuilt-bin local-install
# Full environment
curl https://ciao-lang.org/boot -sSfL | sh -s -- get devenv
# Show network installer help
curl https://ciao-lang.org/boot -sSfL | sh -s -- --help
</pre> <p></div><div id="Quick installation from source"><h2>Quick installation from source</h2> <p>The source code for the latest stable and development versions of Ciao is available from <a href="https://ciao-lang.org">https://ciao-lang.org</a>.<p>Installation of Ciao from source is driven by the <tt>ciao-boot.sh</tt> script (<tt>ciao-boot.bat</tt> in Windows), which bootstraps and invokes the Ciao build system.<p><strong>Note</strong>: It is recommended that you read the full installation instructions. However, in most cases following this summary suffices:<p><ol> <p><li >Type <tt>./ciao-boot.sh configure</tt>. This command will attempt to detect the configuration options for your system automatically and select reasonable defaults.<p>Options can be configured interactively using <tt>./ciao-boot.sh configure --interactive</tt> or passed explicitly as arguments from the command-line (see <tt>./ciao-boot.sh help</tt> for more information). In particular, make sure the location of the <a class="lpdoc-idx-anchor" id="6" href="emacs.html"><tt>emacs</tt></a> executable is set correctly.<p><li >Type <tt>./ciao-boot.sh build</tt>. This will build executables, compile libraries, and generate the documentation.<p><li >Type <tt>./ciao-boot.sh install</tt>. This will install everything in the specified directories. </ol> <p>Alternatively, <tt>ciao-boot.sh</tt> provides shorthands to perform configure, build, and install in a single command:<p><ol> <li >Type <tt>./ciao-boot.sh local-install</tt>. This will do a user-local installation (that will be accessible just for your user).<p><li >Type <tt>./ciao-boot.sh global-install</tt>. This will do a system-wide installation (e.g., as administrator or <tt>root</tt> user). </ol> <p>The system will include appropriate code at the end of your startup scripts. This will make the documentation and executables accessible, make sure the correct mode is set when opening Ciao source files in <a class="lpdoc-idx-anchor" id="7" href="emacs.html"><tt>emacs</tt></a>, etc.<p>If you need more advanced control of the configuration please read the following sections.<p></div><div id="Full installation instructions"><h2>Full installation instructions</h2> <a class="lpdoc-idx-anchor" id="8" href="ciaosearch.html#installation, full instructions"></a> <p> <ol> <p><li ><strong>Select installation options:</strong> From the directory where the sources are stored, run:<p><pre class="lpdoc-codeblock">./ciao-boot.sh configure
</pre> <p>It will perform a default configuration, where the system will be configured to run from the sources directly, and configured in the user's home directory (recommended for Ciao developers or users without admin rights).<p>The option <tt>--instype=global</tt> will prepare Ciao to be installed as the system administrator (<tt>root</tt>) in a standard directory available for all users in the machine (e.g., <tt>/usr/local</tt>).<p>For 32-bit builds in 64-bit architectures use the <tt>--core:m32=yes</tt> configuration flag.<p>In case you want to install elsewhere, or change any of the installation options, you can use a customized configuration procedure (see <tt>./ciao-boot.sh help</tt> for more information). The meaning of some important options is as follows:<p><ul> <p><li><tt>--prefix</tt>: prefix for the default values of installation directories (<tt><prefix>/bin</tt>, <tt><prefix>/lib</tt>, etc).<p><li><tt>--bindir</tt>: directory where the Ciao commands will be installed. For example, if <tt>--bindir</tt> is set to <tt>/usr/local/bin</tt>, then the Ciao <a class="lpdoc-idx-anchor" id="9" href="ciaosearch.html#compiler">compiler</a> (<a class="lpdoc-idx-anchor" id="10" href="ciaosearch.html#ciaoc"><tt>ciaoc</tt></a>) will be stored at <tt>/usr/local/bin/ciaoc</tt>. Actually, it will be a link to <tt>ciaoc-</tt><em>VersionNumber</em>. This applies also to other executables below and is done so that several versions of Ciao can coexist on the same machine. Note that the <em>version installed latest</em> will be the one started by default when typing <tt>ciao</tt>, <tt>ciaoc</tt>, etc. <a class="lpdoc-idx-anchor" id="11" href="ciaosearch.html#binary directory"></a> <p><li>The Ciao installation procedure will create a new subdirectory <tt>ciao/<vers></tt> denoted <tt>INSTALL_CIAOROOT</tt> below <tt>--prefix</tt>. The <tt><vers></tt> directory indicate the Ciao system version. It allows having several Ciao versions installed simultaneously.<p><li><tt>--mandir</tt>: directory where the <a class="lpdoc-idx-anchor" id="12" href="ciaosearch.html#manuals">manuals</a> in <a class="lpdoc-idx-anchor" id="13" href="ciaosearch.html#man"><tt>man</tt></a> format will be installed.<p><li><tt>--infodir</tt>: directory where the <a class="lpdoc-idx-anchor" id="14" href="ciaosearch.html#manuals">manuals</a> in <a class="lpdoc-idx-anchor" id="15" href="ciaosearch.html#info"><tt>info</tt></a> format will be installed.<p></ul> <p><li ><strong>Build Ciao:</strong> At the ciao top level directory type <tt>./ciao-boot.sh build</tt>.<p><li ><strong>Install Ciao:</strong> To install Ciao in the directories selected in the configuration script during step 2 above, type <tt>./ciao-boot.sh install</tt>. This will:<p><ul> <p><li>Install the executables of the Ciao <a class="lpdoc-idx-anchor" id="16" href="ciaosearch.html#program development tools">program development tools</a> (i.e., the general driver/top-level <a class="lpdoc-idx-anchor" id="17" href="ciaosearch.html#ciao"><tt>ciao</tt></a>, the standalone compiler <a class="lpdoc-idx-anchor" id="18" href="ciaosearch.html#ciaoc"><tt>ciaoc</tt></a>, the script interpreter <a class="lpdoc-idx-anchor" id="19" href="ciaosearch.html#ciao-shell"><tt>ciao-shell</tt></a>, miscellaneous utilities, etc.) in the selected binary directory. In order to use these tools, make sure that the <tt>PATH</tt> <a class="lpdoc-idx-anchor" id="20" href="ciaosearch.html#PATH"></a> <a class="lpdoc-idx-anchor" id="21" href="ciaosearch.html#environment variable">environment variable</a> contains such path.<p><li>Install the Ciao libraries under <tt>INSTALL_CIAOROOT</tt> (these will be automatically found).<p><li>Install the Ciao manuals in several formats (such as GNU <tt>info</tt>, <tt>html</tt>, <tt>pdf</tt>, etc.) under <tt>INSTALL_CIAOROOT</tt> and other documentation-specific paths. In order for these manuals to be found when typing <tt>M-x info</tt> within <a class="lpdoc-idx-anchor" id="22" href="emacs.html"><tt>emacs</tt></a>, or by the standalone <a class="lpdoc-idx-anchor" id="23" href="ciaosearch.html#info"><tt>info</tt></a> and <a class="lpdoc-idx-anchor" id="24" href="ciaosearch.html#man"><tt>man</tt></a> commands, the <tt>MANPATH</tt> <a class="lpdoc-idx-anchor" id="25" href="ciaosearch.html#MANPATH"></a> and <tt>INFOPATH</tt> <a class="lpdoc-idx-anchor" id="26" href="ciaosearch.html#INFOPATH"></a> <a class="lpdoc-idx-anchor" id="27" href="ciaosearch.html#environment variables">environment variables</a> of users both need to contain the path specified at <tt>--mandir</tt> and <tt>--infodir</tt>. Documentation in other formats can be accesed with the <tt>ciao doc</tt> command.<p><li>Install under <tt>INSTALL_CIAOROOT</tt> the Ciao interface with GNU <a class="lpdoc-idx-anchor" id="28" href="emacs.html"><tt>emacs</tt></a> (which provides an interactive interface to the Ciao program development tools, as well as some other auxiliary files).<p></ul> <p><li ><strong>Set up user environments:</strong> The installation process will modify the startup files automatically by default. If you disable this option in the configuration or you wish to switch between different installations, it would be necessary to modify the startup files manually.<p>The installation process generates a <a class="lpdoc-idx-anchor" id="29" href="ciaosearch.html#ciao-env"><tt>ciao-env</tt></a> command to update the environments for <a class="lpdoc-idx-anchor" id="30" href="ciaosearch.html#sh"><tt>sh</tt></a>-like and <a class="lpdoc-idx-anchor" id="31" href="ciaosearch.html#csh"><tt>csh</tt></a>like shells. It also generates a <tt>INSTALL_CIAOROOT/ciao-mode-init</tt> (for emacs) with appropriate definitions which will take care of all needed <a class="lpdoc-idx-anchor" id="32" href="ciaosearch.html#environment variable definitions">environment variable definitions</a> and <a class="lpdoc-idx-anchor" id="33" href="ciaosearch.html#emacs mode setup">emacs mode setup</a>.<p> <ul> <p><li>For users a <a class="lpdoc-idx-anchor" id="34" href="ciaosearch.html#csh-compatible shell"><em>csh-compatible shell</em></a> (<a class="lpdoc-idx-anchor" id="35" href="ciaosearch.html#csh"><tt>csh</tt></a>, <a class="lpdoc-idx-anchor" id="36" href="ciaosearch.html#tcsh"><tt>tcsh</tt></a>, ...), add to <a class="lpdoc-idx-anchor" id="37" href="ciaosearch.html#~/.cshrc"><tt>~/.cshrc</tt></a>:<p><pre class="lpdoc-codeblock"> if ( -x <prefix>/bin/ciao-env ) then
eval `<prefix>/bin/ciao-env --csh`
endif
</pre> <p><li>For users of an <a class="lpdoc-idx-anchor" id="38" href="ciaosearch.html#sh-compatible shell"><em>sh-compatible shell</em></a> (<a class="lpdoc-idx-anchor" id="39" href="ciaosearch.html#sh"><tt>sh</tt></a>, <a class="lpdoc-idx-anchor" id="40" href="ciaosearch.html#bash"><tt>bash</tt></a>, ...), the installer will add to <a class="lpdoc-idx-anchor" id="41" href="ciaosearch.html#~/.bashrc"><tt>~/.bashrc</tt></a> the next lines:<p><pre class="lpdoc-codeblock"> if [ -x <prefix>/bin/ciao-env ]; then
eval "$(<prefix>/bin/ciao-env --sh)"
fi
</pre> <p><li>For users of an <a class="lpdoc-idx-anchor" id="42" href="ciaosearch.html#zsh"><tt>zsh</tt></a> shell, the same lines will be added to <a class="lpdoc-idx-anchor" id="43" href="ciaosearch.html#~/.zshrc"><tt>~/.zshrc</tt></a>.<p>This will set up things so that the Ciao executables are found and you can access the Ciao system manuals using the <a class="lpdoc-idx-anchor" id="44" href="ciaosearch.html#info"><tt>info</tt></a> command. Note that, depending on your shell, <em>you may have to log out and back in</em> for the changes to take effect.<p><li>Also, if you use <a class="lpdoc-idx-anchor" id="45" href="emacs.html"><tt>emacs</tt></a> (highly recommended) the install will add the next line to your <a class="lpdoc-idx-anchor" id="46" href="ciaosearch.html#~/.emacs"><tt>~/.emacs</tt></a> file:<p><pre class="lpdoc-codeblock"> (load-file "INSTALL_CIAOROOT/ciao-site-file.el")
(if (file-exists-p "INSTALL_CIAOROOT/ciao-site-file.el")
(load-file "INSTALL_CIAOROOT/ciao-site-file.el")
)
</pre> <p></ul> <p>If you are installing Ciao globally in a multi-user machine, make sure that you instruct all users that to do the same. If you are the system administrator, the previous steps can be done once and for all, and globally for all users by including the lines above in the central startup scripts (e.g., in Linux <a class="lpdoc-idx-anchor" id="47" href="ciaosearch.html#/etc/bashrc"><tt>/etc/bashrc</tt></a>, <a class="lpdoc-idx-anchor" id="48" href="ciaosearch.html#/etc/csh.login"><tt>/etc/csh.login</tt></a>, <a class="lpdoc-idx-anchor" id="49" href="ciaosearch.html#/etc/csh.cshrc"><tt>/etc/csh.cshrc</tt></a>, <a class="lpdoc-idx-anchor" id="50" href="ciaosearch.html#/etc/skel"><tt>/etc/skel</tt></a>, <a class="lpdoc-idx-anchor" id="51" href="ciaosearch.html#/usr/share/emacs/.../lisp/site-init.pl"><tt>/usr/share/emacs/.../lisp/site-init.pl</tt></a>, etc.).<p><li ><strong>Check installation / read documentation:</strong> You may now want to check your installation (see <a href="#Checking for correct installation">Checking for correct installation</a>) and read the documentation. There are special ``getting started'' sections at the beginning of the manual.<p></ol> <p>If you have any problems you may want to check <a href="Troubleshooting.html">Troubleshooting</a>.<p></div><div id="Uninstalling"><h2>Uninstalling</h2> <a class="lpdoc-idx-anchor" id="52" href="ciaosearch.html#uninstalling"></a> <p>The system can be <em>uninstalled</em> by typing <tt>./ciao-boot.sh uninstall</tt> in the top directory. To ensure that this process works, configuration should have not changed since installation, so that the same directories are cleaned.<p></div><div id="Checking for correct installation"><h2>Checking for correct installation</h2> <a class="lpdoc-idx-anchor" id="53" href="ciaosearch.html#installation, checking the"></a> <p>If everything has gone well, several applications and tools should be available to a normal user. Try the following while logged in as a <em>normal user</em> (important in order to check that permissions are set up correctly):<p> <ul> <p><li>Typing <a class="lpdoc-idx-anchor" id="54" href="ciaosearch.html#ciao"><tt>ciao</tt></a> (or <a class="lpdoc-idx-anchor" id="55" href="ciaosearch.html#ciaosh"><tt>ciaosh</tt></a>) should start the typical Prolog-style top-level shell.<p><li>In the top-level shell, Ciao library modules should load correctly. Type for example <tt>use_module(library(dec10_io))</tt> --you should get back a prompt with no errors reported.<p><li>To exit the top level shell, type <tt>halt.</tt> as usual, or <span class="lpdoc-emacskey">^D</span>.<p><li>Typing <a class="lpdoc-idx-anchor" id="56" href="ciaosearch.html#ciaoc"><tt>ciaoc</tt></a> should produce the help message from the Ciao <a class="lpdoc-idx-anchor" id="57" href="ciaosearch.html#standalone compiler">standalone compiler</a>.<p><li>Typing <a class="lpdoc-idx-anchor" id="58" href="ciaosearch.html#ciao-shell"><tt>ciao-shell</tt></a> should produce a message saying that no code was found. This is a Ciao application which can be used to write <a class="lpdoc-idx-anchor" id="59" href="ciaosearch.html#scripts">scripts</a> written in Ciao, i.e., files which do not need any explicit compilation to be run.<p></ul> <p> Also, the following documentation-related actions should work:<p><ul> <p><li>If the <a class="lpdoc-idx-anchor" id="60" href="ciaosearch.html#info"><tt>info</tt></a> program is installed, typing <tt>info</tt> should produce a list of manuals which <em>should include Ciao manual(s) in a separate area</em> (you may need to log out and back in so that your shell variables are reinitialized for this to work).<p><li>Typing <tt>ciao doc alldocs</tt> should open a series of Ciao-related manuals in a <a class="lpdoc-idx-anchor" id="61" href="ciaosearch.html#WWW browser">WWW browser</a>.<p><li>Typing <tt>man ciao</tt> should produce a man page with some very basic general information on Ciao (and pointing to the on-line manuals).<p><li>The documentation directory should contain the manual also in the other formats such as <tt>pdf</tt>.<p></ul> <p> <p>Finally, if <a class="lpdoc-idx-anchor" id="62" href="emacs.html"><tt>emacs</tt></a> is installed, after starting it (typing <tt>emacs</tt>) the following should work:<p> <ul> <p><li>Typing <span class="lpdoc-emacskey">^H</span> <span class="lpdoc-emacskey">i</span> (or in the menus <tt>Help->Manuals->Browse Manuals with Info</tt>) should open a list of manuals in info format in which the Ciao manual(s) should appear.<p><li>When opening a Ciao file, i.e., a file with <tt>.pl</tt> or <tt>.pls</tt> ending, using <span class="lpdoc-emacskey">^X</span><span class="lpdoc-emacskey">^F</span><tt>filename</tt> (or using the menus) the code should appear highlighted according to syntax (e.g., comments in red), and <tt>Ciao/Prolog</tt> menus should appear in the menu bar on top of the <a class="lpdoc-idx-anchor" id="63" href="emacs.html"><tt>emacs</tt></a> window.<p><li>Loading the file using the <tt>Ciao/Prolog</tt> menu (or typing <span class="lpdoc-emacskey">^C</span> <span class="lpdoc-emacskey">l</span>) should start in another emacs buffer the Ciao toplevel shell and load the file. You should now be able to switch the the toplevel shell and make queries from within <a class="lpdoc-idx-anchor" id="64" href="emacs.html"><tt>emacs</tt></a>.<p></ul> <p><strong>Note</strong>: when using <a class="lpdoc-idx-anchor" id="65" href="emacs.html"><tt>emacs</tt></a> it is <em>very convenient</em> to swap the locations of the (normally not very useful) <span class="lpdoc-emacskey">Caps Lock</span> key and the (very useful in <a class="lpdoc-idx-anchor" id="66" href="emacs.html"><tt>emacs</tt></a>) <span class="lpdoc-emacskey">Ctrl</span> key on the keyboard. How to do this is explained in the <a class="lpdoc-idx-anchor" id="67" href="emacs.html"><tt>emacs</tt></a> frequently asked questions FAQs (see the <a class="lpdoc-idx-anchor" id="68" href="emacs.html"><tt>emacs</tt></a> download instructions for their location).<p> <p></div><div id="Cleaning up the source directory"><h2>Cleaning up the source directory</h2> <p>After (global) installation, the source directory can be cleaned up using <tt>./ciao-boot.sh realclean</tt>, leaves the distribution is its original form, throwing away any intermediate files (as well as any unneeded files left behind by the Ciao developers), while still allowing recompilation.<p></div><div id="Environment variables used by Ciao executables"><h2>Environment variables used by Ciao executables</h2> <p>The executables generated by the Ciao compiler (including the ciao development tools themselves) locate automatically where the Ciao engine and libraries have been installed, since those paths are stored as defaults in the engine and compiler at installation time. Thus, there is no need for setting any environment variables in order to <em>run</em> Ciao executables (on a single architecture -- see <a href="#Multiarchitecture installation">Multiarchitecture installation</a> for running on multiple architectures).<p>However, the default paths can be overridden by using the environment variable <tt>CIAOROOT</tt>, which tell the Ciao executables where to look for engines and system libraries.<p></div><div id="Multiarchitecture installation"><h2>Multiarchitecture installation</h2> <a class="lpdoc-idx-anchor" id="69" href="ciaosearch.html#multiarchitecture installation"></a> <p><p>In order to perform a multi-architecture installation, it is possible to repeat successively the build and installation process for several architectures from different machines sharing part of their filesystem.<p>The Ciao build and installation process maintains separate name spaces for platform- and architecture-dependant binaries (like the engine binary, or <tt>.so</tt> or <tt>.dll</tt> gluecode files for the foreign interface). Portable Ciao applications (i.e., except self-contained standalone executables) can run on several machines with different architectures without any need for recompiling, provided the Ciao engine and libraries are correctly installed.<p><p><p></div><br/></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>