... | @@ -14,8 +14,7 @@ scheme of things, and give you a couple of examples. |
... | @@ -14,8 +14,7 @@ scheme of things, and give you a couple of examples. |
|
|
|
|
|
|
|
|
|
In order to build CMU CL, you will need:
|
|
In order to build CMU CL, you will need:
|
|
```
|
|
|
|
#!html
|
|
|
|
<ol type="a">
|
|
<ol type="a">
|
|
<li> A working CMU CL binary.
|
|
<li> A working CMU CL binary.
|
|
<p>There is no way around this requirement!
|
|
<p>There is no way around this requirement!
|
... | @@ -39,7 +38,7 @@ In order to build CMU CL, you will need: |
... | @@ -39,7 +38,7 @@ In order to build CMU CL, you will need: |
|
repository.</p>
|
|
repository.</p>
|
|
</li>
|
|
</li>
|
|
</ol>
|
|
</ol>
|
|
```
|
|
|
|
If you want to build CMU CL's Motif interface/toolkit, you'll need a
|
|
If you want to build CMU CL's Motif interface/toolkit, you'll need a
|
|
working version of the Motif libraries, either true-blue OSF/Motif, or
|
|
working version of the Motif libraries, either true-blue OSF/Motif, or
|
|
[OpenMotif](http://www.openmotif.org), or [LessTif](http://www.lestif.org). The code
|
|
[OpenMotif](http://www.openmotif.org), or [LessTif](http://www.lestif.org). The code
|
... | @@ -48,22 +47,24 @@ Motif probably works as well. |
... | @@ -48,22 +47,24 @@ Motif probably works as well. |
|
|
|
|
|
## Setting up a build environment
|
|
## Setting up a build environment
|
|
|
|
|
|
```
|
|
|
|
#!html
|
|
|
|
<ol>
|
|
<ol>
|
|
<li> Create a base directory and change to it
|
|
<li> Create a base directory and change to it
|
|
<pre>
|
|
<pre>
|
|
|
|
mkdir cmucl ; cd cmucl
|
|
</pre>
|
|
</pre>
|
|
</li>
|
|
</li>
|
|
<li> Fetch the sources and put them into the base directory
|
|
<li> Fetch the sources and put them into the base directory
|
|
<pre>
|
|
<pre>
|
|
|
|
tar xzf /tmp/cmucl-source.tar.gz
|
|
</pre> <p> or, if you want to use the git sources directly:</p>
|
|
</pre> <p> or, if you want to use the git sources directly:</p>
|
|
<pre>
|
|
<pre>
|
|
|
|
git clone git://common-lisp.net/projects/cmucl/cmucl.git
|
|
</pre> <p>Whatever you do, the sources must be in a directory named <code>src</code>
|
|
</pre> <p>Whatever you do, the sources must be in a directory named <code>src</code>
|
|
|
|
|
|
</li>
|
|
</li>
|
|
</ol>
|
|
</ol>
|
|
```
|
|
|
|
That's it, you are now ready to build CMU CL.
|
|
That's it, you are now ready to build CMU CL.
|
|
|
|
|
|
## A quick guide for simple builds
|
|
## A quick guide for simple builds
|
... | @@ -72,8 +73,7 @@ We recommend that you read all of this document, but in case you don't |
... | @@ -72,8 +73,7 @@ We recommend that you read all of this document, but in case you don't |
|
want to do that and in case you know, somehow, that the version of
|
|
want to do that and in case you know, somehow, that the version of
|
|
CMUCL you are building from will build the sources you have, here is a
|
|
CMUCL you are building from will build the sources you have, here is a
|
|
quick guide.
|
|
quick guide.
|
|
```
|
|
|
|
#!html
|
|
|
|
<ol type="a">
|
|
<ol type="a">
|
|
<li> Simple builds
|
|
<li> Simple builds
|
|
<p> Use this to build from a version of CMUCL that is very close to the
|
|
<p> Use this to build from a version of CMUCL that is very close to the
|
... | @@ -118,7 +118,7 @@ quick guide. |
... | @@ -118,7 +118,7 @@ quick guide. |
|
described below.</p>
|
|
described below.</p>
|
|
</li>
|
|
</li>
|
|
</ol>
|
|
</ol>
|
|
```
|
|
|
|
|
|
|
|
How do you know which of the three options above apply? The easiest
|
|
How do you know which of the three options above apply? The easiest
|
|
way is to look in `src/bootfiles/<version>/*` for boot files. If the
|
|
way is to look in `src/bootfiles/<version>/*` for boot files. If the
|
... | @@ -138,8 +138,7 @@ Building CMU CL can happen in one of two ways: Normal recompilation, |
... | @@ -138,8 +138,7 @@ Building CMU CL can happen in one of two ways: Normal recompilation, |
|
and cross-compilation. We'll first look at normal recompilation:
|
|
and cross-compilation. We'll first look at normal recompilation:
|
|
|
|
|
|
The recompilation process basically consists of 4 phases/parts:
|
|
The recompilation process basically consists of 4 phases/parts:
|
|
```
|
|
|
|
#!html
|
|
|
|
<ol type="a">
|
|
<ol type="a">
|
|
<li> Compiling the lisp files that make up the standard kernel.
|
|
<li> Compiling the lisp files that make up the standard kernel.
|
|
<p>This happens in your current CMU CL process, using your current
|
|
<p>This happens in your current CMU CL process, using your current
|
... | @@ -218,12 +217,11 @@ The recompilation process basically consists of 4 phases/parts: |
... | @@ -218,12 +217,11 @@ The recompilation process basically consists of 4 phases/parts: |
|
file is dumped out.</p>
|
|
file is dumped out.</p>
|
|
</li>
|
|
</li>
|
|
</ol>
|
|
</ol>
|
|
```
|
|
|
|
We're not quite done yet. This produces just a basic lisp.core.
|
|
We're not quite done yet. This produces just a basic lisp.core.
|
|
To complete the build so that you something similar to what the
|
|
To complete the build so that you something similar to what the
|
|
releases of CMUCL do, there are a few more steps:
|
|
releases of CMUCL do, there are a few more steps:
|
|
```
|
|
|
|
#!html
|
|
|
|
<ol type="a">
|
|
<ol type="a">
|
|
<li> Build the utilities like Gray streams, simple streams, CLX, CLM,
|
|
<li> Build the utilities like Gray streams, simple streams, CLX, CLM,
|
|
and Hemlock. Use the bin/build-utils.sh script for this, as
|
|
and Hemlock. Use the bin/build-utils.sh script for this, as
|
... | @@ -233,7 +231,7 @@ releases of CMUCL do, there are a few more steps: |
... | @@ -233,7 +231,7 @@ releases of CMUCL do, there are a few more steps: |
|
explained below.
|
|
explained below.
|
|
</li>
|
|
</li>
|
|
</ol>
|
|
</ol>
|
|
```
|
|
|
|
With these tarfiles, you can install them anywhere. The contents of
|
|
With these tarfiles, you can install them anywhere. The contents of
|
|
the tarfiles will be the same as the snapshots and releases of CMUCL.
|
|
the tarfiles will be the same as the snapshots and releases of CMUCL.
|
|
|
|
|
... | @@ -254,12 +252,14 @@ the scripts included with this little text? |
... | @@ -254,12 +252,14 @@ the scripts included with this little text? |
|
|
|
|
|
## Overview of the included build scripts
|
|
## Overview of the included build scripts
|
|
|
|
|
|
`bin/build.sh [-123obvuBCU?]`::
|
|
* `bin/build.sh [-123obvuBCU?]`
|
|
|
|
|
|
This is the main build script. It essentially calls the other build
|
|
This is the main build script. It essentially calls the other build
|
|
scripts described below in the proper sequence to build cmucl from an
|
|
scripts described below in the proper sequence to build cmucl from an
|
|
existing binary of cmucl.
|
|
existing binary of cmucl.
|
|
|
|
|
|
`bin/create-target.sh target-directory [lisp-variant [motif-variant]]`::
|
|
* `bin/create-target.sh target-directory [lisp-variant [motif-variant]]`
|
|
|
|
|
|
This script creates a new target directory, which is a shadow of the
|
|
This script creates a new target directory, which is a shadow of the
|
|
source directory, that will contain all the files that are created by
|
|
source directory, that will contain all the files that are created by
|
|
the build process. Thus, each target's files are completely separate
|
|
the build process. Thus, each target's files are completely separate
|
... | @@ -296,14 +296,15 @@ sample setenv.lisp includes a set of features that should work for the |
... | @@ -296,14 +296,15 @@ sample setenv.lisp includes a set of features that should work for the |
|
intended configuration. Note also that some adding or removing some
|
|
intended configuration. Note also that some adding or removing some
|
|
features may require a cross-compile instead of a normal compile.
|
|
features may require a cross-compile instead of a normal compile.
|
|
|
|
|
|
`bin/clean-target.sh [-l] target-directory [more dirs]`::
|
|
* `bin/clean-target.sh [-l] target-directory [more dirs]`
|
|
|
|
|
|
Cleans the given target directory, so that all created files will be
|
|
Cleans the given target directory, so that all created files will be
|
|
removed. This is useful to force recompilation. If the -l flag is
|
|
removed. This is useful to force recompilation. If the -l flag is
|
|
given, then the C runtime is also removed, including all the lisp
|
|
given, then the C runtime is also removed, including all the lisp
|
|
executable, any lisp cores, all object files, lisp.nm, internals.h,
|
|
executable, any lisp cores, all object files, lisp.nm, internals.h,
|
|
and the config file.
|
|
and the config file.
|
|
|
|
|
|
`bin/build-world.sh target-directory [build-binary] [build-flags...]`::
|
|
* `bin/build-world.sh target-directory [build-binary] [build-flags...]`
|
|
Starts a complete world build for the given target, using the lisp
|
|
Starts a complete world build for the given target, using the lisp
|
|
binary/core specified as a build host. The recompilation step will
|
|
binary/core specified as a build host. The recompilation step will
|
|
only recompile changed files, or files for which the fasl files are
|
|
only recompile changed files, or files for which the fasl files are
|
... | @@ -313,12 +314,14 @@ features may require a cross-compile instead of a normal compile. |
... | @@ -313,12 +314,14 @@ features may require a cross-compile instead of a normal compile. |
|
you'll have to use the rebuild-lisp.sh script, and then restart the
|
|
you'll have to use the rebuild-lisp.sh script, and then restart the
|
|
world build process with build-world.sh
|
|
world build process with build-world.sh
|
|
|
|
|
|
`bin/rebuild-lisp.sh target-directory`::
|
|
* `bin/rebuild-lisp.sh target-directory`
|
|
|
|
|
|
This script will force a complete recompilation of the C runtime code
|
|
This script will force a complete recompilation of the C runtime code
|
|
of CMU CL (aka the lisp executable). Doing this will necessitate
|
|
of CMU CL (aka the lisp executable). Doing this will necessitate
|
|
building a new kernel.core file, using build-world.sh.
|
|
building a new kernel.core file, using build-world.sh.
|
|
|
|
|
|
`bin/load-world.sh target-directory version`::
|
|
* `bin/load-world.sh target-directory version`
|
|
|
|
|
|
This will finish the CMU CL rebuilding process, by loading the
|
|
This will finish the CMU CL rebuilding process, by loading the
|
|
remaining compiled files generated in the world build process into the
|
|
remaining compiled files generated in the world build process into the
|
|
kernel.core file, that also resulted from that process, creating the
|
|
kernel.core file, that also resulted from that process, creating the
|
... | @@ -332,13 +335,15 @@ ISO8601 format is often a good idea, e.g. "18d+ 2002-05-06" for a |
... | @@ -332,13 +335,15 @@ ISO8601 format is often a good idea, e.g. "18d+ 2002-05-06" for a |
|
binary that is based on sources current on the 6th May, 2002, which is
|
|
binary that is based on sources current on the 6th May, 2002, which is
|
|
post the 18d release.
|
|
post the 18d release.
|
|
|
|
|
|
`bin/build-utils.sh target-directory`::
|
|
* `bin/build-utils.sh target-directory`
|
|
|
|
|
|
This script will build auxiliary libraries packaged with CMU CL,
|
|
This script will build auxiliary libraries packaged with CMU CL,
|
|
including CLX, CMUCL/Motif, the Motif debugger, inspector, and control
|
|
including CLX, CMUCL/Motif, the Motif debugger, inspector, and control
|
|
panel, and the Hemlock editor. It will use the lisp executable and
|
|
panel, and the Hemlock editor. It will use the lisp executable and
|
|
core of the given target.
|
|
core of the given target.
|
|
|
|
|
|
`bin/make-dist.sh [-bg] [-G group] [-O owner] target-directory version arch os`::
|
|
* `bin/make-dist.sh [-bg] [-G group] [-O owner] target-directory version arch os`
|
|
|
|
|
|
This script creates both main and extra distribution tarballs from the
|
|
This script creates both main and extra distribution tarballs from the
|
|
given target directory, using the make-main-dist.sh and
|
|
given target directory, using the make-main-dist.sh and
|
|
make-extra-dist.sh scripts. The result will be two tar files. One
|
|
make-extra-dist.sh scripts. The result will be two tar files. One
|
... | @@ -381,7 +386,8 @@ simple streams. |
... | @@ -381,7 +386,8 @@ simple streams. |
|
|
|
|
|
This is intended to be run from `make-dist.sh`.
|
|
This is intended to be run from `make-dist.sh`.
|
|
|
|
|
|
`bin/make-extra-dist.sh target-directory version arch os`::
|
|
* `bin/make-extra-dist.sh target-directory version arch os`
|
|
|
|
|
|
This is script is not normally invoked by the user; make-dist will do
|
|
This is script is not normally invoked by the user; make-dist will do
|
|
it appropriately.
|
|
it appropriately.
|
|
|
|
|
... | @@ -391,7 +397,7 @@ all the stuff that is normally included in official extra release |
... | @@ -391,7 +397,7 @@ all the stuff that is normally included in official extra release |
|
tarballs, i.e. the auxiliary libraries such as CLX, CLM, and Hemlock.
|
|
tarballs, i.e. the auxiliary libraries such as CLX, CLM, and Hemlock.
|
|
|
|
|
|
|
|
|
|
`cross-build-world.sh target-directory cross-directory cross-script [build-binary] [build-flags...]`::
|
|
* `cross-build-world.sh target-directory cross-directory cross-script [build-binary] [build-flags...]`
|
|
This is a script that can be used instead of build-world.sh for
|
|
This is a script that can be used instead of build-world.sh for
|
|
cross-compiling CMUCL. In addition to the arguments of build-world.sh
|
|
cross-compiling CMUCL. In addition to the arguments of build-world.sh
|
|
it takes two further required arguments: The name of a directory that
|
|
it takes two further required arguments: The name of a directory that
|
... | @@ -485,8 +491,7 @@ to the CMU CL sources necessitates some form of bootstrapping, so that |
... | @@ -485,8 +491,7 @@ to the CMU CL sources necessitates some form of bootstrapping, so that |
|
binaries built from earlier sources can compile the sources containing
|
|
binaries built from earlier sources can compile the sources containing
|
|
that change. There are two forms of boostrapping that can be
|
|
that change. There are two forms of boostrapping that can be
|
|
required:
|
|
required:
|
|
```
|
|
|
|
#!html
|
|
|
|
<ol style="list-style-type:lower-alpha">
|
|
<ol style="list-style-type:lower-alpha">
|
|
<li> Bootfiles
|
|
<li> Bootfiles
|
|
<p>The maintainers try to make bootfiles available, that allow going
|
|
<p>The maintainers try to make bootfiles available, that allow going
|
... | @@ -532,7 +537,7 @@ required: |
... | @@ -532,7 +537,7 @@ required: |
|
the changed contents thereof with your normal cross-script.</p>
|
|
the changed contents thereof with your normal cross-script.</p>
|
|
</li>
|
|
</li>
|
|
</ol>
|
|
</ol>
|
|
```
|
|
|
|
## Step-by-Step Example of Cross-Compiling
|
|
## Step-by-Step Example of Cross-Compiling
|
|
|
|
|
|
This gives a step-by-step example of cross-compiling a sparc-v8 build
|
|
This gives a step-by-step example of cross-compiling a sparc-v8 build
|
... | @@ -543,8 +548,7 @@ So, first get a recent sparc-v9 build. It's best to get a version |
... | @@ -543,8 +548,7 @@ So, first get a recent sparc-v9 build. It's best to get a version |
|
that is up-to-date with the sources. Otherwise, you may also need to
|
|
that is up-to-date with the sources. Otherwise, you may also need to
|
|
add a bootstrap file to get any bootfiles to make your lisp
|
|
add a bootstrap file to get any bootfiles to make your lisp
|
|
up-to-date with the current sources.
|
|
up-to-date with the current sources.
|
|
```
|
|
|
|
#!html
|
|
|
|
<ol>
|
|
<ol>
|
|
<li> Select a directory for the cross-compiler and compiled target:
|
|
<li> Select a directory for the cross-compiler and compiled target:
|
|
|
|
|
... | @@ -612,7 +616,7 @@ up-to-date with the current sources. |
... | @@ -612,7 +616,7 @@ up-to-date with the current sources. |
|
<pre>
|
|
<pre>
|
|
xtarget/lisp/lisp -noinit
|
|
xtarget/lisp/lisp -noinit
|
|
</pre>
|
|
</pre>
|
|
```
|
|
|
|
However, this lisp will be missing some functionality like PCL. You
|
|
However, this lisp will be missing some functionality like PCL. You
|
|
probably now want to use the compiler to rebuild everything once
|
|
probably now want to use the compiler to rebuild everything once
|
|
again. Just follow the directions for a normal build, and use
|
|
again. Just follow the directions for a normal build, and use
|
... | @@ -628,8 +632,7 @@ to x86/linux. |
... | @@ -628,8 +632,7 @@ to x86/linux. |
|
|
|
|
|
To simplify things, we assume that both platforms have access to the
|
|
To simplify things, we assume that both platforms have access to the
|
|
same file system, via NFS or something else.
|
|
same file system, via NFS or something else.
|
|
```
|
|
|
|
#!html
|
|
|
|
<ol>
|
|
<ol>
|
|
<li> As above, we need to create directories for the cross-compiler and
|
|
<li> As above, we need to create directories for the cross-compiler and
|
|
compiled target. We assume we are on ppc/darwin. So, when running
|
|
compiled target. We assume we are on ppc/darwin. So, when running
|
... | @@ -665,7 +668,7 @@ same file system, via NFS or something else. |
... | @@ -665,7 +668,7 @@ same file system, via NFS or something else. |
|
<pre>
|
|
<pre>
|
|
</pre>
|
|
</pre>
|
|
</ol>
|
|
</ol>
|
|
```
|
|
|
|
At this point, you will have a shiny new lisp on the new platform.
|
|
At this point, you will have a shiny new lisp on the new platform.
|
|
Since it's missing PCL, you will need to do at least one normal build
|
|
Since it's missing PCL, you will need to do at least one normal build
|
|
to get PCL included. This is also a good check to see if everything
|
|
to get PCL included. This is also a good check to see if everything
|
... | | ... | |