forked from TeamSPoon/swipl-devel-unstable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
158 lines (118 loc) · 5.62 KB
/
INSTALL
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
Installing SWI-Prolog
=====================
Last updated: Feb 2, 2014
This installation assumes you are looking at a freshly unpacked source
tarball, downloaded from http://www.swi-prolog.org/Download.html. In
many scenarios it is better to obtain the sources using GIT. The file
README.git explains how to get and update all sources using GIT.
Prerequisites
-------------
SWI-Prolog depends on a lot of other (open source) tools and libraries
that are not bundled and must be installed seperately. We maintain a OS
specific hints at this address:
http://www.swi-prolog.org/build/
Please consult the above link first. Below is a an extensive list of
dependencies if your OS is not covered by the instructions at the link
above. Please consider adding or updating the descriptions at
http://www.swi-prolog.org/build/.
- Tools:
* gcc (with some effort, other C compilers may work as well)
* GNU-make
* autoconf (when building from GIT, see README.git)
* LaTeX (optional for documentation, see README.doc)
* perl (optional for documentation, see README.doc)
- Libraries (core system):
* gmp (http://gmplib.org/)
Provides unbounded integers and rational numbers. Although
the system compiles without it we strongly encourage you do
use GMP. Libraries and other software written for SWI-Prolog
may fail to work properly without GMP.
* GNU readline library
Optional, provides commandline editing and completion. You
really want this!
* libunwind (http://www.nongnu.org/libunwind)
Not available on all platforms. If it is supported, it enhances
crash reports generated by the system.
- Libraries (packages):
* unixODBC (http://www.unixodbc.org/)
Optional for building package odbc, providing database access.
* OpenSSL (www.openssl.org/)
Optional for building package ssl (Secure Socket layer)
* zlib
Optional for building package zlib (compressed streams)
* OSSP UUID library (http://www.ossp.org/pkg/lib/uuid/)
Needed for library(uuid). Used by various packages.
* SUN Java SDK or OpenSDK
Optional for building JPL (Java interface). Note that auto-detection
of JPL prerequisites often fails. See DISABLE_PKGS in build.templ
* libXt, X11 core libraries, libjpeg and libxpm
Required libraries for XPCE, the SWI-Prolog graphics layer that
provides the built-in editor, graphical debugger and many other
developers tools.
* libXft, libfontconfig and pkg-config
Provide proper Unicode font support for XPCE. Without, XPCE may work
or not, depending on locale and installed fonts.
Building SWI-Prolog with the build.templ script
-----------------------------------------------
The bash-script build.templ contains the default build procedure and
some comments and skeleton environment changes marked with [EDIT].
Especially for those who want to update SWI-Prolog regulary, it is
recommended to copy this file to 'build' and edit it to suit your needs.
The file also gives some hints dealing with non-default locations of
libraries, non-standard compiler settings, etc. The normal procedure is:
% cp build.templ build
% <edit> build
% ./build
A complete log of the build process is saved to the files
`configure.out`, `make.out` and `make-install.out`. A quick verification
that all went right is to run this command:
% grep -i error: *.out
If you edited build, consider preserving it because you can normally use
it with the next release.
If the build script fails
-------------------------
If using the build script fails and this is not easily resolved by
installing all dependencies, considering following the step-by-step
instructions below to get everything in place. The main advantage is
that the process proceeds in small steps, so you can much quicker
re-iterate parts of the building process.
Building SWI-Prolog lite
------------------------
In normal cases, the following should do:
% cd src
% ./configure
% gmake
% gmake check
% gmake install
By default, the system is installed as /usr/local/bin/swipl, with the
libraries in /usr/local/lib/swipl-<version>. Use the `--prefix=` option
of `configure` to overrule this.
% ./configure --prefix=PREFIX
Building the SWI-Prolog packages
--------------------------------
After building and installing the core system, you can build the
extension packs:
% cd packages
% ./configure
% gmake
% gmake install
The packages can also be configured and build individually from the
package itself. Individual packages are installed with the ./configure
&& make && make install sequence in the package directory.
Put the Prolog kernel in a shared object
========================================
On most modern platforms, the SWI-Prolog kernel is compiled as a shared
object (DLL) called libswipl.so (the extensions depends on OS). Explicit
enabling or disabling of using a shared object is accomplished with one
of the commands below for configure in the `src` directory. When using
`build`, see the variable EXTRACFG.
% ./configure --enable-shared
% ./configure --disable-shared
Using a shared object has advantages and disadvantages:
- `stand-alone' executables need the shared object
- less performance for some processors (notably IA32, Intel/AMD 32-bits)
+ On many platforms, shared objects are required to enable linking
foreign libraries. One of the few exceptions is 32-bit PC/Linux,
where this is not needed.
+ Easier linking, especially for embedded systems
Using a shared object is default, except for 32-bit PC/Linux.