-
Notifications
You must be signed in to change notification settings - Fork 4
LkbCompilation
This page details the procedure for compiling LKB source code in a suitable Common-Lisp environment. If you have a license for Allegro CL with CLIM or Macintosh Common Lisp (sans CLIM), you can download the source files and compile the LKB yourself, including graphics. Using a range of other Lisps (see the list on the LkbInstallation page) is possible too, but then the default graphical user interface will not be available. However, recent work on a non-CLIM Linguistic User Interface (LkbLui) offers hope of some graphics capabilities with open-source Lisp implementations. The LKB should, in principle, run on LispWorks with CLIM, and some source code is available for the Windows version of Allegro Common Graphics (rather than CLIM), but the port is incomplete and this will only be useful for someone who is experienced with Lisp and prepared to do substantial programming: please contact AnnCopestake for some more details.
When compiling the LKB in a Lisp without CLIM (and not MCL), the system will operate in what is called tty mode, an ASCII-only environment that still allows access to most basic functionality. See the LkbTty page for more information on tty mode.
The following assumes that you have completed the installation instructions from the LkbInstallation page, including downloading and unpacking the archive lkb_source.tgz into a directory we will refer to as DELPHINHOME. Also, make sure the directory for LKB temporary files is available and, on Linux, confirm that a compatible version of OpenMotif is installed when using a local Allegro Common Lisp license (check the release notes for your software). Finally, Allegro Common Lisp by default ships with CLIM not included in the images. To generate a CLIM-enabled Allegro CL binary, execute the following from within the Allegro CL installation directory (not the DELPHINHOME directory):
./alisp -L buildclim.cl -kill
This should result in a new executable file clim in the current directory. While you are at it, consider getting the latest patches from Franz and re-building your images (see the release notes for instructions).
Start your Lisp environment, preferably as a sub-process to emacs. When using Allegro CL, use the clim binary (see above). The LkbEmacs page has instructions on how to run the LKB and Lisp with emacs, the standard editor.
Within Lisp, load the LKB compilation environment. In our examples, we will use pathnames relative to DELPHINHOME, so you can either make sure the Lisp considers DELPHINHOME the current directory (usually starting the process from within that directory should suffice) or expand the path values in these examples to full directory names relative to your system.
(load "lkb/src/general/loadup")
There should be no error messages from this step. Next, request that the complete LKB code base be compiled:
(compile-system "lkb" :force t)
This compiles and loads all the LKB files that are appropriate for your system. There may be some warning messages from the compiler -- these can usually be ignored, but if you subsequently have problems using the LKB, you should redo this process and examine the warning messages. You should now see the LKB Top interaction window, unless you are running in tty mode.
The :force keyword to compile-system() in the example above will make sure that all files are re-compiled cleanly. This is necessary when loading the LKB for the first time and every time you obtain updates to the LKB source tree. Once all files are compiled on your local system, however, it will be faster to just load the LKB code into Lisp, using:
(load-system "lkb")
Warning: these instructions may be out of date. Using MCL on the Macintosh, you may have to edit the definition of lkb-tmp-dir() in the file user-fns.lsp in the lkb/src/main/ directory, unless your system disk is called Macintosh HD and you have a top-level directory tmp there that you want the LKB to use for its temporary files.
If you wish to make a development image, for instance because you want to make the LKB available for several users at your site, then try the following.
For Allegro CL, take a look at the files image.lsp and deliver.lsp in the lkb/src/ACL_specific/ directory. Either one could be tuned for your needs, e.g. adjusting path values or turning off :runtime mode, and loading one of these files into Allegro CL (after loadup.lsp) should result in a precompiled development image.
For MCL, the function dump-lkb() provides a similar functionality. The source for this is in the file topmenu.lsp in the lkb/src/MCL_specific/ directory.
Home | Forum | Discussions | Events