-- Update Sept 29, 2014 -- Please read regarding installing Clasp
If you have questions come ask them on IRC at freenode #clasp
Clasp is a Common Lisp implementation that interoperates with C++ and uses LLVM for just-in-time (JIT) compilation to native code.
See http://drmeister.wordpress.com/2014/09/18/announcing-clasp/ for the announcement.
Clasp is not yet a full ANSI compliant Common Lisp - if you find differences between Clasp and the Common Lisp standard they are considered bugs in Clasp and please feel free to report them.
Libraries that clasp depends on can be obtained using the repository: externals-clasp
You must build externals-clasp prior to building Clasp
Clasp uses a lot of leading edge C++11 language features and so it needs a minimum of Clang 3.5 or gcc 4.8 to compile externals-clasp. externals-clasp installs a local version of Clang 3.6 that is used to compile Clasp.
Systems that Clasp is known to build on |
---|
OS X 10.9.5 using Xcode 6.0.1 |
Debian Jessie(also known as Debian-Testing) - after apt-get ncurses-dev, libbz2-dev (for externals-clasp) |
Debian Sid(also known as Debian-Unstable) |
Gentoo Linux(note 1) |
Note 1: See https://gist.github.com/jasom/5b7b40debea3558cf09e
If you experience problems with the systems above please submit an issue here or come see us on #clasp on irc.freenode.net
Systems that Clasp had problems building on |
---|
Debian Wheezy with with gcc 4.9!!! See note below |
Note: We ran into a problem installing on a Debian Wheezy system upgraded to gcc 4.9. I'm doing some things to try and get around this.
To build Clasp from within the top level directory do the following.
- You need to down/build the externals-clasp repository
- it contains all of the external libraries that Clasp depends on and it downloads the specific version of LLVM 3.6 that Clasp needs.
-
Copy local.config.darwin or local.config.linux to local.config depending on your system
-
Edit local.config and configure it for your system
As in externals-clasp the following configuration variables are important.
Variable | Description |
---|---|
CLASP_BUILD_TARGET_DIR | This defines where make will put the Clasp application |
I use $HOME/local/clasp | |
EXTERNALS_BUILD_TARGET_DIR | This defines where Clasp build will find the externals-clasp libraries |
I use $HOME/local/externals-clasp | |
TARGET_OS | Currently either linux or darwin |
PJOBS | The number of processors you have available to build with |
CXXFLAGS | If you set this export CXXFLAGS = -v it will print more debugging info during build |
- Type: make to build mps and boehm versions of Clasp
or type: make boostbuildv2-build followed by
either make clasp-boehm to make the boehm version of Clasp
or make clasp-mps to make the MPS version of Clasp
If you see the error "fatal error: 'core_scrape_flag.h' file not found" just stop the build with control-C and type "make" again. It will sort itself out. It's something to do with the order things are built in but I haven't tracked it down yet.
-
Install the directory in $CLASP_BUILD_TARGET_DIR/MacOS or $CLASP_BUILD_TARGET_DIR/bin (from local.config) in your path
then type: clasp_mps_o to start the Lisp REPL of the MPS version of Clasp
or type: clasp_boehm_o to start the Lisp REPL of the Boehm version of Clasp -
Type: (print "Hello world") in the REPL and away you go (more documentation to follow)
If you want to install the libraries separately its more complicated because Clasp requires a particular version of LLVM/Clang3.6 which hasn't been officially released yet but is present in externals-clang.
This should all become easier in a couple of months when LLVM/Clang3.6 is released.
These are the requirements as of Sep 28, 2014.
LLVM/clang 3.5 COMPILER (on some systems Clang3.6 will work but there can be problems with installed header files)
Boost build v2
boost libraries ver 1.55
Boehm 7.2
gmp-6.0.0
expat-2.0.1
zlib-1.2.8
readline-6.2
Clasp was supported by the Defense Threat Reduction Agency (DOD-DTRA) (HDTRA1-09-1-0009) the National Institutes of Health (NIH/NIGMS Grant number: 2R01GM067866-07A2) and the National Science Foundation (Grant number: 1300231)