README 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. This is version 3.0 of Guile, Project GNU's extension language library.
  2. Guile is an implementation of the Scheme programming language, packaged
  3. as a library that can be linked into applications to give them their own
  4. extension language. Guile supports other languages as well, giving
  5. users of Guile-based applications a choice of languages.
  6. Please send bug reports to bug-guile@gnu.org.
  7. See the LICENSE file for the specific terms that apply to Guile. Note
  8. that for any copyright year range specified as YYYY-ZZZZ in this
  9. package, the range specifies every single year in that closed interval.
  10. Additional INSTALL instructions ===========================================
  11. Generic instructions for configuring and compiling Guile can be found
  12. in the INSTALL file. Guile specific information and configure options
  13. can be found below, including instructions for installing SLIB.
  14. Guile depends on the following external libraries.
  15. - libgmp
  16. - libiconv
  17. - libintl
  18. - libltdl
  19. - libunistring
  20. - libgc
  21. - libffi
  22. It will also use the libreadline library if it is available.
  23. There is a corresponding `--with-XXX-prefix' option for each of these
  24. libraries (except for libgc and libffi which use `pkg-config', see
  25. below) that you can use when invoking ./configure, if you have these
  26. libraries installed in a location other than the standard places (/usr
  27. and /usr/local).
  28. These options are provided by the Gnulib `havelib' module, and details
  29. of how they work are documented in `Searching for Libraries' in the
  30. Gnulib manual (http://www.gnu.org/software/gnulib/manual). The extent
  31. to which they work on a given OS depends on whether that OS supports
  32. encoding full library path names in executables (aka `rpath'). Also
  33. note that using these options, and hence hardcoding full library path
  34. names (where that is supported), makes it impossible to later move the
  35. built executables and libraries to an installation location other than
  36. the one that was specified at build time.
  37. Another possible approach is to set CPPFLAGS and LDFLAGS on the
  38. configure command-line, so that they include -I options for all the
  39. non-standard places where you have installed header files and -L
  40. options for all the non-standard places where you have installed
  41. libraries. This will allow configure and make to find those headers
  42. and libraries during the build. E.g.:
  43. ../configure [...] CPPFLAGS='-I/my/include' LDFLAGS='-L/my/lib'
  44. The locations found will not be hardcoded into the build executables and
  45. libraries, so with this approach you will probably also need to set
  46. LD_LIBRARY_PATH correspondingly, to allow Guile to find the necessary
  47. libraries again at runtime.
  48. Required External Packages ================================================
  49. Guile requires the following external packages:
  50. - GNU MP, at least version 4.2
  51. GNU MP is used for bignum arithmetic. It is available from
  52. http://gmplib.org/ .
  53. - libltdl from GNU Libtool, at least version 1.5.6
  54. libltdl is used for loading extensions at run-time. It is
  55. available from http://www.gnu.org/software/libtool/ .
  56. - GNU libunistring, at least version 0.9.3
  57. libunistring is used for Unicode string operations, such as the
  58. `utf*->string' procedures. It is available from
  59. http://www.gnu.org/software/libunistring/ .
  60. - libgc, at least version 7.2
  61. libgc (aka. the Boehm-Demers-Weiser garbage collector) is the
  62. conservative garbage collector used by Guile. It is available
  63. from http://www.hboehm.info/gc/ .
  64. - libffi
  65. libffi provides a "foreign function interface", used by the
  66. `(system foreign)' module. It is available from
  67. http://sourceware.org/libffi/ .
  68. - pkg-config
  69. Guile's ./configure script uses pkg-config to discover the correct
  70. compile and link options for libgc and libffi. For this to work,
  71. the `PKG_CONFIG_PATH' environment variable must be set to point to
  72. the places where libgc's and libffi's `.pc' files can be found:
  73. PKG_CONFIG_PATH=/path/to/libgc/lib/pkgconfig:/path/to/libffi/lib/pkgconfig
  74. Alternatively, when pkg-config is not installed, you can work around
  75. this by setting some variables as part of the configure
  76. command-line:
  77. - PKG_CONFIG=true
  78. - BDW_GC_CFLAGS=<compile flags for picking up libgc headers>
  79. - BDW_GC_LIBS=<linker flags for picking up the libgc library>
  80. Note that because you're bypassing all pkg-config checks, you will
  81. also have to specify libffi flags as well:
  82. - LIBFFI_CFLAGS=<compile flags for picking up libffi headers>
  83. - LIBFFI_LIBS=<linker flags for picking up the libffi library>
  84. When building from a Git checkout, these additional packages are needed:
  85. - GNU Autoconf
  86. - GNU Automake
  87. - GNU Libtool
  88. - Flex
  89. - GNU Gettext
  90. - GNU Autopoint
  91. - GNU Texinfo
  92. - GNU Gperf
  93. If you use GNU Guix, you can obtain a shell for development with all the
  94. dependencies by running the following command from the top directory of
  95. the checkout:
  96. guix shell
  97. You can also build Guile by running:
  98. guix build -f guix.scm
  99. Special Instructions For Some Systems =====================================
  100. We would like Guile to build on all systems using the simple
  101. instructions above, but it seems that a few systems still need special
  102. treatment. If you can send us fixes for these problems, we'd be
  103. grateful.
  104. FreeBSD 11.0:
  105. For a build supporting threads, please `pkg install' the following
  106. - pkgconf : provides pkg-config
  107. - gmake : /usr/bin/make does not work
  108. - boehm-gc-threaded : needed for threaded support
  109. Configure as:
  110. ./configure --with-bdw-gc=bdw-gc-threaded
  111. Alternately if you want a Guile without threads, then install boehm-gc
  112. and configure as:
  113. ./configure --without-threads
  114. Guile specific flags Accepted by Configure =================================
  115. If you run the configure script with no arguments, it should examine
  116. your system and set things up appropriately. However, there are a few
  117. switches specific to Guile you may find useful in some circumstances.
  118. --without-threads --- Build without thread support
  119. Build a Guile executable and library that supports multi-threading.
  120. The default is to enable threading support when your operating
  121. system offsers 'POSIX threads'. When you do not want threading, use
  122. `--without-threads'.
  123. --enable-deprecated=LEVEL
  124. Guile may contain features that are `deprecated'. When a feature is
  125. deprecated, it means that it is still there, but that there is a
  126. better way of achieving the same thing, and we'd rather have you use
  127. this better way. This allows us to eventually remove the old
  128. implementation and helps to keep Guile reasonably clean of historic
  129. baggage.
  130. See the file NEWS for a list of features that are currently
  131. deprecated. Each entry will also tell you what you should replace
  132. your code with.
  133. To give you some help with this process, and to encourage (OK,
  134. nudge) people to switch to the newer methods, Guile can emit
  135. warnings or errors when you use a deprecated feature. There is
  136. quite a range of possibilities, from being completely silent to
  137. giving errors at link time. What exactly happens is determined both
  138. by the value of the `--enable-deprecated' configuration option when
  139. Guile was built, and by the GUILE_WARN_DEPRECATED environment
  140. variable.
  141. It works like this:
  142. When Guile has been configured with `--enable-deprecated=no' (or,
  143. equivalently, with `--disable-deprecated') then all deprecated
  144. features are omitted from Guile. You will get "undefined
  145. reference", "variable unbound" or similar errors when you try to
  146. use them.
  147. When `--enable-deprecated=LEVEL' has been specified (for LEVEL not
  148. "no"), LEVEL will be used as the default value of the environment
  149. variable GUILE_WARN_DEPRECATED. A value of "yes" is changed to
  150. "summary" and "shutup" is changed to "no", however.
  151. When GUILE_WARN_DEPRECATED has the value "no", nothing special
  152. will happen when a deprecated feature is used.
  153. When GUILE_WARN_DEPRECATED has the value "summary", and a
  154. deprecated feature has been used, Guile will print this message at
  155. exit:
  156. Some deprecated features have been used. Set the environment
  157. variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
  158. program to get more information. Set it to "no" to suppress
  159. this message.
  160. When GUILE_WARN_DEPRECATED has the value "detailed", a detailed
  161. warning is emitted immediatly for the first use of a deprecated
  162. feature.
  163. The default is `--enable-deprecated=yes'.
  164. In addition to setting GUILE_WARN_DEPRECATED in the environment, you
  165. can also use (debug-enable 'warn-deprecated) and (debug-disable
  166. 'warn-deprecated) to enable and disable the detailed messaged at run
  167. time.
  168. Additionally, if your toolchain is new enough, you will receive
  169. warnings at link time if you have a Guile extension that uses
  170. deprecated functions provided by Guile.
  171. --disable-shared --- Do not build shared libraries.
  172. --disable-static --- Do not build static libraries.
  173. Normally, both static and shared libraries will be built if your
  174. system supports them.
  175. --enable-debug-freelist --- Enable freelist debugging.
  176. This enables a debugging version of scm_cell and scm_double_cell,
  177. and also registers an extra primitive, the setter
  178. `gc-set-debug-check-freelist!'.
  179. Configure with the --enable-debug-freelist option to enable the
  180. gc-set-debug-check-freelist! primitive, and then use:
  181. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  182. (gc-set-debug-check-freelist! #f) # turn off checking
  183. Checking of the freelist forces a traversal of the freelist and a
  184. garbage collection before each allocation of a cell. This can slow
  185. down the interpreter dramatically, so the setter should be used to
  186. turn on this extra processing only when necessary.
  187. --enable-debug-malloc --- Enable malloc debugging.
  188. Include code for debugging of calls to scm_malloc, scm_realloc, etc.
  189. It records the number of allocated objects of each kind. This is
  190. useful when searching for memory leaks.
  191. A Guile compiled with this option provides the primitive
  192. `malloc-stats' which returns an alist with pairs of kind and the
  193. number of objects of that kind.
  194. --enable-guile-debug --- Include internal debugging functions
  195. --disable-posix --- omit posix interfaces
  196. --disable-networking --- omit networking interfaces
  197. --disable-regex --- omit regular expression interfaces
  198. Cross building Guile =====================================================
  199. As of Guile 3.0.x, the build process produces a library, libguile-3.0,
  200. along with Guile "object files" containing bytecode to be interpreted by
  201. Guile's virtual machine. The bytecode format depends on the endianness
  202. and word size of the host CPU.
  203. Thus, when cross building Guile, you first need to configure, build and
  204. install it for your build host.
  205. Then, you may configure Guile for cross building:
  206. ./configure --host=i686-pc-cygwin --disable-shared
  207. A C compiler for the build system is required. If that doesn't suit it
  208. can be specified with the CC_FOR_BUILD variable in the usual way, for
  209. instance:
  210. ./configure --host=m68k-unknown-linux-gnu CC_FOR_BUILD=/my/local/gcc
  211. Guile for the build system can be specified similarly with the
  212. GUILE_FOR_BUILD variable, which defaults to whatever `guile' executable
  213. is found in $PATH. It must have the exact same version has the Guile
  214. that you intend to cross-build.
  215. Using Guile Without Installing It =========================================
  216. The "meta/" subdirectory of the Guile sources contains a script called
  217. "guile" that can be used to run the Guile that has just been built. Note
  218. that this is not the same "guile" as the one that is installed; this
  219. "guile" is a wrapper script that sets up the environment appropriately,
  220. then invokes the Guile binary.
  221. You may also build external packages against an uninstalled Guile build
  222. tree. The "uninstalled-env" script in the "meta/" subdirectory will set
  223. up an environment with a path including "meta/", a modified dynamic
  224. linker path, a modified PKG_CONFIG_PATH, etc.
  225. For example, you can enter this environment via invoking
  226. meta/uninstalled-env bash
  227. Within that shell, other packages should be able to build against
  228. uninstalled Guile.
  229. Installing SLIB ===========================================================
  230. In order to use SLIB from Guile you basically only need to put the
  231. `slib' directory _in_ one of the directories on Guile's load path.
  232. The standard installation is:
  233. 1. Obtain slib from http://www-swiss.ai.mit.edu/~jaffer/SLIB.html
  234. 2. Put it in Guile's data directory, that is the directory printed when
  235. you type
  236. guile-config info pkgdatadir
  237. at the shell prompt. This is normally `/usr/local/share/guile', so the
  238. directory will normally have full path `/usr/local/share/guile/slib'.
  239. 3. Start guile as a user with write access to the data directory and type
  240. (use-modules (ice-9 slib))
  241. at the Guile prompt. This will generate the slibcat catalog next to
  242. the slib directory.
  243. SLIB's `require' is provided by the Guile module (ice-9 slib).
  244. Example:
  245. (use-modules (ice-9 slib))
  246. (require 'primes)
  247. (prime? 7)
  248. Guile Documentation ==================================================
  249. The Guile Reference Manual (guile.info) is the primary documentation for
  250. Guile. A copy of the R5RS Scheme specification is included too
  251. (r5rs.info).
  252. Info format versions of this documentation are installed as part of
  253. the normal build process. The texinfo sources are under the doc
  254. directory, and other formats like Postscript, PDF, DVI or HTML can be
  255. generated from them with Tex and Texinfo tools.
  256. The doc directory also includes an example-smob subdirectory which has
  257. the example code from the "Defining New Types (Smobs)" chapter of the
  258. reference manual.
  259. The Guile WWW page is at
  260. http://www.gnu.org/software/guile/guile.html
  261. It contains a link to the Guile FAQ.
  262. About This Distribution ==============================================
  263. Interesting files include:
  264. - LICENSE, which contains the exact terms of the Guile license.
  265. - COPYING.LESSER, which contains the terms of the GNU Lesser General Public License.
  266. - COPYING, which contains the terms of the GNU General Public License.
  267. - INSTALL, which contains general instructions for building/installing Guile.
  268. - NEWS, which describes user-visible changes since the last release of Guile.
  269. Files are usually installed according to the prefix specified to
  270. configure, /usr/local by default. Building and installing gives you:
  271. Executables, in ${prefix}/bin:
  272. guile --- a stand-alone interpreter for Guile. With no arguments, this
  273. is a simple interactive Scheme interpreter. It can also be used
  274. as an interpreter for script files; see the NEWS file for details.
  275. guile-config --- a Guile script which provides the information necessary
  276. to link your programs against the Guile library.
  277. guile-snarf --- a script to parse declarations in your C code for
  278. Scheme-visible C functions, Scheme objects to be used by C code,
  279. etc.
  280. Libraries, in ${prefix}/lib. Depending on the platform and options
  281. given to configure, you may get shared libraries in addition
  282. to or instead of these static libraries:
  283. libguile.a --- an object library containing the Guile interpreter,
  284. You can use Guile in your own programs by linking against this.
  285. libguilereadline.a --- an object library containing glue code for the
  286. GNU readline library.
  287. libguile-srfi-*.a --- various SRFI support libraries
  288. Header files, in ${prefix}/include:
  289. libguile.h, guile/gh.h, libguile/*.h --- for libguile.
  290. guile-readline/readline.h --- for guile-readline.
  291. Support files, in ${prefix}/share/guile/<version>:
  292. ice-9/* --- run-time support for Guile: the module system,
  293. read-eval-print loop, some R4RS code and other infrastructure.
  294. oop/* --- the Guile Object-Oriented Programming System (GOOPS)
  295. scripts/* --- executable modules, i.e., scheme programs that can be both
  296. called as an executable from the shell, and loaded and used as a
  297. module from scheme code. See scripts/README for more info.
  298. srfi/* --- SRFI support modules. See srfi/README for more info.
  299. Automake macros, in ${prefix}/share/aclocal:
  300. guile.m4
  301. Documentation in Info format, in ${prefix}/info:
  302. guile --- Guile reference manual.
  303. GOOPS --- GOOPS reference manual.
  304. r5rs --- Revised(5) Report on the Algorithmic Language Scheme.
  305. The Guile source tree is laid out as follows:
  306. libguile:
  307. The Guile Scheme interpreter --- both the object library
  308. for you to link with your programs, and the executable you can run.
  309. module: Scheme libraries included with Guile.
  310. guile-readline:
  311. The glue code for using GNU readline with Guile. This
  312. will be build when configure can find a recent enough readline
  313. library on your system.
  314. doc: Documentation (see above).
  315. Git Repository Access ================================================
  316. Guile's source code is stored in a Git repository at Savannah. Anyone
  317. can access it using `git-clone' from one of the following URLs:
  318. git://git.savannah.gnu.org/guile.git
  319. https://git.savannah.gnu.org/git/guile.git
  320. Developers with a Savannah SSH account can also access it from:
  321. ssh://git.sv.gnu.org/srv/git/guile.git
  322. The repository can also be browsed on-line at the following address:
  323. https://git.savannah.gnu.org/cgit/guile.git/
  324. For more information on Git, please see:
  325. https://git-scm.com
  326. Please send problem reports to <bug-guile@gnu.org>.