-
Notifications
You must be signed in to change notification settings - Fork 5
/
INSTALL
248 lines (176 loc) · 8.19 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
Install Instructions for Motion Grammar Kit
The Motion-Grammar-Kit is implemented in Common Lisp and C. The Lisp
portion loads using ASDF. The C portion builds with the conventional
autotools `./configure && make && make install`.
* To quickly get started, you can download a binary Lisp core file
from http://code.golems.org/pkg/mgk/core/.
* Deb packages for Debian and Ubuntu are also available from
http://code.golems.org/debian.
* Installation from source is summarized under the "Short
Instructions". For a step-by-step guide, please see the "Detailed
Instructions" below.
Binaries
========
Binaries for the lisp code are available at
http://code.golems.org/pkg/mgk/core/. These are executable lisp core
files containing all dependencies, so installation is simply copying
the file to your bin directory (e.g. /usr/local/bin/).
Debian Packages
===============
1. Add the following to /etc/apt/sources:
http://code.golems.org/debian squeeze golems.org
(substitute the codename for your distribution in place of squeeze,
e.g. wheezy, precise)
2. `sudo apt-get update && sudo apt-get install libmotgram-dev motgramlisp`
Short Instructions
==================
Dependencies
------------
A few dependencies on some typical lisp libraries, plus the author's
tree and finite set library. Most dependencies are installable using
the Quicklisp library manager (http://www.quicklisp.org/)
* CL-PPCRE -- quicklisp or http://weitz.de/cl-ppcre/
* ALEXANDRIA -- quicklisp or http://common-lisp.net/project/alexandria/
* CFFI -- quicklisp or http://common-lisp.net/project/cffi/
* LISP-UNIT -- for tests only, quicklisp or
http://www.cs.northwestern.edu/academics/courses/325/readings/lisp-unit.html
* SYCAMORE -- http://ndantam.github.com/sycamore/ or
$ git clone https://github.com/ndantam/sycamore
* CL-FUZZ -- for tests only, http://ndantam.github.com/cl-fuzz/ or
$ git clone https://github.com/ndantam/cl-fuzz
Motion-Grammar-Kit
------------------
* `git clone https://github.com/golems/motion-grammar-kit`
* Set your ASDF symlink, and load it up!
Libmotgram
----------
* ./configure && make && make install
* If the Ach library is detected, support will automatically be
enabled.
Detailed Instructions
=====================
These step-by-step instructions describe how to install a Common Lisp
development environment, install the various dependencies, and load
the Motion-Grammar-Kit.
Install a Common Lisp System
----------------------------
First, you will need to install a Common Lisp system, giving you the
lisp compiler and runtime environment. The SBCL implementation
(http://www.sbcl.org/) is a popular Free lisp with a very good
compiler that run on most popular unix-like systems. Microsoft
Windows support on SBCL is present but rather new, so CLISP
(http://www.clisp.org/) is another option. Clozure CL is another
Free, fast lisp that also includes an IDE for MacOSX.
* Debian / Ubuntu
* `sudo apt-get install sbcl`
* All Others
* SBCL -- http://www.sbcl.org/platform-table.html (or your favorite
package manager)
* Clozure -- http://ccl.clozure.com/ (or package manager)
* CLISP -- http://www.clisp.org/ (or package manager)
Install Quicklisp
-----------------
Quicklisp is a package manager for lisp, similar to CPAN, RubyGems,
Python's easy_install, and ELPA. At the time of writing, it is the
easiest way to install Lisp packages. You can install Quicklisp from
http://www.quicklisp.org/.
Alternatively, Debian Wheezy and Ubuntu Precise (or later) contain a
package for quicklisp:
$ sudo apt-get install cl-quicklisp
Then, the following command will setup quicklisp for your user account:
$ sbcl --load /usr/share/cl-quicklisp/quicklisp.lisp \
--eval '(quicklisp-quickstart:install)' \
--eval '(ql:add-to-init-file)' \
--eval '(quit)'
Install Development Environment
-------------------------------
Lisp development is typically done interactively with a running Lisp
process, similar to systems such as Matlab or Mathematica. It is very
convenient to have a text editor which supports communication with a
running lisp. The Superior Lisp Interacton Mode for Emacs (SLIME,
http://common-lisp.net/project/slime/) provides a good lisp interface.
* Debian / Ubuntu:
* `sudo apt-get install emacs slime`
* Install via quicklisp:
* `sbcl --eval '(ql:quickload "quicklisp-slime-helper")'`
* All Others
* Emacs -- http://www.gnu.org/software/emacs/#Obtaining (or package
manager)
* Slime -- http://common-lisp.net/project/slime/ (or package manager)
Then, start emacs and type `M-x slime`. (If you are new to emacs as
well, "M-x slime" means push Alt-x, then type "slime"). This will
give you the "REPL" (read-eval-print-loop), where you can
interactively run lisp code. More information is available in the
Slime manual: http://common-lisp.net/project/slime/doc/html/.
There are some alternatives to Slime as well. Eclipse users may
prefer the Cusp environment (http://bitfauna.com/projects/cusp/). On
MacOSX, you can use the ClozureCL IDE. Lispworks
(http://www.lispworks.com/) and Allegro CL (http://www.franz.com/) are
two commercial, proprietary lisps that come with IDEs.
ASDF and Other Dependencies
---------------------------
ASDF is a build system for Common Lisp, similar to make or ant. To
load ASDF systems into a lisp, you must define where the system
definition files (*.asd) are stored. Generally, one picks a single
directory to place symlinks to the asd files for each separate system.
Then, that directory is specified in the startup file for the lisp.
To store the asd symlinks under ~/.asdf/systems/, add the following
code to your lisp startup file:
(pushnew '(merge-pathnames ".asdf/systems/"
(user-homedir-pathname))
asdf:*central-registry*
:test #'equal)
Startup files for various lisps are:
* SBCL -- ~/.sbclrc
* CLISP -- ~/.clisprc.lisp
* Clozure -- ~/.ccl-init.lisp
Note that your lisp may not automatically load the ASDF package, so it
may be necessary to insert the following line at the beginning of the
startup file:
(require 'asdf)
Next, you need to install the SYCAMORE lisp library, available at
http://ndantam.github.com/sycamore/ or with:
$ git clone https://github.com/ndantam/sycamore
Once you have obtained the source, put a symbolic link to sycamore.asd
under ~/.asdf/systems (or some other directory you have set).
$ ln -s /path/to/sycamore/sycamore.asd ~/.asdf/systems/sycamore.asd
Similarly, you can install CL-FUZZ from
http://ndantam.github.com/cl-fuzz/ or with:
$ git clone https://github.com/ndantam/cl-fuzz
Then, add the appropriate symbolic link:
$ ln -s /path/to/cl-fuzz/cl-fuzz.asd ~/.asdf/systems/cl-fuzz.asd
You can then load CL-FUZZ and SYCAMORE from the lisp REPL with:
(ql:quickload :cl-fuzz)
(ql:quickload :sycamore)
Install Motion-Grammar-Kit Package
----------------------------------
Now, download the source for the Motion-Grammar-Kit from
http://golems.github.com/motion-grammar-kit/ (unless you already have
it):
$ git clone https://github.com/golems/motion-grammar-kit
Then, put the symlink for src/motion-grammar-kit.asd under
~/.asdf/systems/ (or your preferred directory):
$ ln -s /path/to/motion-grammar-kit/src/motion-grammar-kit.asd ~/.asdf/systems/motion-grammar-kit.asd
Finally, load it from the REPL with:
(ql:quickload :motion-grammar-kit)
and the package is loaded.
Build libmotgram
----------------
0. If you have obtained the Motion-Grammar-Kit from the git repo, you
need to initialize the autotools build scripts. This requires the
autotools and the autoconf macro archive. To install these on
Debian or Ubuntu GNU/Linux, you can do
$ sudo apt-get install autoconf automake libtool autoconf-archive
Then, initialize autotools with
$ autoreconf -i
This whole step is not necessary when you have obtained a distribution
tarball which already contains the autoconf-generated configure script.
1. Configure for your system:
$ ./configure
If the Ach library is detected, support will automatically be enabled.
To disable Ach support in this case, add the `--without-ach` file to
configure: `$ ./configure --without-ach`.
2. Build:
$ make
3. Install:
$ sudo make install