[Openmcl-devel] Re: building MCL for idiots (fwd)

mikel evins mikel at evins.net
Thu Feb 26 14:37:18 PST 2004


On Feb 26, 2004, at 2:11 PM, Gary Byers wrote:

> Cyrus Harmon said that it'd be OK to forward this message to this list;
> that might be more helpful than me saying "what do you mean ?  the
> documentation's perfectly clear ...".
>

I posted this to comp.lang.lisp recently; perhaps the list can amend it 
where necessary to correct or improve it:

[...a little bit of intro and context snipped...]

The full instructions, including where to get the sources and other 
files you need, are kind of long, but the actual sequence of steps to 
rebuild OpenMCL isn't bad. Just to provide context for the instructions 
below, the actual commands to rebuild are (replacing "/path/to/ccl" 
with wherever you actually put the ccl directory on your system):

     $ cd /path/to/ccl

     $ cvs update

     $ cd lisp-kernel/darwin

     $ make

     $ cd ../..

     $ export CCL_DEFAULT_DIRECTORY=/path/to/ccl

     $ scripts/openmcl

     ? (ccl::xload-level-0)

     ? (ccl::compile-ccl)

     ? (quit)

     $ ./dppccl ppc-boot.image

     ? (save-application "dppccl.image")

The full instructions for building OpenMCL from the latest cvs sources 
are:

1. Get the binaries. In a later stage you'll need the built image from 
the binary distribution in order to bootstrap the new version of lisp, 
so download the binary distribution from (watch out for line-wrapping 
in long lines below):

http://clozure.com/openmcl/ftp/openmcl-darwinppc-bin-0.14.1-p1.tar.gz

Unpack it somewhere convenient. All you need from it is the file 
ccl/dppccl.image, which you'll use later to bootstrap a new lisp.

2. Get the latest sources from cvs. Put them some place convenient; I 
keep them in /usr/local/openmcl:

     $ cvs -d :pserver:cvs at clozure.com:/usr/local/tmpcvs/ccl-0.14 \
       login

(enter "cvs" when prompted for a password)

     $ cvs -d :pserver:cvs at clozure.com:/usr/local/tmpcvs/ccl-0.14 \
       get ccl

These instructions download the "ccl" directory that contains the 
OpenMCL sources.

3. Download the foreign function interface databases from:

    http://openmcl.clozure.com/FTP/jaguar-interfaces.tar.gz

    Unpack them into your copy of the openmcl sources. The tarfile
    unpacks a copy into the "ccl" directory, so you can cd into the
    directory that contains "ccl" and unpack the tar archive; the
    interface databases will then be unpacked into the proper place.
    For example, if you checked out the cvs sources to

      /usr/local/ccl

    ...and you downloaded the interface databases to

      /tmp/jaguar-interfaces.tar.gz

    ... then you could do:

      $ cd /usr/local

      $ tar zxvf /tmp/jaguar-interfaces.tar.gz

    ... and the interfaces would end up in the right place.


4. Build the kernel:

    - cd into ccl/lisp-kernel/darwin

    - execute "make" to make the kernel

5. Compile OpenMCL:

    - cd ../.. (back into the "ccl" directory)

    - copy the image file from the binary distribution
      that you downloaded earlier, so that you can start
      the newly-built kernel. Put it in the ccl directory
      where you just used "make" to rebuild the kernel.
      After this step, you should have in the "ccl" directory
      both a "dppccl" file and a "dppccl.image" file.

    - run the new lisp kernel. Set the CCL_DEFAULT_DIRECTORY
      environment variable, then use the openmcl script to
      launch:

        (Assuming your shell is bash:)

        $ export CCL_DEFAULT_DIRECTORY=/path/to/ccl

        $ cd /path/to/ccl

        $ ./scripts/openmcl

      The kernel should find the image file and
      run, depositing you at the openmcl prompt:

Welcome to OpenMCL Version (Beta: Darwin) 0.14.1-p1!
?

    - from the opencml prompt, evaluate

       ? (ccl::xload-level-0)

      to load the code needed by the compiler

    - from the openmcl prompt, evaluate

       ? (ccl::compile-ccl)

      to compile the sources

6. Build and save the OpenMCL image:

    - quit from OpenMCL:

       ? (quit)

    You'll find that the preceding process built a new image
    in the "ccl" directory, called "ppc-boot.image".

    - launch the openmcl kernel with the new boot image:

       $ ./dppccl ppc-boot.image

    The lisp loads the fasl files created by the previous
    compile step.

    - save a new lisp image (replacing the one you used to
      compile and build the boot image):

       ? (save-application "dppccl.image")

    Openmcl saves the image file and quits.

    - To test the results, run openmcl:

       $ ./scripts/openmcl

Welcome to OpenMCL Version (Beta: Darwin) 0.14.1-p1!
?



At this point you have a complete new version of OpenMCL, built from 
the latest sources. At any time in the future  you can rebuild with the 
latest changes by repeating the commands:

     $ cd /path/to/ccl

     $ cvs update

     $ cd lisp-kernel/darwin

     $ make

     $ cd ../..

     $ export CCL_DEFAULT_DIRECTORY=/path/to/ccl

     $ scripts/openmcl

     ? (ccl::xload-level-0)

     ? (ccl::compile-ccl)

     ? (quit)

     $ ./dppccl ppc-boot.image

     ? (save-application "dppccl.image")





More information about the Openmcl-devel mailing list