sbcl + aserve

Discussion of Common Lisp
Post Reply
sebastien_k
Posts: 5
Joined: Thu Apr 02, 2009 2:40 am

sbcl + aserve

Post by sebastien_k » Tue Jun 09, 2009 3:01 pm

I've downloaded Portable Allegro Serve from sourceforge page and tried to install it running "INSTALL.lisp" from SBCL, but i get an error:
Lock on package SB-EXT violated when setting fdefinition of
STRING-TO-OCTETS.
[Condition of type SYMBOL-PACKAGE-LOCKED-ERROR]
I continued compilation, ignoring this package lock, but then i got another error, which seems to relate to the previous:
Lock on package SB-EXT violated when setting the symbol-function
of WITHOUT-PACKAGE-LOCKS.
[Condition of type SYMBOL-PACKAGE-LOCKED-ERROR]
There were also some errors related with acl-compat, so i think this is a reason. But i still don't know how to resolve it.
I tried to install another version of aserve from Cliki, which was said to avoid some bugs, but it got the error:
#<UNPORTABLE-CL-SOURCE-FILE "acl-mp" {B0E9B59}>
[Condition of type ASDF:COMPILE-FAILED]
That was the same error i got with first instance of aserve.
What can i do to run AllegroServe with SBCL?

SBCL 1.0.28
Ubuntu 8.10

nuntius
Posts: 538
Joined: Sat Aug 09, 2008 10:44 am
Location: Newton, MA

Re: sbcl + aserve

Post by nuntius » Tue Jun 09, 2009 5:22 pm

As far as the package locks go, you might try using sb-ext:add-implementation-package to give the offending package access to sb-ext, you might turn them off using sb-ext:unlock-package, or you might disable them just while loading allegroserv using sb-ext:without-package-locks. See section 11 ("Package Locks") of the SBCL manual.
http://www.sbcl.org/manual/index.html

No idea about the other errors; not enough context.

sebastien_k
Posts: 5
Joined: Thu Apr 02, 2009 2:40 am

Re: sbcl + aserve

Post by sebastien_k » Wed Jun 10, 2009 9:12 am

Well, i just unlocked that package from proposed restarts and proceeded installing. I had installed some other packages, so several errors disappeared too. Finally, i get installed AllegroServe, but when i tried to start it and to open page, it showed another error:
* aserve-accept-6: 06/10/09 - 18:22:19 - accept: error 0 on accept invalid keyw\
ord argument: :AUTO-CLOSE (valid keys are
:INPUT, :OUTPUT, :ELEMENT-TYPE, :EXTERNAL-FORMAT,
:BUFFERING, :TIMEOUT).
which was discussed here. It was said to be a bug in sbcl-1.0.28, which i was using. In spite of the fact that there was some kind of a solution, it doesn't really suit me, because i need to place some text in all my sources. So, i tried to do something with my SBCL. Latest version for today is 1.0.29, i downloaded it, installed aserve (both with INSTALL.lisp script and with asdf-install), but i get another kind of error:
PROCESS-PRESET: Calling a multiprocessing function on a single-threaded sbcl bu$
[Condition of type SIMPLE-ERROR]
This one appears on server startup, and seems to be one more bug in latest SBCL, because there's really no threads:

Code: Select all

* *features*
(:ASERVE :HTMLGEN :ACL-COMPAT :CL-PPCRE :SB-BSD-SOCKETS-ADDRINFO :ASDF :ANSI-CL
 :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE
 :SB-EVAL :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :X86 :UNIX :ELF :LINUX
 :LARGEFILE :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD :C-STACK-IS-CONTROL-STACK
 :COMPARE-AND-SWAP-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP :RAW-INSTANCE-INIT-VOPS
 :STACK-ALLOCATABLE-CLOSURES :ALIEN-CALLBACKS :CYCLE-COUNTER :LINKAGE-TABLE
 :OS-PROVIDES-DLOPEN :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T)
So, what pair of SBCL and AllegroServe can be used to work together? Or how can i patch my SBCL-1.0.28 to avoid this bug and not to add some code in all my files?

nuntius
Posts: 538
Joined: Sat Aug 09, 2008 10:44 am
Location: Newton, MA

Re: sbcl + aserve

Post by nuntius » Wed Jun 10, 2009 6:44 pm

As I understand it, the prebuilt SBCL binaries do no have threading enabled. Grab the sources, read sections 2.1 and 2.2 of the INSTALL file, and try building SBCL with threading enabled.

sebastien_k
Posts: 5
Joined: Thu Apr 02, 2009 2:40 am

Re: sbcl + aserve

Post by sebastien_k » Thu Jun 11, 2009 12:58 pm

It works, thank you. That's what i have done:
1) i downloaded sbcl sources from sourceforge;
2) created file customize-target-features.lisp, as it was said in INSTALL file, and added there code to enable threads;
3) then i corrected function socket-make-stream in contrib/sb-bsd-sockets/sockets.lisp to look just like here;
4) i builded and installed sbcl;
5) installed aserve with asdf-install.
After that i was able to publish my files on server and get access to them from my browser.

findinglisp
Posts: 447
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX
Contact:

Re: sbcl + aserve

Post by findinglisp » Fri Jun 12, 2009 9:15 am

nuntius wrote:As I understand it, the prebuilt SBCL binaries do no have threading enabled. Grab the sources, read sections 2.1 and 2.2 of the INSTALL file, and try building SBCL with threading enabled.
If the standard Ubuntu SBCL build is without threads, I'd also send a note to the maintainer and ask them to change the build settings. That's just lame. There was a time when the thread support in SBCL was a bit dicey, but that's years past. Many new packages are starting to rely on threading at some level.

I'd do it, but I'm really a Fedora guy myself.
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/

nuntius
Posts: 538
Joined: Sat Aug 09, 2008 10:44 am
Location: Newton, MA

Re: sbcl + aserve

Post by nuntius » Fri Jun 12, 2009 1:12 pm

To clarify: the binaries hosted on SBCL's website are built without threading enabled. A recent query on sbcl-help indicates that the SBCL devs aren't inclined to change this any time soon.
http://thread.gmane.org/gmane.lisp.stee ... neral/2418

findinglisp
Posts: 447
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX
Contact:

Re: sbcl + aserve

Post by findinglisp » Sat Jun 13, 2009 6:40 pm

Looks like they were (are still?) chasing down a bug of some sort. I stand corrected. For what it's worth, the standard Fedora binary is built with threading default (probably because my older FedoraLisp.org RPM did it that way and I think Deiter snarfed that as the original basis of the standard Fedora build).

Anyway, not good news if the SBCL devs are still chasing a stability issue related to threading.
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/

Post Reply