From: Tonguc Yumruk
Subject: Portable Aserve under SBCL 0.9.4 Threads problem
Date: 
Message-ID: <87vf0s6f22.fsf@terra.galaxy>
Hi,

I'm a CL newbie, trying to learn about CL by reading Practical
Common Lisp. I'm using SBCL 0.9.4 under Debian Sarge, linux 2.6.11.

Since the chater about Web programming is coming closer and closer,
I've downloaded portable aserve and tried to install it. At first I've
installed it by using asdf-install but it failed. It seems that the
asdf-installable packages are quite old.

In my second try I've checked out the CVS version. When I run (load
"INSTALL.lisp") it successfully installed (although with some style
warnings) . But when I tried to run the example by
(in-package aserve-example)
(start-server :port 2001)
it complains about multithreading support in my sbcl. The complete
error message is:

PROCESS-PRESET: Calling a multiprocessing function on a
single-threaded sbcl build

I've compiled my sbcl with default options but as far as I can see it
has the sb-thread package. The *features* is like this:

(:ANSI-CL :COMMON-LISP
          :SBCL
          :UNIX
          :SB-DOC
          :SB-TEST
          :SB-PACKAGE-LOCKS
          :SB-UNICODE
          :IEEE-FLOATING-POINT
          :X86
          :ELF
          :LINUX
          :GENCGC
          :STACK-GROWS-DOWNWARD-NOT-UPWARD
          :C-STACK-IS-CONTROL-STACK
          :STACK-ALLOCATABLE-CLOSURES
          :LINKAGE-TABLE
          :OS-PROVIDES-DLOPEN
          :OS-PROVIDES-DLADDR)

How can I be sure that my sbcl provides threading? And if it does not
provide it how can I rebuild it to provide threding?

-- 
Love Respect GNU/Linux
########################################################################
BOFH excuse #43:
  
boss forgot system password
########################################################################
Tonguç Yumruk

From: Bruce Butterfield
Subject: Re: Portable Aserve under SBCL 0.9.4 Threads problem
Date: 
Message-ID: <1127422786.966244.246820@g44g2000cwa.googlegroups.com>
If your build had threading it would also include the feature
:SB-THREAD, which is not enabled by default in the source distribution.
I've actually had better luck on my Debian (well, Ubuntu) system
getting the latest RPM from the sourceforge page:

http://sourceforge.net/project/showfiles.php?group_id=1373

and using alien to convert it to a deb package. Installs perfectly and
you get all the cool features.
From: Tonguc Yumruk
Subject: Re: Portable Aserve under SBCL 0.9.4 Threads problem
Date: 
Message-ID: <874q8cyyhp.fsf@terra.galaxy>
"Bruce Butterfield" <···@entricom.com> writes:

> If your build had threading it would also include the feature
> :SB-THREAD, which is not enabled by default in the source distribution.
> I've actually had better luck on my Debian (well, Ubuntu) system
> getting the latest RPM from the sourceforge page:
>
> http://sourceforge.net/project/showfiles.php?group_id=1373
>
> and using alien to convert it to a deb package. Installs perfectly and
> you get all the cool features.
>

Thanks to everyone. I've edited base-target-features.lisp-expr to add
:sb-thread to *features* and recompiled. Now everything seems to work
OK.

Note: I'm making a local install to my $HOME so converting an rpm is
not suitable for me.

-- 
Love Respect GNU/Linux
########################################################################
Anyone who thinks UNIX is intuitive should be forced to write 5000 lines of 
code using nothing but vi or emacs. AAAAACK!
(Discussion in comp.os.linux.misc on the intuitiveness of commands, especially
Emacs.)
########################################################################
Tonguç Yumruk
From: Emre Sevinc
Subject: Re: Portable Aserve under SBCL 0.9.4 Threads problem
Date: 
Message-ID: <877jd889fb.fsf@ileriseviye.org>
Tonguc Yumruk <············@member.fsf.org> writes:

> "Bruce Butterfield" <···@entricom.com> writes:
>
>> If your build had threading it would also include the feature
>> :SB-THREAD, which is not enabled by default in the source distribution.
>> I've actually had better luck on my Debian (well, Ubuntu) system
>> getting the latest RPM from the sourceforge page:
>>
>> http://sourceforge.net/project/showfiles.php?group_id=1373
>>
>> and using alien to convert it to a deb package. Installs perfectly and
>> you get all the cool features.
>>
>
> Thanks to everyone. I've edited base-target-features.lisp-expr to add
> :sb-thread to *features* and recompiled. Now everything seems to work
> OK.
>
> Note: I'm making a local install to my $HOME so converting an rpm is
> not suitable for me.

I didn't understand why you had to build from source.

I'm also using Debian GNU/Linux:

 Linux debian 2.6.11-1-686 #1 Mon Jun 20 22:00:38 MDT 2005 i686 GNU/Linux

my SBCL is:

 SBCL 0.9.2

and it is installed from official repository using apt-get
and my *features* are:

CL-USER> *features*
(SWANK-BACKEND::SOURCE-PLIST :ASDF
                             :SB-FUTEX
                             :SB-THREAD
                             :ANSI-CL
                             :COMMON-LISP
                             :SBCL
                             :UNIX
                             :SB-DOC
                             :SB-TEST
                             :SB-PACKAGE-LOCKS
                             :SB-UNICODE
                             :IEEE-FLOATING-POINT
                             :X86
                             :ELF
                             :LINUX
                             :GENCGC
                             :STACK-GROWS-DOWNWARD-NOT-UPWARD
                             :C-STACK-IS-CONTROL-STACK
                             :STACK-ALLOCATABLE-CLOSURES
                             :LINKAGE-TABLE
                             :OS-PROVIDES-DLOPEN
                             :OS-PROVIDES-DLADDR)
CL-USER> 

There are :SB-FUTEX and :SB-THREAD as seen above.
Did SBCL (or Debian maintainers) change something
related to threading in the binary package in newer
versions?

Happy hacking,

-- 
Emre Sevinc

eMBA Software Developer         Actively engaged in:
http:www.bilgi.edu.tr           http://ileriseviye.org
http://www.bilgi.edu.tr         http://fazlamesai.net
Cognitive Science Student       http://cazci.com
http://www.cogsci.boun.edu.tr
From: Tonguc Yumruk
Subject: Re: Portable Aserve under SBCL 0.9.4 Threads problem
Date: 
Message-ID: <877jd81076.fsf@terra.galaxy>
Emre Sevinc <·····@bilgi.edu.tr> writes:

> Tonguc Yumruk <············@member.fsf.org> writes:
>
>> "Bruce Butterfield" <···@entricom.com> writes:
>>
>>> If your build had threading it would also include the feature
>>> :SB-THREAD, which is not enabled by default in the source distribution.
>>> I've actually had better luck on my Debian (well, Ubuntu) system
>>> getting the latest RPM from the sourceforge page:
>>>
>>> http://sourceforge.net/project/showfiles.php?group_id=1373
>>>
>>> and using alien to convert it to a deb package. Installs perfectly and
>>> you get all the cool features.
>>>
>>
>> Thanks to everyone. I've edited base-target-features.lisp-expr to add
>> :sb-thread to *features* and recompiled. Now everything seems to work
>> OK.
>>
>> Note: I'm making a local install to my $HOME so converting an rpm is
>> not suitable for me.
>
> I didn't understand why you had to build from source.
>
> I'm also using Debian GNU/Linux:
>
>  Linux debian 2.6.11-1-686 #1 Mon Jun 20 22:00:38 MDT 2005 i686 GNU/Linux
>
> my SBCL is:
>
>  SBCL 0.9.2
>
> and it is installed from official repository using apt-get
> and my *features* are:
>
> CL-USER> *features*
> (SWANK-BACKEND::SOURCE-PLIST :ASDF
>                              :SB-FUTEX
>                              :SB-THREAD
>                              :ANSI-CL
>                              :COMMON-LISP
>                              :SBCL
>                              :UNIX
>                              :SB-DOC
>                              :SB-TEST
>                              :SB-PACKAGE-LOCKS
>                              :SB-UNICODE
>                              :IEEE-FLOATING-POINT
>                              :X86
>                              :ELF
>                              :LINUX
>                              :GENCGC
>                              :STACK-GROWS-DOWNWARD-NOT-UPWARD
>                              :C-STACK-IS-CONTROL-STACK
>                              :STACK-ALLOCATABLE-CLOSURES
>                              :LINKAGE-TABLE
>                              :OS-PROVIDES-DLOPEN
>                              :OS-PROVIDES-DLADDR)
> CL-USER> 
>
> There are :SB-FUTEX and :SB-THREAD as seen above.
> Did SBCL (or Debian maintainers) change something
> related to threading in the binary package in newer
> versions?
>
> Happy hacking,
>
> -- 
> Emre Sevinc
>
> eMBA Software Developer         Actively engaged in:
> http:www.bilgi.edu.tr           http://ileriseviye.org
> http://www.bilgi.edu.tr         http://fazlamesai.net
> Cognitive Science Student       http://cazci.com
> http://www.cogsci.boun.edu.tr

As I mentioned before, I use Debian Sarge (aka stable). The SBCL
version in Sarge is 0.8.16, which is quite old and has
incompatibilities with recent SLIME versions. So I compiled my own
version.

AFAIK SBCL only has threading support for linux 2.6 series, and I's
currenty unavalable on other platforms (such s FreeBSD). So by default
threading support is not enabled in SBCL builds. The Debian version is
however shipped with threading support. You can find the full list of
changes made by the Debian project here:
http://ftp.debian.org/debian/pool/main/s/sbcl/sbcl_0.9.3.72-1.diff.gz

-- 
Love Respect GNU/Linux
########################################################################
BOFH excuse #135:
  
You put the disk in upside down.
########################################################################
Tonguç Yumruk
From: Bulent Murtezaoglu
Subject: Re: Portable Aserve under SBCL 0.9.4 Threads problem
Date: 
Message-ID: <8764sshjfp.fsf@p4.internal>
>>>>> "TY" == Tonguc Yumruk <············@member.fsf.org> writes:
[...]
    TY> How can I be sure that my sbcl provides threading? And if it
    TY> does not provide it how can I rebuild it to provide threding?

http://cvs.sourceforge.net/viewcvs.py/*checkout*/sbcl/sbcl/INSTALL?rev=1.25

Section 2.2 might help.  

cheers,

BM
From: Thomas F. Burdick
Subject: Re: Portable Aserve under SBCL 0.9.4 Threads problem
Date: 
Message-ID: <xcvzmq4i5ah.fsf@conquest.OCF.Berkeley.EDU>
Tonguc Yumruk <············@member.fsf.org> writes:

> Hi,
> 
> I'm a CL newbie, trying to learn about CL by reading Practical
> Common Lisp. I'm using SBCL 0.9.4 under Debian Sarge, linux 2.6.11.
> 
> Since the chater about Web programming is coming closer and closer,
> I've downloaded portable aserve and tried to install it. At first I've
> installed it by using asdf-install but it failed. It seems that the
> asdf-installable packages are quite old.
> 
> In my second try I've checked out the CVS version. When I run (load
> "INSTALL.lisp") it successfully installed (although with some style
> warnings) . But when I tried to run the example by
> (in-package aserve-example)
> (start-server :port 2001)
> it complains about multithreading support in my sbcl. The complete
> error message is:
> 
> PROCESS-PRESET: Calling a multiprocessing function on a
> single-threaded sbcl build
> 
> I've compiled my sbcl with default options but as far as I can see it
> has the sb-thread package. The *features* is like this:

The sb-thread package exists on all sbcl builds.  On multithreaded
builds, you'll have :sb-thread on your features.  To build a
multithreaded SBCL, make a file in the toplevel source directory (ie,
alongside make.sh) called customize-target-features.lisp, and put this
in it:

  (lambda (list)
    (cons :sb-thread list))

(This is covered in the build documentation, but it's not necessarily
obvious at first)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | Free Mumia Abu-Jamal! |
     ,--'    _,'   | Abolish the racist    |
    /       /      | death penalty!        |
   (   -.  |       `-----------------------'
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Emre Sevinc
Subject: Re: Portable Aserve under SBCL 0.9.4 Threads problem
Date: 
Message-ID: <87br2k8bi8.fsf@ileriseviye.org>
Tonguc Yumruk <············@member.fsf.org> writes:

> Hi,
>
> I'm a CL newbie, trying to learn about CL by reading Practical
> Common Lisp. I'm using SBCL 0.9.4 under Debian Sarge, linux 2.6.11.
>
> Since the chater about Web programming is coming closer and closer,
> I've downloaded portable aserve and tried to install it. At first I've
> installed it by using asdf-install but it failed. It seems that the
> asdf-installable packages are quite old.

Did you try using apt-get (or aptitude) to install
cl-aserve and cl-acl-compat packages? Did they lead to same
problems?

Also, please check out the specific mailing list for Lisp
on Debian, cl-debian at:

http://cl-debian.alioth.debian.org/
http://common-lisp.net/cgi-bin/mailman/listinfo/cl-debian


Happy hacking,

-- 
Emre Sevinc

eMBA Software Developer         Actively engaged in:
http:www.bilgi.edu.tr           http://ileriseviye.org
http://www.bilgi.edu.tr         http://fazlamesai.net
Cognitive Science Student       http://cazci.com
http://www.cogsci.boun.edu.tr