gsll

Liam Healy lhealy at common-lisp.net
Sun Apr 14 18:25:48 UTC 2013


GSLL is a library written in C, so all its objects live in foreign
space.  CL arrays won't work because the foreign library can not see
them. You can shorten the creation of the foreign array using #m if
grid:*default-grid-type* is 'grid:FOREIGN-ARRAY:

(gsl:mean #m(1 2 3 4 5))
3.0

Please join the mailing list to ask questions and post problems.  Thanks.

Liam

On Sun, Apr 14, 2013 at 1:27 PM, Nelson Marcelino <marcelin7 at yahoo.com> wrote:
> Got it working. One question--why doesn't mean work with a simple lisp
> array? Instead of
> having to create a contraption with
>
> GSL> (mean (GRID:MAKE-FOREIGN-ARRAY
>           'SINGLE-FLOAT
>           :INITIAL-CONTENTS
>           '(1 2 3 4 5)))
> 3.0
>
>
> GSL> (mean #(1 2 3 4 5))
>
> There is no applicable method for the generic function:
>   #<STANDARD-GENERIC-FUNCTION MEAN #x3020035937EF>
> when called with arguments:
>   (#(1 2 3 4 5))
>    [Condition of type SIMPLE-ERROR]
>
>
>
> ________________________________
> From: Liam Healy <lhealy at common-lisp.net>
> To: Nelson Marcelino <marcelin7 at yahoo.com>
> Cc: "gsll-devel at common-lisp.net" <gsll-devel at common-lisp.net>
> Sent: Saturday, April 13, 2013 4:44 PM
> Subject: Re: gsll
>
> You need to load the  libffi "developer" package. I don't know what
> distro you're using, but on Debian/Ubuntu, it's called libffi-dev.
> Also, this is more of a question for cffi-devel, but it happens that I
> wrote cffi-libffi (which is the system triggering this error), so it
> works out.
>
> Liam
>
> On Fri, Apr 12, 2013 at 12:55 PM, Nelson Marcelino <marcelin7 at yahoo.com>
> wrote:
>> I'm having trouble getting this to work on Linux. Any help?
>>
>> Error while trying to load definition for system gsll from
>> pathname
>>
>> /home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/gsll-20130312-git/gsll.asd:
>>
>>    External process exited with code 1.
>> Command was: "cc" "-m64"
>> "-I/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/"
>> "-o"
>>
>> "/home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix"
>>
>> "/home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c"
>> Output was:
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:7:17:
>> error: ffi.h: No such file or directory
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:
>> In function âmainâ:
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:25:
>> error: âFFI_OKâ undeclared (first use in this function)
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:25:
>> error: (Each undeclared identifier is reported only once
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:25:
>> error: for each function it appears in.)
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:30:
>> error: âFFI_BAD_TYPEDEFâ undeclared (first use in this function)
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:35:
>> error: âFFI_BAD_ABIâ undeclared (first use in this function)
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:46:
>> error: âFFI_DEFAULT_ABIâ undeclared (first use in this function)
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:51:
>> error: âFFI_SYSVâ undeclared (first use in this function)
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:56:
>> error: âFFI_UNIX64â undeclared (first use in this function)
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:64:
>> error: âffi_abiâ undeclared (first use in this function)
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:111:
>> error: invalid application of âsizeofâ to incomplete type âstruct
>> _ffi_typeâ
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:116:
>> error: dereferencing pointer to incomplete type
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:121:
>> error: dereferencing pointer to incomplete type
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:126:
>> error: dereferencing pointer to incomplete type
>>
>> /home/nelson/.cache/common-lisp/ccl-1.8-f95-linux-x64/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/cffi_0.11.0/libffi/libffi-unix.c:131:
>> error: dereferencing pointer to incomplete type
>>
>>    [Condition of type ASDF:LOAD-SYSTEM-DEFINITION-ERROR]
>>
>> Restarts:
>>  0: [RETRY] Retry #<STANDARD-CLASS PROCESS-OP> on #<GROVEL-FILE
>> "cffi-libffi" "libffi" "libffi">.
>>  1: [ACCEPT] Continue, treating #<STANDARD-CLASS PROCESS-OP> on
>> #<GROVEL-FILE "cffi-libffi" "libffi" "libffi"> as having been successful.
>>  2: [RETRY-LOAD] Retry loading
>>
>> #P"/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/gsll-20130312-git/gsll.asd"
>>  3: [SKIP-LOAD] Skip loading
>>
>> #P"/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/gsll-20130312-git/gsll.asd"
>>  4: [LOAD-OTHER] Load other file instead of
>>
>> #P"/home/nelson/lib-asdf/quicklisp/dists/quicklisp/software/gsll-20130312-git/gsll.asd"
>>  5: [REINITIALIZE-SOURCE-REGISTRY-AND-RETRY] Retry finding system gsll
>> after
>> reinitializing the source-registry.
>



More information about the gsll-devel mailing list