Thanks Liam,
I overlooked that, and I installed the latest version. Now I get the error:
* (require :gsll)
; loading system definition from /usr/share/common-lisp/systems/cffi.asd into ; #<PACKAGE "ASDF0"> ; registering #<SYSTEM CFFI {B0B0CC9}> as CFFI
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" {A8EF661}>: There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION (SB-PCL::SLOT-ACCESSOR :GLOBAL CFFI::SPEC SB-PCL::READER) (1)> when called with arguments (((:DARWIN (:OR "/opt/local/lib/libgslcblas.dylib" "/usr/local/lib/libgslcblas.dylib")) (:UNIX (:OR "/usr/lib/libgslcblas.so.0" "/usr/lib/libgslcblas.so")) (T (:DEFAULT "libgslcblas")))).
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name): 0: [RETRY ] Try loading the foreign library again. 1: [USE-VALUE] Use another library instead. 2: [RETRY ] Retry performing #<ASDF:LOAD-OP NIL {B82B479}> on #<ASDF:CL-SOURCE-FILE "init" {B6881B1}>. 3: [ACCEPT ] Continue, treating #<ASDF:LOAD-OP NIL {B82B479}> on #<ASDF:CL-SOURCE-FILE "init" {B6881B1}> as having been successful. 4: [ABORT ] Exit debugger, returning to top level.
((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) #<unavailable argument> #<unavailable argument> #<STANDARD-GENERIC-FUNCTION (SB-PCL::SLOT-ACCESSOR :GLOBAL CFFI::SPEC SB-PCL::READER) (1)>) 0]
Note that I installed libgsl0-dev which apparently contains libgslcblas (this was not mentioned on the GSLL page), but still could not get it working. Using SBCL 1.0.14.debian.
Tamas
On Tue, Apr 01, 2008 at 11:46:40AM -0400, Liam Healy wrote:
Hi Tamas-
You need to get the latest version (not the current) version of CFFI. There are actually only three places where this is used, so it's not hard to change it, but I coded against the latest version figuring they were about to release a new version (and so far they haven't), and because one of my computers is on Debian unstable and uses the latest.
Liam
Requirements and Platforms
GSLL should work in any Common Lisp implementation and platform combination that has CFFI with callbacks and foreign-funcall support. You will need
* GSL * CFFI (Note: you will need a version newer than the current
version 0.9.2. Use the darcs repository, a newer tarball, or Debian testing/unstable.) * ASDF ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On Tue, Apr 1, 2008 at 10:27 AM, Tamas K Papp tpapp@princeton.edu wrote:
Hi,
I checked out GSLL using svn, registered the package and tried to load it. But I am getting errors like this:
Execution of a form compiled with errors. Form: (DEFCVAR (gsl_version *GSL-VERSION* READ-ONLY T) STRING The version of the GSL library being used.) Compile-time error: (during macroexpansion of (DEFCVAR ("gsl_version" *GSL-VERSION* ...) ...)) error while parsing arguments to DEFMACRO DEFCVAR: odd number of elements in keyword/value list: ("The version of the GSL library being used.") [Condition of type SB-INT:COMPILED-PROGRAM-ERROR]
When I looked up cffi:defcvar, I found that its syntax is (defcvar name type &key read-only)
but the code has
(cffi:defcvar ("gsl_version" *gsl-version* :read-only t) :string "The version of the GSL library being used.")
I am confused, am I supposed to use a different version of CFFI?
Thanks,
Tamas _______________________________________________ Gsll-devel mailing list Gsll-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
On Tue, 1 Apr 2008, Tamas K Papp wrote:
when called with arguments (((:DARWIN (:OR "/opt/local/lib/libgslcblas.dylib" "/usr/local/lib/libgslcblas.dylib")) (:UNIX (:OR "/usr/lib/libgslcblas.so.0" "/usr/lib/libgslcblas.so")) (T (:DEFAULT "libgslcblas")))).
<snip>
Note that I installed libgsl0-dev which apparently contains libgslcblas (this was not mentioned on the GSLL page), but still could not get it working. Using SBCL 1.0.14.debian.
Dear Tamas,
Type:
slocate libgslcblas
on an Ubuntu system I get:
/usr/lib/libgslcblas.so.0 /usr/lib/libgslcblas.so.0.0.0 /usr/lib/libgslcblas.a /usr/lib/libgslcblas.so
if you do not get that either libgslcblas.so or libgslcblas.so.0 lives in /usr/lib/ but somewhere else you will need to symlink it to /usr/lib or change the lisp code to call the correct path.
Cheers, Jason
Here's what I have under /usr/lib,
-rw-r--r-- 1 root root 3917574 2008-01-28 07:58 /usr/lib/libgsl.a -rw-r--r-- 1 root root 420802 2008-01-28 07:58 /usr/lib/libgslcblas.a lrwxrwxrwx 1 root root 20 2008-02-04 09:06 /usr/lib/libgslcblas.so -> libgslcblas.so.0.0.0 lrwxrwxrwx 1 root root 20 2008-02-04 09:06 /usr/lib/libgslcblas.so.0 -> libgslcblas.so.0.0.0 -rw-r--r-- 1 root root 199096 2008-01-28 07:58 /usr/lib/libgslcblas.so.0.0.0 lrwxrwxrwx 1 root root 16 2008-02-04 09:06 /usr/lib/libgsl.so -> libgsl.so.0.10.0 lrwxrwxrwx 1 root root 16 2008-02-04 09:06 /usr/lib/libgsl.so.0 -> libgsl.so.0.10.0 -rw-r--r-- 1 root root 1966928 2008-01-28 07:58 /usr/lib/libgsl.so.0.10.0
and packages installed (Debian unstable) ii gsl-bin 1.10-4 GNU Scientific Library (GSL) -- binary package ii gsl-ref-html 1.10-1 GNU Scientific Library (GSL) Reference Manual in html ii libgsl0 1.9-3 GNU Scientific Library (GSL) -- library package ii libgsl0-dev 1.10-4 GNU Scientific Library (GSL) -- development package ii libgsl0ldbl 1.10-4 GNU Scientific Library (GSL) -- library package
not all of which are necessary of course. I have found in general with Debian libraries that they often fail to link to the most general "so" file, so that e.g. there will be a libxyz.so.0.n and a libxyz.so.0 that's a link to that, but then I will need to make a link libxyz.so. I can't remember if that happened with GSL or not, but check for that if it says the library is missing but you think you've installed it.
Liam
On Tue, Apr 1, 2008 at 1:24 PM, Jason Nielsen jdn@math.carleton.ca wrote:
On Tue, 1 Apr 2008, Tamas K Papp wrote:
when called with arguments (((:DARWIN (:OR "/opt/local/lib/libgslcblas.dylib" "/usr/local/lib/libgslcblas.dylib")) (:UNIX (:OR "/usr/lib/libgslcblas.so.0" "/usr/lib/libgslcblas.so")) (T (:DEFAULT "libgslcblas")))).
<snip>
Note that I installed libgsl0-dev which apparently contains libgslcblas (this was not mentioned on the GSLL page), but still could not get it working. Using SBCL 1.0.14.debian.
Dear Tamas,
Type:
slocate libgslcblas
on an Ubuntu system I get:
/usr/lib/libgslcblas.so.0 /usr/lib/libgslcblas.so.0.0.0 /usr/lib/libgslcblas.a /usr/lib/libgslcblas.so
if you do not get that either libgslcblas.so or libgslcblas.so.0 lives in /usr/lib/ but somewhere else you will need to symlink it to /usr/lib or change the lisp code to call the correct path.
Cheers, Jason
Gsll-devel mailing list Gsll-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
Dear Liam and Jason,
Thanks for your help. I had all the files below, so I tried manually loading the foreign libraries, and it worked. So I thought what the heck, and deleted the fasl files for gsll from my clc cache, and now it works perfectly.
Just a question: isn't init.lisp supposed to have an (in-package :gsl) statement somewhere? Or do you want stuff there happening outside gsl:?
Anyhow, now GSL seems to work, I tried erf and was overwhelmed with happiness. Having all these useful functions is a big deal for my work.
Thanks,
Tamas
On Tue, Apr 01, 2008 at 01:39:00PM -0400, Liam Healy wrote:
Here's what I have under /usr/lib,
-rw-r--r-- 1 root root 3917574 2008-01-28 07:58 /usr/lib/libgsl.a -rw-r--r-- 1 root root 420802 2008-01-28 07:58 /usr/lib/libgslcblas.a lrwxrwxrwx 1 root root 20 2008-02-04 09:06 /usr/lib/libgslcblas.so -> libgslcblas.so.0.0.0 lrwxrwxrwx 1 root root 20 2008-02-04 09:06 /usr/lib/libgslcblas.so.0 -> libgslcblas.so.0.0.0 -rw-r--r-- 1 root root 199096 2008-01-28 07:58 /usr/lib/libgslcblas.so.0.0.0 lrwxrwxrwx 1 root root 16 2008-02-04 09:06 /usr/lib/libgsl.so -> libgsl.so.0.10.0 lrwxrwxrwx 1 root root 16 2008-02-04 09:06 /usr/lib/libgsl.so.0 -> libgsl.so.0.10.0 -rw-r--r-- 1 root root 1966928 2008-01-28 07:58 /usr/lib/libgsl.so.0.10.0
and packages installed (Debian unstable) ii gsl-bin 1.10-4 GNU Scientific Library (GSL) -- binary package ii gsl-ref-html 1.10-1 GNU Scientific Library (GSL) Reference Manual in html ii libgsl0 1.9-3 GNU Scientific Library (GSL) -- library package ii libgsl0-dev 1.10-4 GNU Scientific Library (GSL) -- development package ii libgsl0ldbl 1.10-4 GNU Scientific Library (GSL) -- library package
not all of which are necessary of course. I have found in general with Debian libraries that they often fail to link to the most general "so" file, so that e.g. there will be a libxyz.so.0.n and a libxyz.so.0 that's a link to that, but then I will need to make a link libxyz.so. I can't remember if that happened with GSL or not, but check for that if it says the library is missing but you think you've installed it.
Liam
On Tue, Apr 1, 2008 at 1:24 PM, Jason Nielsen jdn@math.carleton.ca wrote:
On Tue, 1 Apr 2008, Tamas K Papp wrote:
when called with arguments (((:DARWIN (:OR "/opt/local/lib/libgslcblas.dylib" "/usr/local/lib/libgslcblas.dylib")) (:UNIX (:OR "/usr/lib/libgslcblas.so.0" "/usr/lib/libgslcblas.so")) (T (:DEFAULT "libgslcblas")))).
<snip>
Note that I installed libgsl0-dev which apparently contains libgslcblas (this was not mentioned on the GSLL page), but still could not get it working. Using SBCL 1.0.14.debian.
Dear Tamas,
Type:
slocate libgslcblas
on an Ubuntu system I get:
/usr/lib/libgslcblas.so.0 /usr/lib/libgslcblas.so.0.0.0 /usr/lib/libgslcblas.a /usr/lib/libgslcblas.so
if you do not get that either libgslcblas.so or libgslcblas.so.0 lives in /usr/lib/ but somewhere else you will need to symlink it to /usr/lib or change the lisp code to call the correct path.
Cheers, Jason
Gsll-devel mailing list Gsll-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
Gsll-devel mailing list Gsll-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel
Tamas,
Glad it's working out for you.
init.lisp doesn't have a in-package because the package is made in that file. I've seen people put an in-package after the defpackage, but the default package is irrelevant in that file, so I just left it out.
I'm still working on the ffa adaptation, I hope I'll have something usable soon.
Liam
On Tue, Apr 1, 2008 at 2:35 PM, Tamas K Papp tpapp@princeton.edu wrote:
Dear Liam and Jason,
Thanks for your help. I had all the files below, so I tried manually loading the foreign libraries, and it worked. So I thought what the heck, and deleted the fasl files for gsll from my clc cache, and now it works perfectly.
Just a question: isn't init.lisp supposed to have an (in-package :gsl) statement somewhere? Or do you want stuff there happening outside gsl:?
Anyhow, now GSL seems to work, I tried erf and was overwhelmed with happiness. Having all these useful functions is a big deal for my work.
Thanks,
Tamas
On Tue, Apr 01, 2008 at 01:39:00PM -0400, Liam Healy wrote:
Here's what I have under /usr/lib,
-rw-r--r-- 1 root root 3917574 2008-01-28 07:58 /usr/lib/libgsl.a -rw-r--r-- 1 root root 420802 2008-01-28 07:58 /usr/lib/libgslcblas.a lrwxrwxrwx 1 root root 20 2008-02-04 09:06 /usr/lib/libgslcblas.so -> libgslcblas.so.0.0.0 lrwxrwxrwx 1 root root 20 2008-02-04 09:06 /usr/lib/libgslcblas.so.0 -> libgslcblas.so.0.0.0 -rw-r--r-- 1 root root 199096 2008-01-28 07:58 /usr/lib/libgslcblas.so.0.0.0 lrwxrwxrwx 1 root root 16 2008-02-04 09:06 /usr/lib/libgsl.so -> libgsl.so.0.10.0 lrwxrwxrwx 1 root root 16 2008-02-04 09:06 /usr/lib/libgsl.so.0 -> libgsl.so.0.10.0 -rw-r--r-- 1 root root 1966928 2008-01-28 07:58 /usr/lib/libgsl.so.0.10.0
and packages installed (Debian unstable) ii gsl-bin 1.10-4 GNU Scientific Library (GSL) -- binary package ii gsl-ref-html 1.10-1 GNU Scientific Library (GSL) Reference Manual in html ii libgsl0 1.9-3 GNU Scientific Library (GSL) -- library package ii libgsl0-dev 1.10-4 GNU Scientific Library (GSL) -- development package ii libgsl0ldbl 1.10-4 GNU Scientific Library (GSL) -- library package
not all of which are necessary of course. I have found in general with Debian libraries that they often fail to link to the most general "so" file, so that e.g. there will be a libxyz.so.0.n and a libxyz.so.0 that's a link to that, but then I will need to make a link libxyz.so. I can't remember if that happened with GSL or not, but check for that if it says the library is missing but you think you've installed it.
Liam