Commit | Line | Data |
---|---|---|
04873705 | 1 | !!! This is not a Guile release; it is a source tree retrieved via |
4b824aae | 2 | Git or as a nightly snapshot at some random time after the |
4800a61a | 3 | Guile 1.8 release. If this were a Guile release, you would not see |
04873705 | 4 | this message. !!! [fixme: zonk on release] |
c299f186 | 5 | |
0f24e75b | 6 | This is a 1.9 development version of Guile, Project GNU's extension |
f2a75d81 RB |
7 | language library. Guile is an interpreter for Scheme, packaged as a |
8 | library that you can link into your applications to give them their | |
9 | own scripting language. Guile will eventually support other languages | |
10 | as well, giving users of Guile-based applications a choice of | |
11 | languages. | |
12 | ||
0f24e75b | 13 | Guile versions with an odd middle number, i.e. 1.9.* are unstable |
f2a75d81 RB |
14 | development versions. Even middle numbers indicate stable versions. |
15 | This has been the case since the 1.3.* series. | |
16 | ||
a89cafc0 | 17 | The next stable release will likely be version 2.0.0. |
7fcc90c4 | 18 | |
1e457544 | 19 | Please send bug reports to bug-guile@gnu.org. |
86f40248 | 20 | |
d165aa15 RB |
21 | See the LICENSE file for the specific terms that apply to Guile. |
22 | ||
23 | ||
24 | Additional INSTALL instructions =========================================== | |
25 | ||
26 | Generic instructions for configuring and compiling Guile can be found | |
27 | in the INSTALL file. Guile specific information and configure options | |
28 | can be found below, including instructions for installing SLIB. | |
29 | ||
a89cafc0 NJ |
30 | Guile depends on the following external libraries. |
31 | - libgmp | |
32 | - libiconv | |
33 | - libintl | |
34 | - libltdl | |
35 | - libunistring | |
cab6e6c0 | 36 | - libgc |
a89cafc0 NJ |
37 | It will also use the libreadline library if it is available. For each |
38 | of these there is a corresponding --with-XXX-prefix option that you | |
39 | can use when invoking ./configure, if you have these libraries | |
40 | installed in a location other than the standard places (/usr and | |
41 | /usr/local). | |
42 | ||
43 | These options are provided by the Gnulib `havelib' module, and details | |
44 | of how they work are documented in `Searching for Libraries' in the | |
45 | Gnulib manual (http://www.gnu.org/software/gnulib/manual). The extent | |
46 | to which they work on a given OS depends on whether that OS supports | |
47 | encoding full library path names in executables (aka `rpath'). Also | |
48 | note that using these options, and hence hardcoding full library path | |
49 | names (where that is supported), makes it impossible to later move the | |
50 | built executables and libraries to an installation location other than | |
51 | the one that was specified at build time. | |
52 | ||
e744e076 TTN |
53 | Another possible approach is to set CPPFLAGS and LDFLAGS on the |
54 | configure command-line, so that they include -I options for all the | |
a89cafc0 NJ |
55 | non-standard places where you have installed header files and -L |
56 | options for all the non-standard places where you have installed | |
57 | libraries. This will allow configure and make to find those headers | |
e744e076 TTN |
58 | and libraries during the build. E.g.: |
59 | ||
60 | ../configure [...] CPPFLAGS='-I/my/include' LDFLAGS='-L/my/lib' | |
61 | ||
62 | The locations found will not be hardcoded into the build executables and | |
63 | libraries, so with this approach you will probably also need to set | |
64 | LD_LIBRARY_PATH correspondingly, to allow Guile to find the necessary | |
65 | libraries again at runtime. | |
d165aa15 RB |
66 | |
67 | ||
a98dbc87 MV |
68 | Required External Packages ================================================ |
69 | ||
70 | Guile requires the following external packages: | |
71 | ||
72 | - GNU MP, at least version 4.1 | |
73 | ||
74 | GNU MP is used for bignum arithmetic. It is available from | |
cab6e6c0 | 75 | http://gmplib.org/ . |
a98dbc87 | 76 | |
cab6e6c0 | 77 | - libltdl from GNU Libtool, at least version 1.5.6 |
a98dbc87 MV |
78 | |
79 | libltdl is used for loading extensions at run-time. It is | |
cab6e6c0 | 80 | available from http://www.gnu.org/software/libtool/ . |
a98dbc87 | 81 | |
1ee2c72e LC |
82 | - GNU libunistring |
83 | ||
84 | libunistring is used for Unicode string operations, such as the | |
85 | `utf*->string' procedures. It is available from | |
86 | http://www.gnu.org/software/libunistring/ . | |
87 | ||
cab6e6c0 LC |
88 | - libgc, at least version 7.0 |
89 | ||
90 | libgc (aka. the Boehm-Demers-Weiser garbage collector) is the | |
91 | conservative garbage collector used by Guile. It is available | |
92 | from http://www.hpl.hp.com/personal/Hans_Boehm/gc/ . | |
93 | ||
ef736635 NJ |
94 | - pkg-config |
95 | ||
96 | Guile's ./configure script uses pkg-config to discover the correct | |
97 | compile and link options for libgc. If you don't have pkg-config | |
98 | installed, or you have a version of libgc that doesn't provide a | |
e744e076 TTN |
99 | .pc file, you can work around this by setting some variables as |
100 | part of the configure command-line: | |
ef736635 NJ |
101 | |
102 | - PKG_CONFIG=true | |
103 | ||
104 | - BDW_GC_CFLAGS=<compile flags for picking up libgc headers> | |
105 | ||
106 | - BDW_GC_LIBS=<linker flags for picking up the libgc library> | |
107 | ||
a98dbc87 | 108 | |
d165aa15 RB |
109 | Special Instructions For Some Systems ===================================== |
110 | ||
111 | We would like Guile to build on all systems using the simple | |
112 | instructions above, but it seems that a few systems still need special | |
113 | treatment. If you can send us fixes for these problems, we'd be | |
114 | grateful. | |
115 | ||
70bb8113 | 116 | <none yet listed> |
d165aa15 RB |
117 | |
118 | Guile specific flags Accepted by Configure ================================= | |
119 | ||
120 | If you run the configure script with no arguments, it should examine | |
121 | your system and set things up appropriately. However, there are a few | |
122 | switches specific to Guile you may find useful in some circumstances. | |
123 | ||
4f416616 | 124 | --without-threads --- Build without thread support |
d165aa15 | 125 | |
70bb8113 | 126 | Build a Guile executable and library that supports multi-threading. |
d165aa15 | 127 | |
70bb8113 MV |
128 | The default is to enable threading support when your operating |
129 | system offsers 'POSIX threads'. When you do not want threading, use | |
130 | `--without-threads'. | |
d165aa15 RB |
131 | |
132 | --enable-deprecated=LEVEL | |
133 | ||
134 | Guile may contain features that are `deprecated'. When a feature is | |
3623a170 MV |
135 | deprecated, it means that it is still there, but that there is a |
136 | better way of achieving the same thing, and we'd rather have you use | |
137 | this better way. This allows us to eventually remove the old | |
138 | implementation and helps to keep Guile reasonably clean of historic | |
139 | baggage. | |
140 | ||
141 | Deprecated features are considered harmful; using them is likely a | |
142 | bug. See below for the related notion of `discouraged' features, | |
70bb8113 | 143 | which are OK but have fallen out of favor. |
d165aa15 RB |
144 | |
145 | See the file NEWS for a list of features that are currently | |
146 | deprecated. Each entry will also tell you what you should replace | |
147 | your code with. | |
148 | ||
149 | To give you some help with this process, and to encourage (OK, | |
150 | nudge) people to switch to the newer methods, Guile can emit | |
151 | warnings or errors when you use a deprecated feature. There is | |
152 | quite a range of possibilities, from being completely silent to | |
153 | giving errors at link time. What exactly happens is determined both | |
154 | by the value of the `--enable-deprecated' configuration option when | |
155 | Guile was built, and by the GUILE_WARN_DEPRECATED environment | |
156 | variable. | |
157 | ||
158 | It works like this: | |
159 | ||
160 | When Guile has been configured with `--enable-deprecated=no' (or, | |
161 | equivalently, with `--disable-deprecated') then all deprecated | |
162 | features are omitted from Guile. You will get "undefined | |
163 | reference", "variable unbound" or similar errors when you try to | |
164 | use them. | |
165 | ||
166 | When `--enable-deprecated=LEVEL' has been specified (for LEVEL not | |
167 | "no"), LEVEL will be used as the default value of the environment | |
168 | variable GUILE_WARN_DEPRECATED. A value of "yes" is changed to | |
169 | "summary" and "shutup" is changed to "no", however. | |
170 | ||
171 | When GUILE_WARN_DEPRECATED has the value "no", nothing special | |
172 | will happen when a deprecated feature is used. | |
173 | ||
174 | When GUILE_WARN_DEPRECATED has the value "summary", and a | |
175 | deprecated feature has been used, Guile will print this message at | |
176 | exit: | |
177 | ||
178 | Some deprecated features have been used. Set the environment | |
179 | variable GUILE_WARN_DEPRECATED to "detailed" and rerun the | |
180 | program to get more information. Set it to "no" to suppress | |
181 | this message. | |
182 | ||
183 | When GUILE_WARN_DEPRECATED has the value "detailed", a detailed | |
184 | warning is emitted immediatly for the first use of a deprecated | |
185 | feature. | |
186 | ||
187 | The default is `--enable-deprecated=yes'. | |
188 | ||
8f305401 MV |
189 | In addition to setting GUILE_WARN_DEPRECATED in the environment, you |
190 | can also use (debug-enable 'warn-deprecated) and (debug-disable | |
191 | 'warn-deprecated) to enable and disable the detailed messaged at run | |
192 | time. | |
193 | ||
3623a170 MV |
194 | --disable-discouraged |
195 | ||
196 | In addition to deprecated features, Guile can also contain things | |
197 | that are merely `discouraged'. It is OK to continue to use these | |
198 | features in old code, but new code should avoid them since there are | |
199 | better alternatives. | |
200 | ||
201 | There is nothing wrong with a discouraged feature per se, but they | |
202 | might have strange names, or be non-standard, for example. Avoiding | |
203 | them will make your code better. | |
204 | ||
d165aa15 RB |
205 | --disable-shared --- Do not build shared libraries. |
206 | --disable-static --- Do not build static libraries. | |
207 | ||
208 | Normally, both static and shared libraries will be built if your | |
209 | system supports them. | |
210 | ||
d165aa15 RB |
211 | --enable-debug-freelist --- Enable freelist debugging. |
212 | ||
70bb8113 MV |
213 | This enables a debugging version of scm_cell and scm_double_cell, |
214 | and also registers an extra primitive, the setter | |
d165aa15 RB |
215 | `gc-set-debug-check-freelist!'. |
216 | ||
217 | Configure with the --enable-debug-freelist option to enable the | |
218 | gc-set-debug-check-freelist! primitive, and then use: | |
219 | ||
220 | (gc-set-debug-check-freelist! #t) # turn on checking of the freelist | |
221 | (gc-set-debug-check-freelist! #f) # turn off checking | |
222 | ||
223 | Checking of the freelist forces a traversal of the freelist and a | |
224 | garbage collection before each allocation of a cell. This can slow | |
225 | down the interpreter dramatically, so the setter should be used to | |
226 | turn on this extra processing only when necessary. | |
227 | ||
d165aa15 RB |
228 | --enable-debug-malloc --- Enable malloc debugging. |
229 | ||
70bb8113 | 230 | Include code for debugging of calls to scm_malloc, scm_realloc, etc. |
d165aa15 | 231 | |
70bb8113 MV |
232 | It records the number of allocated objects of each kind. This is |
233 | useful when searching for memory leaks. | |
d165aa15 RB |
234 | |
235 | A Guile compiled with this option provides the primitive | |
236 | `malloc-stats' which returns an alist with pairs of kind and the | |
237 | number of objects of that kind. | |
238 | ||
d165aa15 | 239 | --enable-guile-debug --- Include internal debugging functions |
d165aa15 RB |
240 | --disable-posix --- omit posix interfaces |
241 | --disable-networking --- omit networking interfaces | |
242 | --disable-regex --- omit regular expression interfaces | |
243 | ||
244 | ||
245 | Cross building Guile ===================================================== | |
246 | ||
247 | As of guile-1.5.x, the build process uses compiled C files for | |
248 | snarfing, and (indirectly, through libtool) for linking, and uses the | |
249 | guile executable for generating documentation. | |
250 | ||
251 | When cross building guile, you first need to configure, build and | |
252 | install guile for your build host. | |
253 | ||
254 | Then, you may configure guile for cross building, eg: | |
255 | ||
256 | ./configure --host=i686-pc-cygwin --disable-shared | |
257 | ||
cd9d439e KR |
258 | A C compiler for the build system is required. The default is |
259 | "PATH=/usr/bin:$PATH cc". If that doesn't suit it can be specified | |
260 | with the CC_FOR_BUILD variable in the usual way, for instance | |
d165aa15 | 261 | |
cd9d439e KR |
262 | ./configure --host=m68k-unknown-linux-gnu CC_FOR_BUILD=/my/local/gcc |
263 | ||
1028fcb2 KR |
264 | Guile for the build system can be specified similarly with the |
265 | GUILE_FOR_BUILD variable, it defaults to just "guile". | |
d165aa15 RB |
266 | |
267 | ||
268 | Using Guile Without Installing It ========================================= | |
269 | ||
0b6d8fdc AW |
270 | The "meta/" subdirectory of the Guile sources contains a script called |
271 | "guile" that can be used to run the Guile that has just been built. Note | |
272 | that this is not the same "guile" as the one that is installed; this | |
273 | "guile" is a wrapper script that sets up the environment appropriately, | |
274 | then invokes the Guile binary. | |
275 | ||
4ea9429e AW |
276 | You may also build external packages against an uninstalled Guile build |
277 | tree. The "uninstalled-env" script in the "meta/" subdirectory will set | |
278 | up an environment with a path including "meta/", a modified dynamic | |
279 | linker path, a modified PKG_CONFIG_PATH, etc. | |
0b6d8fdc AW |
280 | |
281 | For example, you can enter this environment via invoking | |
282 | ||
283 | meta/uninstalled-env bash | |
284 | ||
285 | Within that shell, other packages should be able to build against | |
286 | uninstalled Guile. | |
d165aa15 RB |
287 | |
288 | ||
289 | Installing SLIB =========================================================== | |
290 | ||
291 | In order to use SLIB from Guile you basically only need to put the | |
292 | `slib' directory _in_ one of the directories on Guile's load path. | |
293 | ||
294 | The standard installation is: | |
295 | ||
296 | 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html | |
297 | ||
298 | 2. Put it in Guile's data directory, that is the directory printed when | |
299 | you type | |
300 | ||
301 | guile-config info pkgdatadir | |
302 | ||
303 | at the shell prompt. This is normally `/usr/local/share/guile', so the | |
304 | directory will normally have full path `/usr/local/share/guile/slib'. | |
305 | ||
306 | 3. Start guile as a user with write access to the data directory and type | |
307 | ||
308 | (use-modules (ice-9 slib)) | |
309 | ||
310 | at the Guile prompt. This will generate the slibcat catalog next to | |
311 | the slib directory. | |
312 | ||
313 | SLIB's `require' is provided by the Guile module (ice-9 slib). | |
314 | ||
315 | Example: | |
316 | ||
317 | (use-modules (ice-9 slib)) | |
318 | (require 'primes) | |
319 | (prime? 7) | |
320 | ||
70bb8113 | 321 | |
394a535e MD |
322 | Guile Documentation ================================================== |
323 | ||
ea8ac9ac KR |
324 | If you've never used Scheme before, then the Guile Tutorial |
325 | (guile-tut.info) is a good starting point. The Guile Reference Manual | |
eb12b401 NJ |
326 | (guile.info) is the primary documentation for Guile. A copy of the |
327 | R5RS Scheme specification is included too (r5rs.info). | |
ea8ac9ac KR |
328 | |
329 | Info format versions of this documentation are installed as part of | |
330 | the normal build process. The texinfo sources are under the doc | |
331 | directory, and other formats like Postscript, PDF, DVI or HTML can be | |
332 | generated from them with Tex and Texinfo tools. | |
333 | ||
334 | The doc directory also includes an example-smob subdirectory which has | |
335 | the example code from the "Defining New Types (Smobs)" chapter of the | |
336 | reference manual. | |
394a535e | 337 | |
b5074b23 MD |
338 | The Guile WWW page is at |
339 | ||
340 | http://www.gnu.org/software/guile/guile.html | |
341 | ||
342 | It contains a link to the Guile FAQ. | |
343 | ||
cf78e9e8 JB |
344 | About This Distribution ============================================== |
345 | ||
f89a27fa | 346 | Interesting files include: |
ae8de16e | 347 | |
d165aa15 | 348 | - LICENSE, which contains the exact terms of the Guile license. |
53befeb7 | 349 | - COPYING.LESSER, which contains the terms of the GNU Lesser General Public License. |
d165aa15 RB |
350 | - COPYING, which contains the terms of the GNU General Public License. |
351 | - INSTALL, which contains general instructions for building/installing Guile. | |
f89a27fa | 352 | - NEWS, which describes user-visible changes since the last release of Guile. |
f89a27fa | 353 | |
ae8de16e GH |
354 | Files are usually installed according to the prefix specified to |
355 | configure, /usr/local by default. Building and installing gives you: | |
356 | ||
357 | Executables, in ${prefix}/bin: | |
358 | ||
04873705 TTN |
359 | guile --- a stand-alone interpreter for Guile. With no arguments, this |
360 | is a simple interactive Scheme interpreter. It can also be used | |
361 | as an interpreter for script files; see the NEWS file for details. | |
362 | guile-config --- a Guile script which provides the information necessary | |
363 | to link your programs against the Guile library. | |
364 | guile-snarf --- a script to parse declarations in your C code for | |
365 | Scheme-visible C functions, Scheme objects to be used by C code, | |
366 | etc. | |
ae8de16e GH |
367 | |
368 | Libraries, in ${prefix}/lib. Depending on the platform and options | |
369 | given to configure, you may get shared libraries in addition | |
370 | to or instead of these static libraries: | |
0a7fcdbc | 371 | |
04873705 TTN |
372 | libguile.a --- an object library containing the Guile interpreter, |
373 | You can use Guile in your own programs by linking against this. | |
04873705 | 374 | libguilereadline.a --- an object library containing glue code for the |
70bb8113 MV |
375 | GNU readline library. |
376 | ||
04873705 | 377 | libguile-srfi-*.a --- various SRFI support libraries |
ae8de16e GH |
378 | |
379 | Header files, in ${prefix}/include: | |
380 | ||
04873705 TTN |
381 | libguile.h, guile/gh.h, libguile/*.h --- for libguile. |
382 | guile-readline/readline.h --- for guile-readline. | |
ae8de16e GH |
383 | |
384 | Support files, in ${prefix}/share/guile/<version>: | |
385 | ||
04873705 TTN |
386 | ice-9/* --- run-time support for Guile: the module system, |
387 | read-eval-print loop, some R4RS code and other infrastructure. | |
388 | oop/* --- the Guile Object-Oriented Programming System (GOOPS) | |
389 | scripts/* --- executable modules, i.e., scheme programs that can be both | |
390 | called as an executable from the shell, and loaded and used as a | |
391 | module from scheme code. See scripts/README for more info. | |
392 | srfi/* --- SRFI support modules. See srfi/README for more info. | |
ae8de16e GH |
393 | |
394 | Automake macros, in ${prefix}/share/aclocal: | |
395 | ||
04873705 | 396 | guile.m4 |
ae8de16e GH |
397 | |
398 | Documentation in Info format, in ${prefix}/info: | |
399 | ||
c08a1190 GH |
400 | guile --- Guile reference manual. |
401 | ||
402 | guile-tut --- Guile tutorial. | |
403 | ||
404 | GOOPS --- GOOPS reference manual. | |
405 | ||
406 | r5rs --- Revised(5) Report on the Algorithmic Language Scheme. | |
407 | ||
0196b30a | 408 | |
5c54da76 JB |
409 | The Guile source tree is laid out as follows: |
410 | ||
1325feea | 411 | libguile: |
cf78e9e8 JB |
412 | The Guile Scheme interpreter --- both the object library |
413 | for you to link with your programs, and the executable you can run. | |
1325feea | 414 | ice-9: Guile's module system, initialization code, and other infrastructure. |
17f8d40c JB |
415 | guile-config: |
416 | Source for the guile-config script. | |
621e8324 MV |
417 | guile-readline: |
418 | The glue code for using GNU readline with Guile. This | |
419 | will be build when configure can find a recent enough readline | |
420 | library on your system. | |
ae8de16e | 421 | doc: Documentation (see above). |
4c8980a2 | 422 | |
4b824aae | 423 | Git Repository Access ================================================ |
c11f9405 | 424 | |
4b824aae LC |
425 | Guile's source code is stored in a Git repository at Savannah. Anyone |
426 | can access it using `git-clone' from one of the following URLs: | |
c11f9405 | 427 | |
4b824aae LC |
428 | git://git.sv.gnu.org/guile.git |
429 | http://git.sv.gnu.org/r/guile.git | |
349d9c1f | 430 | |
4b824aae LC |
431 | Developers with a Savannah SSH account can also access it from: |
432 | ||
433 | ssh://git.sv.gnu.org/srv/git/guile.git | |
434 | ||
435 | The repository can also be browsed on-line at the following address: | |
436 | ||
437 | http://git.sv.gnu.org/gitweb/?p=guile.git | |
438 | ||
439 | For more information on Git, please see: | |
440 | ||
441 | http://git.or.cz/ | |
442 | ||
443 | Please send problem reports to <bug-guile@gnu.org>. |