Installing Weblocks

Update: Aug 2, 2008 Since writing this I’ve instead opted to work with Pico Lisp, this is not really a criticism of Weblocks per se, it has more to do with a general frustration with Common Lisp.

Update: Jan 21, 2008

Success!!

I’ve now upgraded to Gutsy and installed sbcl v. 1.0.12 by following the instructions here: Installing SBCL. (I chose the default install dir.)

After the installation I had to manually edit the .bashrc of root and myself by adding the following at the end of the files:

export PATH=$PATH:/usr/local/bin/sbcl:

Next I created the text file /ect/sbclrc and put this in it:

(require ‘asdf)
(push #p”/opt/cl-weblocks/” asdf:*central-registry*)

Cding to /opt and getting the newest version of weblocks by executing the darcs command described below.

After that I had to asdf all the dependencies as described below by putting the install commands in a file and doing (load “install_file.lisp”) in the REPL.

Finally after running the load-op and start stuff in the REPL i checked localhost:8080 and voila! The intro page showing in all it’s glory!

I’m not 100% but I doubt that a Gutsy install is really required, the right version of SBCL is probably all that is needed and the reason for all my earlier problems.

————————————–

Update Jan 19, 2008:
I found this snippet:

With Ubuntu 7.10 and sbcl 1.0.11 everything works as a charm for me.

Over at the Weblocks google group.

So I’m gonna upgrade to Gutsy and that version of sbcl and try again. I’ve been trying to setup UCW with mod_lisp lately and that was not encouraging, I’ll recap that experience in a future post. That nightmare combined with the above information is enough encouragement to try Weblocks again on a new setup.

————————————–

In my earlier post dealing with clisp and CUSP I said I would try to get some small web application up and running. Today I tried to get Weblocks working on Ubuntu/Debian.

Some install instructions can be found on the weblocks site, but not the whole story. The rest can be found in this tutorial on how to set SBCL up on a mac.

Anyway, the above two documents got me started with my Linux install like this:

apt-get install sbcl

And in the REPL or an included file:

(require 'asdf)
(require 'asdf-install)
(asdf-install:install :closer-mop)
(asdf-install:install :metatilities)
(asdf-install:install :hunchentoot)
(asdf-install:install :cl-who) 
(asdf-install:install :cl-ppcre)
(asdf-install:install :cl-json)
(asdf-install:install :puri)
(asdf-install:install :rt)
(asdf-install:install :tinaa)
(asdf-install:install :md5)
(asdf-install:install :cl-fad)
(asdf-install:install :fare-matcher)
(asdf-install:install :cl-cont)
(SB-EXT:QUIT)

You get a lot of some kind of error, however choosing the “skip GPG check” alternative overcomes them. At one point I got a different error that I was able to get past by choosing a “continue” option. Unfortunately a few unrecoverable errors showed up, for instance when trying to install metatilities, I got the message “The value NIL is not of type REAL”.

I hoped metatilities wouldn’t be essential to getting something simple up and running so I continued with the install anyway. I downloaded darcs and proceeded with the install of Weblocks itself by cding to the directory where I wanted weblocks:

darcs get http://common-lisp.net/project/cl-weblocks/darcs/cl-weblocks

Followed by:

(require 'asdf)
(push #p"/opt/cl-weblocks/scripts/" asdf:*central-registry*)
(push #p"/opt/cl-weblocks/src/" asdf:*central-registry*)
(push #p"/opt/cl-weblocks/test/" asdf:*central-registry*)
(asdf:operate 'asdf:load-op 'weblocks)

Alas the above load-op command complains that metatilities is missing. When I’ve recovered my strength I might try some other web framework that won’t require as many dependencies.

I’m starting to get a sinking feeling, maybe it’s just too early to try clisp outside it’s more normal settings?

Totally off topic: Darcs seems to be a very nice code-handling system. I’ll definitely take a more thorough look at it, at least something positive came out of all this.

Related Posts

Tags: , , , , ,