Author(s): Manuel Carro, Daniel Cabeza, Manuel Hermenegildo.
Version: 1.3#120 (1999/11/26, 12:5:17 MET)
Version of last change: 1.3#117 (1999/11/25, 1:44:7 MET)
This describes the installation procedure for the Ciao Prolog system, including libraries and manuals. Please read section Un*x installation summary and section Un*x full installation instructions for the installation procedures from sources on Un*x (Linux, SunOS, Solaris, etc.) machines. Windows NT/95/98 users are referred to section Installation and compilation under Windows and section Windows installation from the precompiled distribution.
If you find any problems during installation, please refer to section Troubleshooting (nasty messages and nifty workarounds). See also section Downloading new versions and section Reporting bugs.
Note: it is recommended that you read the full installation instructions (specially if the installation will be shared by different architectures). However, in many cases it suffices to follow this summary:
gunzip
and tar -xpf
) the distribution. This will put everyting in a new directory whose name reflects the Ciao version.
SRC
). Edit
SETTINGS
and check/set the variables SRC
, BINROOT
(where the executables will go), LIBROOT
(where the libraries will go), and DOCROOT
(where the documentation will go, preferably a directory accessible via
WWW).
gmake install
. This will build executables, compile libraries, and install everything in a directory LIBROOT/ciao
and in BINROOT
.
Note that gmake
refers to the
GNU implementation of the
make Un*x command, which is available in many systems (including all Linux systems) simply as
make
. I.e., you can try simply typing make install
if gmake install
does not work. If typing make
stops right away with error messages it is probably an older version and you need to install gmake
.
emacs
, etc. (<LIBROOT> must be replaced by the appropriate value):
csh
,
tcsh
, ...), add to
~/.cshrc
:
if ( -e <LIBROOT>/ciao/DOTcshrc ) then source <LIBROOT>/ciao/DOTcshrc endif
sh
,
bash
, ...), add to
~/.profile
:
if [ -f <LIBROOT>/ciao/DOTprofile ]; then . <LIBROOT>/ciao/DOTprofile fiThis will set up things so that the Ciao executables are found and you can access the Ciao system manuals using the
info
command.
emacs
(highly recommended) add this line to your
~/.emacs
file:
(load-file "<LIBROOT>/ciao/DOTemacs")
/etc/cshrc
/
/etc/csh.cshrc
,
/etc/bashrc
,
/usr/share/emacs/.../lisp/site-init.pl
, etc.).
DOCROOT
(copied from SRC/doc/reference
) and can be easily accessed as explained in that same section.
gmake uninstall
.
gunzip
and tar -xpf
)
the distribution in a suitable directory. This will create a new directory called ciao-X.Y
, where X.Y
is the version number of the distribution. The -p
option in the
tar
command ensures that the relative dates of the files in the package are preserved, which is needed for correct operation of the Makefiles.
SETTINGS
and set the following variables:
SRC
: directory where the sources are stored.
BINROOT
: directory where the Ciao executables will go. For example, if BINROOT=/usr/local/bin
, then the Ciao
compiler (
ciaoc
) will be stored at /usr/local/bin/ciaoc
(actually, it will be a link to ciaoc-
VersionNumber --this applies also to other executables below and is done so that several versions can coexist).
LIBROOT
: directory where the
run-time libraries will be installed.
The Ciao installation procedure will create a new subdirectory ciao
below LIBROOT
and a subdirectory below this one for each Ciao version installed. For example, if LIBROOT=/usr/local/lib
and you have Ciao version x.y
, then the libraries will be installed under /usr/local/lib/ciao/ciao-x.y
. This allows you to install
site-specific programs under /usr/local/lib/ciao
and they will not be overwritten if a new version of Ciao is installed. It also allows having several Ciao versions installed simultaneously (the last one installed will be used by default when typing ciao
).
DOCROOT
: directory where the
manuals will be installed. It is often convenient of this directory is accessible via
WWW (DOCROOT=/home/httpd/html/ciao
, or something like that).
SRC
directory during installation, since compilations for different architectures take place in dedicated subdirectories. Also, different machines/architectures can share the same LIBROOT
directory. This saves space since the architecture independent libraries will be shared. See section Multiarchitecture support below.
gmake all
.
Important: use
GNU make (
gmake
), not the standard
UNIX make, as the latter does not support some features used during the compilation. It does not matter if the name of the executable is
make
or
gmake
: only make sure that it is GNU make.
This will:
$(SRC)/bin/$(CIAOARCH)
, where $(CIAOARCH)
depends on the architecture. The engine is the actual interpreter of the low level code into which Ciao Prolog programs are compiled.
ciaoc
), with the default paths set for your local configuration (nonetheless, these can be overridden by environment variables, as described below).
$(SRC)/lib
and $(SRC)/library
using this compiler.
$(SRC)/shell
directory.
etc
directory, and documented in the part of the manual on 'Miscellaneous Standalone Utilities').
.po
) and/or
executables which are portable among machines of different architecture, provided there is an executable engine accessible in every such machine. See more details below under section Multiarchitecture support.
gmake test
, which will compile and execute a small program containing several tests.
SETTINGS
during step 2 above, type gmake justinstall
. This will:
ciao
, the standalone compiler
ciaoc
, the script interpreter
ciao-shell
, miscellaneous utilities, etc.) in BINROOT
(see below). In order to use these tools, the PATH
environment variable of users needs to contain the path BINROOT
.
LIBROOT/ciao
(these will be automatically found).
DOCROOT
the Ciao manuals in several formats (such as GNU info
, html
, postscript
, etc.), depending on the distribution. In order for these manuals to be found when typing M-x info
within
emacs
, or by the standalone
info
and
man
commands, the MANPATH
and INFOPATH
environment variables of users both need to contain the path DOCROOT
.
LIBROOT/ciao
the Ciao GNU
emacs
interface (
ciao.el
, which provides an interactive interface to the Ciao program development tools, as well as some other auxiliary files) and a file
DOTemacs
containing the
emacs
initialization commands which are needed in order to use the Ciao
emacs
interface.
LIBROOT/ciao/DOTcshrc
(for
csh
-like shells), LIBROOT/ciao/DOTprofile
(for
sh
-like shells), and LIBROOT/ciao/DOTemacs
(for emacs) with appropriate definitions which will take care of all needed
environment variable definitions and
emacs mode setup. Thus, if you are installing in a multi-user machine, make sure that you instruct all users to make the following modifications in their startup scripts or that you follow these instructions yourself if you are installing Ciao only for your personal use (<LIBROOT> must be replaced by the appropriate value):
csh
,
tcsh
, ...), add to
~/.cshrc
:
if ( -e <LIBROOT>/ciao/DOTcshrc ) then source <LIBROOT>/ciao/DOTcshrc endif
sh
,
bash
, ...), add to
~/.profile
:
if [ -f <LIBROOT>/ciao/DOTprofile ]; then . <LIBROOT>/ciao/DOTprofile fiThis will set up things so that the Ciao executables are found and you can access the Ciao system manuals using the
info
command.
emacs
(highly recommended) add this line to your
~/.emacs
file:
(load-file "<LIBROOT>/ciao/DOTemacs")
/etc/cshrc
/
/etc/csh.cshrc
,
/etc/bashrc
,
/usr/share/emacs/.../lisp/site-init.pl
, etc.).
emacs
editor is not available in your system, its installation is highly recommended (if you are installing in a multi-user machine, you may want to do it in a general area so that it is available for other users, even if you do not use it yourself).
The emacs editor (in all its versions: Un*x, Windows, etc.) can be donloaded from, for example, http://www.emacs.org/, and also from the many GNU mirror sites worldwide (See http://www.gnu.org/ for a list), in the gnu/emacs
and gnu/windows/emacs
directories. For example, at UPM it can be found at ftp://ftp.fi.upm.es/pub/mirrors/gnu/emacs and ftp://ftp.fi.upm.es/pub/mirrors/gnu/windows/emacs. You can find answers to frequently asked question about
emacs
in general at http://www.gnu.org/software/emacs/emacs-faq.text and about the Windows version at http://www.gnu.org/software/emacs/windows/ntemacs.html.
DOCROOT
(copied from SRC/doc/reference
) and can be easily accessed as explained that same section.
Other useful make
targets are listed at the beginning of $(SRC)/Makefile
.
If you have any problems you may want to check section Troubleshooting (nasty messages and nifty workarounds).
The system can be uninstalled by typing gmake uninstall
in the top directory (the variables in
SETTINGS
should have the same value as when the install was performed, so that the same directories are cleaned).
There are two possibilities in order to install Ciao Prolog on Windows NT/95/98 machines:
The two procedures are described in the following sections.
This describes the installation of Ciao after downloading the Windows precompiled distribution. This is the simplest Windows installation, since it requires no compilation and is highly recommended.
Please follow these steps (below we use the terms folder and directory interchangeably):
C:\Program Files
(this will create there a folder whose name reflects the Ciao version). Due to limitations of Windows related to file associations, do not put Ciao too deep in the folder hierarchy. For unpacking you will need a recent version of a zip archive manager -- there are many freely available such as
WinZip
,
unzip
,
pkunzip
, etc.). If you have a previous version of Ciao installed, make sure you do not have any Ciao applications (including, e.g., a toplevel shell) running, or the extraction process may not be able to complete. You may want to delete the entire folder of the previous installation to save space.
install
(.bat
) script. This will update the windows registry (the file ciao.reg
lists the additions) and also create some .bat
files for running Ciao executables from the command line. It also creates initialization scripts for the
emacs
editor. After that, you may need to reboot for the changes in the registry to take effect.
ciaosh.cpx
, the standard interactive toplevel shell. It is located inside the shell
folder (e.g., click on the file
ciaosh.cpx
with the right mouse button and select the appropriate option, Send to->Desktop as shortcut
).
ciao.html
located inside doc\reference\ciao_html
so that you can open the Ciao manual by simply double-clicking on this shortcut.
The actions and registry changes performed by the installation procedure, in addition to setting icons for ciao-related file types, make several other things possible:
ciao.html
should show the Ciao manual in your default WWW browser. Make sure you configure your browser to use
style sheets for correct formatting of the manual (note, however, some older versions of
Explorer did not support style sheets well and will give better results turning them off). The doc\reference
folder contains the manual also in the other formats present in the distribution, such as info
(very convenient for users of the
emacs
editor/program development system) and postscript
or pdf
, which are specially useful for printing, using an application such as
ghostview
(freely available from http://www.cs.wisc.edu/~ghost/index.html) or
acrobat reader
(http://www.adobe.com) respectively.
.cpx
) by double-clicking on it. For example, you can try starting this way
ciaosh.cpx
, from inside the shell folder or from the shortcut created above.
use_module(file).
, use_module(library(file)).
for library modules, ensure_loaded(file).
for files which are not modules, and use_package(file).
for library packages).
For example, you may want to type use_package(iso)
to ensure Ciao has loaded all the iso builtins (whether this is done by default or not depends on your
.ciaorc
file). Do not worry about any 'module already in executable' messages --these are normal and simply mean that a certain module is already pre-loaded in the toplevel shell. At this point, typing write(hello).
should work.
tests
directory, first do:
?- use_module(library(system)).(loading the
system
library makes a number of system-related predicates such as
cd/1
accessible) and then:
?- cd('$/tests').(in Ciao the sequence
$/
at the beginning of a path name is replaced by the path of the Ciao root directory).
make_exec/2
) or using the standalone compiler (
ciaoc.cpx
, located in the ciaoc
folder). To be able to make an executable, the file should define the predicate
main/1
(or
main/0
), which will be called upon startup (see the corresponding manual section for details).
For example, within the
tests
directory, you can type:
?- make_exec(hw,_).which should produce an executable. Double-clicking on this executable should execute it.
.ciaorc
and placed in your home folder (e.g., the same in which you put your
.emacs
file). You need to set the environment variable HOME
to the path of this folder for the Ciao toplevel shell to be able to locate this file on startup.
halt.
as usual, or ^Z.
.pl
files and choosing "make executable". This also uses the standalone compiler.
.pls
, "ciao prolog scripts", will also execute them. These are files containing Prolog source but which get executed without having to explicitly compile them (in the same way as, e.g., .bat
files). As an example, you can double click on the file
hw.pls
in the
tests
folder and look at the source with an editor. You can try changing the Hello world
message and double-clicking again.
As you can see, the file should define the predicate
main/1
, which will be called upon startup. The two header lines are only necessary in Un*x. You can leave them in in Windows (so that the script will work also in Un*x without any change) or you can take them out. These two lines can be added automatically in
emacs
from the Ciao/Prolog menu or by typing ^C I S.
The installation script also creates a .bat
skeleton file (bat_skel
in folder Win32) which allows running Ciao executables from the command line. If you want to run a Ciao executable file.cpx
from the command line, you normally copy the skeleton file to the folder were the executable is and rename it to file.bat, then change its contents as explained in a comment inside. Note that this .bat
file is usually not necessary in NT, as its command shell understands file extension associations, i.e., in windows NT it is possible to run the file.cpx
executable directly. Due to limitations of .bat
files in Windows 95/98, in those OSs no more than 9 command line arguments can be passed to the executable (in NT there is no such restriction).
The installation script creates also ciaosh.bat
and ciaoc.bat
files (in the
shell
and
ciaoc
folders respectively). These allow calling the interactive top-level and the standalone compiler from the command line in Windows95/98.
While it is easy to use Ciao with any editor of your choice, using it within the
emacs
editor/program development system is highly recommended: Ciao includes an
emacs
mode which greatly simplifies many program development tasks (see section Using Ciao inside GNU emacs for details on the capabilities of
ciao
/
emacs
combination.
The emacs editor (in all its versions: Un*x, Windows, etc.) can be donloaded from, for example, http://www.emacs.org/, and also from the many GNU mirror sites worldwide (See http://www.gnu.org/ for a list), in the gnu/emacs
and gnu/windows/emacs
directories. For example, at UPM it can be found at ftp://ftp.fi.upm.es/pub/mirrors/gnu/emacs and ftp://ftp.fi.upm.es/pub/mirrors/gnu/windows/emacs. You can find answers to frequently asked question about
emacs
in general at http://www.gnu.org/software/emacs/emacs-faq.text and about the Windows version at http://www.gnu.org/software/emacs/windows/ntemacs.html.
In order to allow
emacs
to load the Ciao mode automatically when editing and to access the documentation, open using
emacs
(^X^F)) the file
~/.emacs
(or, perhaps,
c:/.emacs
) and add the following line to it:
(load-file "<CIAODIR>/DOTemacs.el")
where you should put in place of <CIAODIR>
the directory where you installed the Ciao distribution. After doing this (and exiting and restarting
emacs
) the following things should work:
.pl
or .pls
ending) the code should appear highlighted according to syntax (e.g., comments in red), and a Ciao/Prolog
menu should appear in the menu bar on top of the
emacs
window.
Ciao/Prolog
menu (or typing ^H i) should open a list of manuals in info format in which the Ciao manual(s) should appear.
Ciao/Prolog
menu (or typing ^C l) 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
emacs
.
Ciao/Prolog
menu. See section Using Ciao inside GNU emacs for the many other functionalities of this environment.
The
etc
folder contains a number of utilities, documented in the manual in PART V - Miscellaneous Standalone Utilities. In the Win32 distribution these utilities are not compiled by the installation process. You can create the executable for each of them when needed by compiling the corresponding .pl
file.
If you would like to install Ciao on a server machine, used by several clients, the following steps are recommended:
client.bat
script. This should update the registry of each client.
To uninstall Ciao under Windows, simply delete the directory in which you put the Ciao distribution. If you also want to delete the registry entries created by the Ciao installation (not strictly needed) this must currently be done by hand. The installation leaves a list of these entries in the file
ciao.reg
to aid in this task. Also, all the register entries contain the word ciao. Thus, to delete all Ciao entries, run the application
regedit
(for example, by selecting Run
from the Windows Start
menu), search (^F) for ciao in all registry entries (i.e., select all of Keys
, Values
, and Data
in the Edit->Find
dialog), and delete each matching key (click on the left window to find the matching key for each entry found).
In order to compile Ciao Prolog for Win32 environments you need to have the (public domain) Cygnus Win32 and development libraries installed in your system. Compilation should be performed preferably under Windows NT.
rm.exe
, sh.exe
, and uname.exe
from the Cygnus distribution be copied under /bin
prior to starting the process (if these executables are not available under /bin
the compilation process will produce a number of errors and eventually stop prematurely).
make allwin32
. This will compile both the engine and the Prolog libraries. In this process, system libraries that are normally linked dynamically under Un*x (i.e., those for which .so
dynamically loadable files are generated) are linked statically into the engine (this is done instead of generating .dll
s because of a limitation in the current version of the Cygnus Win32 environment). No actual installation is made at this point, i.e., this process leaves things in a similar state as if you had just downloaded and uncompressed the precompiled distribution. Thus, in order to complete the installation you should now:
A further note regarding the executables generated by the Ciao compiler and top-level: the same considerations given in section Windows installation from the precompiled distribution apply regarding .bat
files, etc. However, in a system in which Cygnus Win32 is installed these executables can also be used in a very simple way. In fact, the executables can be run as in Un*x by simply typing their name at the
bash
shell command line without any associated .bat
files. This only requires that the
bash
shell which comes with Cygnus Win32 be installed and accessible: simply, make sure that
/bin/sh.exe
exists.
If everything has gone well, several applications and tools should be available to a normal user. The most important ones are the following:
ciao
(or
ciaosh
) in Un*x or double-clicking on the ciaosh.cpx
icon or its direct access in Windows) should start the typical Prolog top level (the sources are located in $(SRC)/shell
). Typing, e.g., use_module(library(dec10_io)).
at the top level prompt should show a message correctly loading this library from the library directories. Note that some predicates that are built-ins in other Prolog are available through libraries in Ciao. This facilitates making small executables.
ciaoc
in Un*x (or double-clicking on the
ciaoc.cpx
icon in Windows) should produce the help message from the Ciao
standalone compiler (note that programs can also be compiled from the shell). In its simplest use, given a top-level foo.pl
file for an application (the file must define the a predicate
main/0
or
main/1
) it compiles an executable foo
, automatically detecting which other files need recompilation.
ciao-shell
should produce a message saying that no code was found. This is a Ciao application which can be used to write
scripts written in Prolog, i.e., files which do not need any explicit compilation to be run. In Windows these scripts execute by simply double-clicking on them.
Also, the following documentation-related actions should work:
info
program is installed, starting info
should produce a list of manuals which should include Ciao manual(s) in a separate section (you may need to log out and back in so that your shell variables are reinitialized).
emacs
is installed, typing M-x info
should have the same result as above (you may also need to log out and back in for this).
netscape
) the directory name or URL
corresponding to DOCROOT
should show a series of Ciao-related manuals.
man ciao
should produce a man page with general information on Ciao.
After installation, the source directory can be cleaned up in several ways:
gmake uninstall
removes the installation but does not touch the source directories.
gmake totalclean
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.
Other useful make
targets are listed at the beginning of $(SRC)/Makefile
.
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 run Ciao executables (on a single architecture -- see section Multiarchitecture support for running on multiple architectures).
However, the default paths can be overridden by using the environment variables CIAOENGINE
and CIAOLIB
. The first one will tell the Ciao executables where to look for an engine, and the second will tell them where to look for the libraries. Thus, it is possible to actually use the Ciao system without installing it by setting these variables to the following values:
CIAOENGINE
: $(SRC)/bin/$(CIAOARCH)/ciaoengine
CIAOLIB
: $(SRC)
where $(CIAOARCH)
is the string echoed by the command SRC/etc/ciao_get_arch
(or BINROOT/ciao_get_arch
, after installation).
This allows using alternate engines or libraries, which can be very useful for system development and experimentation.
As mentioned before, Ciao applications (including the compiler and the top level) can run on several machines with different architectures without any need for recompiling, provided there is one Ciao engine (compiled for the corresponding architecture) accessible in each machine. Also, the Ciao libraries (installed in LIBROOT
, which contain also the engines) and the actual binaries (installed in BINROOT
) can themselves be shared on several machines with different architectures, saving disk space.
For example, assume that the compiler is installed as:
/usr/local/share/bin/ciaoc
and the libraries are installed under
/usr/local/share/lib
Assume also that the /usr/local/share
directory is mounted on, say, a number of
Linux and a number of
Solaris boxes. In order for ciaoc
to run correctly on both machines, the following is needed:
gmake install
on one machine of each architecture (once for Linux and once for Solaris in our example). This recompiles and installs a new engine and any architecture-dependent parts of the libraries for each architecture. The engines will have names such as ciaoengine.LINUXi86
, ciaoengine.SolarisSparc
, and so on.
<LIBROOT>/ciao/DOTcshrc
etc. The selection of the engine (and architecture-dependent parts of libraries) is done in these scripts by setting the environment variable CIAOARCH
, using the ciao_get_arch
command, which is installed automatically when installing Ciao. This will set CIAOARCH
to, say, LINUXi86
, SolarisSparc
, respectively, and CIAOENGINE
will be set to ciaoengine.
CIAOARCH.
However, note that this is not strictly necessary if running on only one architecture: if CIAOARCH
is not set (i.e., undefined), the Ciao executables will look simply for ciaoengine
, which is always a link to the latest engine installed in the libraries. But including the initialization files provided has the advantage of setting also paths for the manuals, etc.
Ciao makes use of advanced characteristics of modern architectures and operating systems such as multithreading, shared memory, sockets, locks, dynamic load libraries, etc., some of which which are sometimes not present in a given system and others may be implemented in very different ways across the different systems. As a result, currently not all Ciao features are available in all supported operating systems. Sometimes this is because not all the required features are present in all the OS flavors supported and sometimes because we simply have not had the time to port them yet.
The current state of matters is as follows:
The features that do not work are disabled at compile time. If problems appear, please disable them explicitly in the
SETTINGS
file. We will make this more automatic sometime in the future.
Ciao and its related libraries and utilities are under constant improvement, so you should make sure that you have the latest versions of the different components, which can be dowloaded from:
http://clip.dia.fi.upm.es/Software
We recommend that you join the
Ciao
users mailing list (ciao-users@clip.dia.fi.upm.es
), in order to receive information on new versions and solutions to problems. Simply send a message to ciao-users-request@clip.dia.fi.upm.es, containing in the body only the word:
subscribe
alone in one line. Messages in the list are strictly limited to issues directly related to Ciao Prolog and your email address will of course be kept strictly confidential. You mail also want to subscribe to the comp.lang.prolog
newsgroup.
There is additional info available on the Ciao system, other CLIP group software, publications on the technology underlying these systems, etc. in the CLIP group's WWW site http://clip.dia.fi.upm.es.
If you still have problems after downloading the latest version and reading the installation instructions you can send a message to ciao-bug@clip.dia.fi.upm.es. Please be as informative as possible in your messages, so that we can reproduce the bug.
If you would like to port Ciao to a currently unsupported platform, there are several issues to take into account. The main one is to get the engine to compile in that platform, i.e., the C code under the engine
directory. To this end, look under the directory $(SRC)/makefile-sysdep
: there is a
mkf-CIAOARCH
file for every architecture/OS under which Ciao is known to compile. You can start from the closest one and customize it for your local distribution or installed tools. But please keep the original files! Once a working engine is achieved, it should be possible to continue with the standard installation procedure, which will try to use a completely static version of the standalone compiler (ciaoc.sta
in the ciaoc
directory) to compile the interactive top-level (
ciaosh
) and a new version of the standalone compiler (
ciaoc
). These in turn should be able to compile the Prolog libraries. You may also need to look at some libraries (such as, for example,
sockets
) which contain C code. Porting to other Un*x flavours should be easy while other operating system families may require more work. If you do succeed in porting to a platform that is currently please send the
mkf-CIAOARCH
and any patches to ciao@clip.dia.fi.upm.es, and we will include it (with due credit, of course) in the next distribution.
The following a list of common installation problems reported by users:
tasks.c:102:PTHREAD_CANCEL_ASYNCHRONOUS undeclared (first use of this function)
.
Possible reason and solution:
Your (Linux?) system does not have (yet) the
Posix threads library installed. You can upgrade to one which does have it, or download the library from
http://pauillac.inria.fr/~xleroy/linuxthreads/index.html
and install it, or disable the use of threads in Linux: for this, edit the
SETTINGS
file and specify USE_THREADS=no
, which will avoid linking against thread libraries (it will disable the use of thread-related primitives as well). Clean the engine with make engclean
and restart compilation.
If you have any alternative threads library available, you can tinker with engine/threads.h
and the files under makefile-sysdep
in order to get the task managing macros right for your system. Be sure to link the right library. If you succeed, we (ciao@clip.dia.fi.upm.es) will be happy of knowing about what you have done.
-lpthread: library not found
(or similar)
Possible reason and solution:
Your (Linux?) system seems to have Posix threads installed, but there is no threads library in the system. In newer releases (e.g.,
RedHat 5.0), the Posix threads system calls have been included in glibc.so
, so specifying -lpthread
in makefile-sysdep/mkf-LINUX
is not needed; remove it. make engclean
and restart installation.
Alternatively, you may have made a custom installation of Posix threads in a non-standard location: be sure to include the flag -L/this/is/where/the/posix/libraries/are
before -lpthread
, and to update /etc/ld.so.conf
(see man ldconfig
).
Segmentation Violation
(when starting the first executable)
Possible reason and solution:
This has been observed with certain older versions of
gcc
which generated erroneous code under full optimization. The best solution is to upgrade to a newer version of
gcc
. Alternatively, lowering the level of optimization (by editing the
SETTINGS
file in the main directory of the distribution) normally solves the problem, at the cost of reduced execution speed.
ciaoc: /home/clip/lib/ciao/ciao-X.Y/engine/ciaoengine: not found
Possible reason and solution:
CIAOENGINE
was not set.
CIAOENGINE
is set, but it is does not point to a valid ciaoengine.
LIBROOT/ciao/DOTcshrc
for user settings for environment variables.
ERROR: File library(compiler) not found - aborting...
(or any other library is not found)
Possible reason and solution:
CIAOLIB
was not set.
CIAOLIB
is wrong.
LIBROOT/ciao/DOTcshrc
for user settings for environment variables.
ERROR: File <some_directory>/<some_file>.itf not found - aborting...
Possible reason and solution:
Can appear when compiling .pl
files. The file to compile (<some_file>.pl) is not in the directory <some_directory>. You gave a wrong file name or you are in the wrong directory.
*ERROR*: /(write_option,1) is not a regular type
(and similar ones)
Possible reason and solution:
This is not a problem, but rather the type checker catching some minor inconsistencies which may appear while compiling the libraries. Bug us to remove it, but ignore it for now.
WARNING: Predicate <some_predicate>/<N> undefined in module <some_module>
Possible reason and solution:
It can appear when the compiler is compiling Ciao library modules. If so, ignore it (we will fix it). If it appears when compiling user programs or modules, you may want to check your program for those undefined predicates.
gmake[1]: execve: /home/clip/mcarro/ciao-0.7p2/etc/collect_modules: No such file or directory
Possible reason and solution:
Check if collect_modules is in $(SRC)/etc and is executable. If it is not here, your distribution is incorrect: please let us know.
make: Fatal error in reader: COMMON, line 12: Unexpected end of line seen
Possible reason and solution:
You are using standard Un*x make, not GNU's make implementation (gmake).
Go to the first, previous, next, last section, table of contents.