Skip to content
Will Clinger edited this page May 26, 2016 · 5 revisions

The source package is easy.

  • On Larceny's GitHub page, click "Download ZIP".
  • unzip larceny-master.zip
  • mv larceny-master larceny-VERSION-src
  • tar -czf larceny-VERSION-src.tar.gz larceny-VERSION-src
  • zip -r larceny-VERSION-src.zip larceny-VERSION-src

The binary packages are a bit harder.

Lets simplify things by assuming you're starting with a nightly build from the autobuild scripts.

  • Make an exact copy of the larceny_src/ autobuilt directory, preserving file modification times so won't have to rebuild the R7RS runtime. (Will does that by creating a tar file and unpacking it elsewhere to create the copy.)
  • Name the copy according to the following pattern: larceny-VERSION-bin-VARIANT-ARCH-OS
    • VARIANT is one of native | petit | common
    • ARCH is one of ia32 | armv7l | sparc | stdc | cls
    • OS is one of linux86 | macosx | win32 | solaris
    • Examples:
      • larceny-0.93-bin-native-ia32-macosx/
      • larceny-0.93-bin-petit-stdc-linux86/
      • larceny-0.93-bin-common-cls-win32/
  • The Linux and OS X versions of native Larceny should be packaged automatically from the nightly autobuilds.
  • The ARMv7 version of native Larceny will probably have to be packaged by hand.
  • The Windows version of native Larceny and the Linux version of Petit Larceny will probably have to be packaged by hand.
  • The steps described below have been automated for native Larceny and Petit Larceny; see test/Scripts/package-bin-release.sh
    • That script currently does steps that are not completely documented below (particularly with respect to CommonLarceny).
    • In any case, the intention is that you copy the script somewhere else (like /tmp/), and then run the script while your working directory is the exact copy of larceny_src/ you made above.

Having done that, just

  1. run the script (on Windows, run it using Cygwin)
  2. tar/gzip the directory
  3. when all binary versions have been made and tested, make a tagged version of the source

The packaging script no longer executes the version of Larceny being packaged, so it should be safe to run the packaging script on any machine.


The script will do the following:

  • Right now, the nightly builds use git clone or svn checkout. With git clone, you need to remove the .git directory. With svn checkout, you need to remove the .svn directories that are littered in the tree. Here is a command that should do the trick: % find . -name .svn -type d | xargs rm -r

  • Remove the src directory, since that's not part of the binary distribution.

    • There is some weirdness here on CommonLarceny; consult the [source:trunk/larceny_src/test/Scripts/package-bin-release.sh package-bin-release.sh] script to see what files and directory structures need to be preserved.
  • Remove the test directory, since that's not part of the binary distribution.

  • Remove the include directory from non-Petit distributions.

  • Remove README-COMMON-LARCENY.txt from the non Common Larceny distributions

  • For Petit:

    • remove the .o files
    • remove the generated .c files (but currently distinquishing these is actually difficult...)
  • Reorganize the doc directory, removing documentation source, adding HTML and PDF files from the nightly build of documentation, and adding copies of the R5RS, R6RS, and R7RS standards. (Omitting those standards would reduce the size of the packaged release, but it seemed like a good idea at the time.)

  • The R7RS/R6RS/SRFI libraries are now pre-compiled as part of the normal system build.

    • For Petit Larceny, it is not clear whether we can safely distribute the .so files generated by Petit Larceny's compile-file, but we're doing that anyway for the R7RS/R6RS/SRFI libraries.
    • For Non-petit systems with FFI support, we'd like to compile certain libraries that use the foreign-ctools library ahead of time, but we're not doing that now because OS changes and diversity have made this less reliable than compiling them on the machine they'll run on.
    • Some examples of FFI-intensive libraries we'd like to pre-compile: lib/Experimental/socket.sch, lib/Experimental/unix.sch, and lib/Standard/file-system.sch.
    • These files tend to assume that their syntax dependencies will be handled automagically by require, so the safest way to compile them is to first load the file (so that the syntactic environment will be extended with any necessary dependencies) and then compile the file.

(for-each (lambda (f) (load f) (compile-file f)) 
          (list "lib/Experimental/socket.sch" 
                "lib/Experimental/unix.sch" 
                "lib/Standard/file-system.sch"))
  • On 5 August 2008, Will pointed out to PnkFelix that on Win32, we have never distributed compiled fasl files in lib/Standard. Felix did not expect that but is not surprised. Felix does think that this should be fixed; programmers using native Larceny should be able to expect lib/Standard/file-system to work, even if they do not have a C compiler installed.
  • Will remains skeptical. Larceny's FFI is suffering from bit rot; in particular, the libresolv library is likely to be incompatible or in a different file on 64-bit systems. Until that is fixed, shipping compiled files that depend upon the FFI is asking for trouble.

Common Larceny Notes

Larceny.fasl depends on several source files at load time:

  • src/Build/nbuild-param.sch
  • src/Lib/Common/toplevel.sch
  • src/Lib/Arch/IL/toplevel-target.sch If it can't find these files, it will fail to load, so we can't just blow away src/.
Clone this wiki locally