These are the steps I followed to get Weblocks working on OS X 10.5 (Leopard). Note that you should have Mercurial, CVS, and Darcs installed.
- Install SBCL with multithread support. The multi-threaded part is important and not enabled by default, and not doing it will result in a page that gives you an obscure error message that reads:
Socket error in "bind": EADDRINUSE (Address already in use)
To install SBCL with multithread support do the following:- Download the source for SBCL from http://www.sbcl.org/platform-table.html
- After unarchiving the source, in the root directory of the source, create a file called customize-target-features.lisp
- In that file add the following to enable threads when building SBCL:
(lambda (features) (flet ((enable (x) (pushnew x features)) (disable (x) (setf features (remove x features)))) ;;; Threading support, available only on x86/x86-64 Linux, x86 Solaris ;;; and x86 Mac OS X (experimental). (enable :sb-thread))) - Compile SBCL with "sh make.sh" from your shell (this takes a while)
- Install SBCL with sh install.sh
- Get the Weblocks source with
You will need Mercurial.hg clone http://www.bitbucket.org/skypher/weblocks-stable/. - Add commands in your .sbclrc file to require asdf, asdf-install, and push your Weblocks source into the ASDF central registry. This file should be located in your home directory. If it does not exist you will need to create it. For me, the file looks like this:
(require 'asdf) (require 'asdf-install) (push #p"/Users/saikat/Development/Source/weblocks/" asdf:*central-registry*)
- Install ASDF-System-Connections. This wasn't listed anywhere but a lot of the libraries that Weblocks depends on complained if I didn't have this installed. This step may not be necessary - I haven't tried without it. I couldn't get ASDF-System-Connections to install by just doing (asdf-install:install :asdf-system-connections). I downloaded the source and installed it using asdf-install. To do this, get the source as a gzipped tar file from here. Then use asdf-install to install it from your local directory as described here
- Install all the dependencies listed here. Some notes about this before you begin:
- Before installing hunchentoot, I had to install cl-json, metatilities-base, and cl+ssl by hand (asdf-install by name failed on these). For cl-json, I got the source from here. You will need darcs to get it. For metatalities-base, I did this in my shell to get the source:
$ wget http://common-lisp.net/project/metatilities-base/metatilities-base.tar.gz
For cl+ssl, I got the source from here. You will need CVS to get it. Then I installed all of these using ASDF as is described in step 4. - If you get the following message at any point during the install process you should just CONTINUE (0):
debugger invoked on a ASDF-INSTALL::KEY-NOT-TRUSTED: GPG warns that the key id 0xNIL () is not fully trusted Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Install the package anyway 1: [SKIP-GPG-CHECK] Don't check GPG signature for this package 2: [RETRY ] Retry installation 3: [ABORT ] Exit debugger, returning to top level. (ASDF-INSTALL::VERIFY-GPG-SIGNATURE/STRING "-----BEGIN PGP SIGNATURE-----
- SBCL-port fails to compile. When this happens, simply ACCEPT it (the option that tells you to accept it as if it worked).
- Before installing hunchentoot, I had to install cl-json, metatilities-base, and cl+ssl by hand (asdf-install by name failed on these). For cl-json, I got the source from here. You will need darcs to get it. For metatalities-base, I did this in my shell to get the source:
You should now be able to follow the instructions in the user's manual to start up weblocks.
Comments (5)
1. The version of parenscript I got (which I think is the newest one) has the function symbol-to-js-string, but not the function symbol-to-js, and various dependencies seem to require the latter. I fixed this by adding (defun symbol-to-js (symbol) (symbol-to-js-string symbol)) to parenscript/src/utils.lisp.
2. The start-weblocks-demo function was starting the weblocks demo twice, and therefore not working because it would tell it couldn't start the demo because the demo was already running. The function start-weblocks-demo included the lines (apply #'start-weblocks args) and (start-webapp 'weblocks-demo). It worked for me when I commented out the second of those lines.
I'm not sure at all that my solutions to these problems were the best ones, but I've played around with the demo and it seems to be working fine.
Leave a comment...