1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
Installing SWI-Prolog
=====================
Jan Wielemaker
(jan@swi.psy.uva.nl)
Configuration, compilation and installation is based on the GNU autoconf
package.
In normal cases, the following should do:
% cd src
% ./configure
% make
% make install
By default, the system is installed as /usr/local/bin/pl, with the
libraries in /usr/local/lib/pl-<version>.
% ./configure --prefix=PREFIX
Building for multiple architectures
===================================
To build for a second architecture, you should either clean the sources
using `make distclean' or make a new directory next to the source
directory and run configure in this directory. The latter procedure
requires GNU-MAKE. For example:
% mkdir rs6000
% cd rs6000
% ../src/configure
% make
% make install
Building a runtime version
==========================
The runtime version has no tracer, doesn't handle interrupts (just
exits), has no profiler and no readline included. To build it using a
separate directory:
% mkdir rt
% cd rt
% ../src/configure --enable-runtime
% make
% make install
Some things may need attention:
===============================
# GNU readline library
When present, SWI-Prolog will automatically include the GNU readline
library. It is *strongly* adviced to install this library on your
system. It provides editing of previously entered commands (history) as
well as completion on Prolog atoms and filenames (for consult, etc.)
much like the bash and tcsh shells do.
SWI-Prolog has been linked with versions 1.1, 1.2 and 2.0 of the
readline library.
# Memory mapped stacks. Segmentation faults during the installation.
Configure will see if mmap() may be used to allocate the stacks. If you
think this should be possible, but Configure says `no', please work on
test/mmap.c
At the end of the compilation, the Prolog files from the boot/
subdirectory are compiled using ./pl. On some systems this installation
aborts with a segmentation fault (signal 11 on most machines). If you
are knowledgeable with low-level memory management using mmap(), you
might want to look as test/mmap.c and pl-setup.c, where exception-based
handling of the stacks is defined. Otherwise, remove all .o files, redo
the configuration using --disable-segv-handling and recompile. If that
still doesn't solve the problem, use --disable-mapped-stacks. If that
doesn't fix the problem you found something new. Please report to
prolog-bugs@swi.psy.uva.nl.
Sofar, automatic configuration is known to generate a working version
using mmap() based stacks on SunOS 4.1.x, Solaris 2.x, Linux (anything
not truly antique) and SCO OpenServer.
# Assembler warnings
If you get assembler warnings compiling pl-wam.c, try #define NO_ASM_NOP
1 in config.h. Should be determined automatically by test/nop.c, but
sometimes appears to fail.
Platform specific notes
=======================
SCO OpenServer
--------------
According to Tamas Laufer, best results are obtained if you install
gcc-2.8.1 (latest version at time of writing) from the original source
at prep.ai.mit.edu/pub/gnu or one of its mirrors. Using GNU-make.
installation is reported to work flawlessly.
Compilation using SCO `cc' is possible too, though requires special
attention to get alloca() and dlopen() working. The result is about 20%
slower then the gcc-compiled executable.
|