Hello group,
I'm new to LISP and i'm trying to set up a basic "Hello World"-website with Hunchentoot. I'm using SBCL 1.0.6 on linux(ubuntu gutsy) and installed hunchentoot via asdf-install. Then i registered a file handler and startet the server: (require :hunchentoot) (setq hunchentoot:*dispatch-table* (list (hunchentoot:create-static-file-dispatcher-and-handler "/ htt" "/home/kim/httest.html"))) (defvar *ht-server* (hunchentoot:start-server :port 3456))
The problem: No page is displayed when I tell my browser to go to "localhost:3456/htt". Telneting to port 3456 always results in the connection being closed immediately without an error message. I googled quite a lot and tried the following to get more information:
(setq hunchentoot:*SHOW-LISP-ERRORS-P* t) (setq hunchentoot:*SHOW-LISP-BACKTRACES-P* t) (setq hunchentoot:*catch-errors-p* nil)
Now each time I try to connect to hunchentoot, I get the following error message in the REPL: debugger invoked on a UNDEFINED-FUNCTION in thread #<THREAD "hunchentoot-worker-4" {B2271F9}>: The function (SETF HUNCHENTOOT::FLEXI-STREAM-BOUND) is undefined.
I already sent this to comp.lang.lisp (http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/383c828c9...) and the nice people there helped me to ensure that all the required components are installed and loaded. I also tried the example from http://weitz.de/hunchentoot/#example and got the same error message. I'm pretty lost here, so I'd really appreciate any help. Thanks in advance Kim
Hi Kim,
do you have the latest version of Flexi-Streams and all other dependent libraries installed? I have flexi-streams-0.13.1 - it does indeed have the FLEXI-STREAM-BOUND function and it also exports the function properly. It is my guess that you have an older version.
If you want to save some time, you may want to check out svn://svn.bknr.net/svn/trunk/thirdparty to get running quickly (currently, this requires 141MB).
-Hans
2008/4/9, Kim Stebel kimstebel@gmx.de:
Hello group,
I'm new to LISP and i'm trying to set up a basic "Hello World"-website with Hunchentoot. I'm using SBCL 1.0.6 on linux(ubuntu gutsy) and installed hunchentoot via asdf-install. Then i registered a file handler and startet the server: (require :hunchentoot) (setq hunchentoot:*dispatch-table* (list (hunchentoot:create-static-file-dispatcher-and-handler "/ htt" "/home/kim/httest.html"))) (defvar *ht-server* (hunchentoot:start-server :port 3456))
The problem: No page is displayed when I tell my browser to go to "localhost:3456/htt". Telneting to port 3456 always results in the connection being closed immediately without an error message. I googled quite a lot and tried the following to get more information:
(setq hunchentoot:*SHOW-LISP-ERRORS-P* t) (setq hunchentoot:*SHOW-LISP-BACKTRACES-P* t) (setq hunchentoot:*catch-errors-p* nil)
Now each time I try to connect to hunchentoot, I get the following error message in the REPL: debugger invoked on a UNDEFINED-FUNCTION in thread #<THREAD "hunchentoot-worker-4" {B2271F9}>: The function (SETF HUNCHENTOOT::FLEXI-STREAM-BOUND) is undefined.
I already sent this to comp.lang.lisp (http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/383c828c9...) and the nice people there helped me to ensure that all the required components are installed and loaded. I also tried the example from http://weitz.de/hunchentoot/#example and got the same error message. I'm pretty lost here, so I'd really appreciate any help. Thanks in advance Kim _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel
On Wed, 09 Apr 2008 22:11:02 +0200, "Kim Stebel" kimstebel@gmx.de wrote:
The function (SETF HUNCHENTOOT::FLEXI-STREAM-BOUND) is undefined.
As Hans already said, this very likely means that your version of FLEXI-STREAMS is too old. From what you posted to c.l.l, it looks as if you're using libraries distributed by Debian or Ubuntu or something like that which would be the reason.
To fix thix, you'll have to get rid of the Debian-installed libraries (to make sure they don't get in your way) and downloaded the latest versions from the appropriate places.
Sorry for the inconvenience, but if my analysis is correct, then this is really not an issue with the libraries but rather with your OS and its packaging system.
To fix thix, you'll have to get rid of the Debian-installed libraries (to make sure they don't get in your way) and downloaded the latest versions from the appropriate places.
Sorry for the inconvenience, but if my analysis is correct, then this is really not an issue with the libraries but rather with your OS and its packaging system.
Thanks for your reply. The problem is solved. I removed the ubuntu version of the library and just did (asdf-install:install :hunchentoot) again. Now it works fine. I agree that this is a problem with ubuntu, but shouldn't have asdf-install told me I don't have the right version? As I understand it, it's asdf-install's job to check dependencies before installing. Thanks again Kim
On Wed, 09 Apr 2008 23:19:48 +0200, "Kim Stebel" kimstebel@gmx.de wrote:
I agree that this is a problem with ubuntu, but shouldn't have asdf-install told me I don't have the right version? As I understand it, it's asdf-install's job to check dependencies before installing.
How is ASDF-INSTALL supposed to know about the Ubuntu libraries? You didn't expect it to scan your whole hard disk, did you?
Also, neither ASDF nor ASDF-INSTALL do any version checking AFAIK. They just check if the required libs are there.
On Wed, 09 Apr 2008 23:33:35 +0200, Edi Weitz edi@agharta.de wrote:
On Wed, 09 Apr 2008 23:19:48 +0200, "Kim Stebel" kimstebel@gmx.de wrote:
I agree that this is a problem with ubuntu, but shouldn't have asdf-install told me I don't have the right version? As I understand it, it's asdf-install's job to check dependencies before installing.
How is ASDF-INSTALL supposed to know about the Ubuntu libraries? You didn't expect it to scan your whole hard disk, did you?
Well the ubuntu-libs are installed to the standard sbcl dir and asdf-install did find them. But the lack of version checking.....anyway, it's working now.:)
On Wed, 09 Apr 2008 23:42:53 +0200, "Kim Stebel" kimstebel@gmx.de wrote:
Well the ubuntu-libs are installed to the standard sbcl dir
What I see here
http://groups.google.com/group/comp.lang.lisp/msg/33576069cdd71d23
is /usr/share/common-lisp/systems/ which is think is /not/ the "standard SBCL dir" (whatever that is) - AFAIK it's the directory created and used by c-l-c.
and asdf-install did find them.
No, ASDF found them. This is probably a bit more tricky than you think it is and you might want to read one of the online articles trying to explain ASDF and ASDF-INSTALL. (Note that I'm not trying to defend the ASDF-INSTALL design choices. I just think you might have wrong expectations.)
Kim Stebel wrote:
Hello group,
I'm new to LISP and i'm trying to set up a basic "Hello World"-website with Hunchentoot. I'm using SBCL 1.0.6 on linux(ubuntu gutsy) and installed hunchentoot via asdf-install.
Hi Kim,
In addition to what others have said, your version of SBCL is rather out of date. This happens a lot with the pre-packaged distributions you get from the various Linux sites.
I suggest you clean out your entire SBCL install, and go to the SBCL site and get the latest version. I recently asked a similar question on the SBCL mailing list, and a fellow named Brian gave me this advice:
I would recommend staying away from distribution packages for SBCL. Just download the latest binary from the web site, install it, and use it to compile the latest sources. It's relatively straightforward; the only thing that's even moderately tricky is building with threads. To do that, create a file named "customize-target-features.lisp" in the root of the SBCL sources containing something like:
(lambda (list) (cons :sb-thread list))
Then just build SBCL as usual ("sh make.sh").
It worked fine.
Once you have the latest SBCL, then reinstall ASDF-INSTALL and off you go.
You should also consider joining the SBCL mailing list (from their site). You'll find them very helpful if you have a problem.
On Wed, 2008-04-09 at 18:44 -0400, Jeffrey Straszheim wrote:
Kim Stebel wrote:
Hello group,
I'm new to LISP and i'm trying to set up a basic "Hello World"-website with Hunchentoot. I'm using SBCL 1.0.6 on linux(ubuntu gutsy) and installed hunchentoot via asdf-install.
Hi Kim,
In addition to what others have said, your version of SBCL is rather out of date. This happens a lot with the pre-packaged distributions you get from the various Linux sites.
I suggest you clean out your entire SBCL install, and go to the SBCL site and get the latest version. I recently asked a similar question on the SBCL mailing list, and a fellow named Brian gave me this advice:
I would recommend staying away from distribution packages for SBCL. Just download the latest binary from the web site, install it, and use it to compile the latest sources. It's relatively straightforward; the only thing that's even moderately tricky is building with threads. To do that, create a file named "customize-target-features.lisp" in the root of the SBCL sources containing something like: (lambda (list) (cons :sb-thread list)) Then just build SBCL as usual ("sh make.sh").
It worked fine.
Yes - but that's incredible overkill. What problem does this actually solve. Is there _any_ change in SBCLs between in, say, Ubuntu 7.10 and the current CVS version that changes the behaviour of SBCL or fixes prominent bugs? The only features I can think of are thread and unicode support.
The poroblems that usually pop up in mailing lists are almost allways related to old[1] versions of _libraries_ and the proper way to procede here would be to nagg the package maintainer ... Or - even better, learn the basics of package building on your prefered distribution and build your up-to-date local versions. I can only speak for Debian/Ubuntu here, but I maintain local versions of most of the CL libs I need for my projects and updating usually involves little more than a VC update and an 'debchange -ni' to update the package version.
And iff you feel generous you might even offer your packages to the Debian CL folks ...
Yust my 0.02 cents
Cheers, Ralf Mattes
On Thu, 10 Apr 2008 13:43:35 +0200, Ralf Mattes rm@seid-online.de wrote:
Yes - but that's incredible overkill. What problem does this actually solve. Is there _any_ change in SBCLs between in, say, Ubuntu 7.10 and the current CVS version that changes the behaviour of SBCL or fixes prominent bugs? The only features I can think of are thread and unicode support. The poroblems that usually pop up in mailing lists are almost allways related to old[1] versions of _libraries_ and the proper way to procede here would be to nagg the package maintainer ... Or - even better, learn the basics of package building on your prefered distribution and build your up-to-date local versions. I can only speak for Debian/Ubuntu here, but I maintain local versions of most of the CL libs I need for my projects and updating usually involves little more than a VC update and an 'debchange -ni' to update the package version.
And iff you feel generous you might even offer your packages to the Debian CL folks ...
Yust my 0.02 cents
Cheers, Ralf Mattes
I absolutely agree, espescially since 1.0.6 already has support for native threads and unicode. And 8.04 will be out soon anyway.