In the distribution directory you will also find archives of
precompiled binaries and heap images for Larceny; the archives are named
larceny-X.Y-sunosZ-bin.tar.gz where
Z is 4 or 5.
2. Requirements
A host Scheme system is needed to compile the Larceny Scheme sources.
Any version of Larceny is suitable, as is Chez Scheme version 5. (Chez
Scheme version 4 has worked in the past, also.) See Step 5 below for
details.
3. Installation
Step 1: Unpack
Unpack the source archive as discussed in the Introduction.
Some older Sparc machines have strange instruction cache behavior that must be dealt with specially by editing the Makefile. Click here for more information about this.
If you are planning on building the system with the Boehm-Demers-Weiser conservative garbage collector, then you should read this for more information about other setup steps you need to perform.
make setupThat command will edit the "build" script, set up some symbolic links in the source tree, and compile some C programs used by the development system.
make larceny.binor, if you are compiling the system with the conservative collector,
make bdwlarceny.binYou are now the proud owner of a Larceny executable, called either larceny.bin or bdwlarceny.bin.
We have built Larceny with Chez Scheme, MacScheme, and Gambit-C; a compatibility library for Chez Scheme is included in the distribution. If you have neither of these host systems, contact us, as setting up a new host system can be a little hairy.
The system you are using as the host system needs to be configured in to the build script: set the BUILD_HOST variable at the top to a string that identifies your system (see comments in the file).
Now execute the command
buildWhen the Scheme prompt appears, create the heap image by evaluating the expression
(make-sparc-heap)All Scheme source files will now be compiled and then dumped in a heap image with the name sparc.heap.
More information about how to use the development system for more interesting things, including how to compile the compiler, is available here.
To find out how to run Larceny, click here.
4. Creating the heap images
First compile the development system as detailed here.
Some Scheme scripts are supplied in the Util subdirectory that are helpful in (re)creating the heap images distributed with Larceny: larceny.heap, twobit.heap, and r5rs.heap. These files are called std-heap.sch, twobit-heap.sch, and r5rs-heap.sch. They may only be loaded into a process that was started with the command line
larceny.bin -stopcopy sparc.heapwhere
sparc.heap
is a heap that was created as in step 3
above.
(The -stopcopy switch is needed because the generational collector does not yet do heap dumping.)
To build a heap image, start larceny.bin as outlined above and load the desired script ("Util/std-heap.sch", "Util/twobit-heap.sch", or "Util/r5rs-heap.sch") into the interpreter. The script will load the necessary files, dump a heap image, and then run larceny on the image to reorganize it (splitting code and data, as it were). Once you've built a heap, you should not use the same running process to build another, and it is most useful to quit and restart.