sbcl problem

Discussion of Common Lisp
Post Reply
Stiv
Posts: 11
Joined: Wed Sep 29, 2010 6:52 am

sbcl problem

Post by Stiv » Wed Sep 29, 2010 6:59 am

Hello!
Sorry for my English and I'm a beginner :) .
I have a problem with weblocks and sbcl, when my friend installed sbcl I think that he didn't enable thread, so when I try to compile a program, I see this error:

Code: Select all

debugger invoked on a SIMPLE-ERROR:
  You're trying to start Weblocks on SBCL without threading
            support. Recompile your SBCL with threads enabled.
But now I don't know how I can recompile sbcl with thread enabled.

Thanks very much.
Bye!

UPDATE:

I discover this:

Code: Select all

$ port installed sbcl
The following ports are currently installed:
  sbcl @1.0.39_0+html
  sbcl @1.0.39_0+html+threads (active)
If this can be useful. Thanks :)

gugamilare
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil
Contact:

Re: sbcl problem

Post by gugamilare » Wed Sep 29, 2010 8:28 am

Either you get the source from SBCL's homepage and compile it, or you get a newer compiled binary. Newer versions of SBCL already come with thread support enabled for x86 and x86-64.

If you want to compile an older SBCL or use SBCL in another platform, you need to compile from source. Before compiling, create a file named customize-target-features.lisp inside the directory of SBCL's source with this content:

Code: Select all

    (lambda (features)
      (flet ((enable (x)
               (pushnew x features))
             (disable (x)
               (setf features (remove x features))))
        ;; Threading support.
        (enable :sb-thread)))
Then you compile SBCL. Take a look at the file base-target-features.lisp-expr for more features you may enable and the file INSTALL for general instructions.

EDIT: thread is enable by default only in Linux.

Stiv
Posts: 11
Joined: Wed Sep 29, 2010 6:52 am

Re: sbcl problem

Post by Stiv » Wed Sep 29, 2010 10:01 am

Thanks for reply, I try to do this:

- Download sbcl-1.0.29-x86-darwin-binary-r2.tar.bz2
- Uncompress this file
- Created file: customize-target-features.lisp with code
- I didn't find make.sh
- so I did: "sudo sh install.sh"

but it appears the same error. :(
I'm using Mac OS with macport.

Thanks very much.
Bye

ramarren
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland
Contact:

Re: sbcl problem

Post by ramarren » Wed Sep 29, 2010 11:51 am

Stiv wrote:I'm using Mac OS with macport.
With Macports you can build a reasonably recent version of SBCL with:

Code: Select all

port install sbcl +threads

gugamilare
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil
Contact:

Re: sbcl problem

Post by gugamilare » Wed Sep 29, 2010 12:18 pm

Stiv wrote:Thanks for reply, I try to do this:

- Download sbcl-1.0.29-x86-darwin-binary-r2.tar.bz2
- Uncompress this file
- Created file: customize-target-features.lisp with code
- I didn't find make.sh
If you didn't find make.sh it means you don't have the source with you, but a binary distribution. You have to get the source or do as Ramarren said.

Stiv
Posts: 11
Joined: Wed Sep 29, 2010 6:52 am

Re: sbcl problem

Post by Stiv » Thu Sep 30, 2010 1:39 am

Ramarren wrote:
Stiv wrote:I'm using Mac OS with macport.
With Macports you can build a reasonably recent version of SBCL with:

Code: Select all

port install sbcl +threads
Thanks, I already try to do this:

Code: Select all

$ sudo port install sbcl +threads
--->  Computing dependencies for sbcl
--->  Cleaning sbcl
I didn't undestand this message.
But when I try to compile I see the same error .
I think I should change the default version of sbcl, but I do not know how to do it.

Thanks very much.
Bye!

ramarren
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland
Contact:

Re: sbcl problem

Post by ramarren » Thu Sep 30, 2010 3:00 am

This means that you already have install SBCL from Macports, and it will not, by default rebuild only to change variants. You either have to uninstall and reinstall, or maybe do:

Code: Select all

sudo port upgrade --enforce-variants sbcl +threads

Stiv
Posts: 11
Joined: Wed Sep 29, 2010 6:52 am

Re: sbcl problem

Post by Stiv » Thu Sep 30, 2010 3:24 am

Ramarren wrote:This means that you already have install SBCL from Macports, and it will not, by default rebuild only to change variants. You either have to uninstall and reinstall, or maybe do:

Code: Select all

sudo port upgrade --enforce-variants sbcl +threads
Thank you very much for the answers you are very kind and patient.

I try to do it

Code: Select all

sudo port upgrade --enforce-variants sbcl +threads
But the compile doesn't work :( ... I don't understand why.
How can I unistall and reinstall?

Thanks again.
Bye!

ramarren
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland
Contact:

Re: sbcl problem

Post by ramarren » Thu Sep 30, 2010 4:13 am

Stiv wrote:But the compile doesn't work
In what way does it not work?
Stiv wrote:How can I unistall and reinstall?
Rather obviously

Code: Select all

sudo port uninstall sbcl
sudo port install sbcl +threads

Stiv
Posts: 11
Joined: Wed Sep 29, 2010 6:52 am

Re: sbcl problem

Post by Stiv » Tue Oct 05, 2010 4:12 am

Ramarren wrote:
Stiv wrote:But the compile doesn't work
In what way does it not work?
Stiv wrote:How can I unistall and reinstall?
Rather obviously

Code: Select all

sudo port uninstall sbcl
sudo port install sbcl +threads
Thanks!
When I reinstalled sbcl I did "sudo mv sbcl.macport sbcl" and now it works.

Thanks!
Bye!

Post Reply