<br><div class="gmail_quote">On Wed, Mar 3, 2010 at 9:14 AM, Liam Healy <span dir="ltr"><<a href="mailto:lhealy@common-lisp.net">lhealy@common-lisp.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You need a newer version of CFFI.<br></blockquote><div><br>Is CFFI version .10.5 enough, or is the latest snaphot required? I ask because sbcl 1.0.35,36 would not load the gsl libraries.<br><br>Thanks,<br>
<br>
Mirko<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
On Wed, Mar 3, 2010 at 4:02 AM, N J <<a href="mailto:raphexion@gmail.com">raphexion@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> Thanks for the help!<br>
><br>
> When I run<br>
> pkg-config --cflags libffi<br>
> I get<br>
> -I/usr/lib64/libffi-3.0.9/include<br>
><br>
> So I edited my libffi-unix.lisp file as follows (I tried to imitate<br>
> the +darwin approch):<br>
> #+linux<br>
> (cc-flags "-I/usr/lib64/libffi-3.0.9/include/")<br>
><br>
> Doing this it compiled better but then I got this:<br>
><br>
> ; /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/<br>
> cffi/grovel/asdf.fasl written<br>
> ; compilation finished in 0:00:00<br>
> ; registering #<SYSTEM :FSBV {100339C6A1}> as FSBV<br>
> ; registering #<SYSTEM GSLL {1004A02BA1}> as GSLL<br>
> ; loading system definition from<br>
> ; /usr/share/common-lisp/systems/cl-utilities.asd into #<PACKAGE "ASDF0"><br>
> ; registering #<SYSTEM CL-UTILITIES {1004FBFEE1}> as CL-UTILITIES<br>
> ; loading system definition from<br>
> ; /usr/share/common-lisp/systems/trivial-garbage.asd into #<PACKAGE "ASDF0"><br>
> ; registering #<SYSTEM TRIVIAL-GARBAGE {1002F4D441}> as TRIVIAL-GARBAGE<br>
> ; registering #<SYSTEM TRIVIAL-GARBAGE-TESTS {10031EABB1}> as<br>
> ; TRIVIAL-GARBAGE-TESTS<br>
> ; loading system definition from /usr/share/common-lisp/systems/grid.asd into<br>
> ; #<PACKAGE "ASDF0"><br>
> ; registering #<SYSTEM GRID {1002873B01}> as GRID<br>
> ; loading system definition from /usr/share/common-lisp/systems/c-array.asd<br>
> ; into #<PACKAGE "ASDF0"><br>
> ; registering #<SYSTEM C-ARRAY {1002D72B21}> as C-ARRAY<br>
> ; compiling file "/usr/share/common-lisp/source/fsbv/init.lisp"<br>
> (written 01 MAR<br>
> 2010 11:56:07 PM):<br>
> ; compiling (IN-PACKAGE :COMMON-LISP-USER)<br>
> ; compiling (DEFPACKAGE :FOREIGN-STRUCTURES-BY-VALUE ...)<br>
> ; compiling (CFFI:LOAD-FOREIGN-LIBRARY "libffi.so")<br>
> ; compiling (PUSHNEW :FSBV ...)<br>
><br>
> ; /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/<br>
> fsbv/init.fasl written<br>
> ; compilation finished in 0:00:00<br>
><br>
> debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread"<br>
> RUNNING {<br>
> 10023F6A01}>:<br>
> Unknown Grovel syntax: CFFI-GROVEL::CC-FLAGS<br>
><br>
> Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.<br>
><br>
> restarts (invokable by number or by possibly-abbreviated name):<br>
> 0: [TRY-RECOMPILING] Try recompiling libffi<br>
> 1: [RETRY ] Retry performing #<ASDF:COMPILE-OP NIL {1004ABF331}> on<br>
> #<CFFI-GROVEL:GROVEL-FILE "libffi" {100284E171}>.<br>
> 2: [ACCEPT ] Continue, treating #<ASDF:COMPILE-OP NIL {1004ABF331}><br>
> on #<CFFI-GROVEL:GROVEL-FILE "libffi" {100284E171}> as<br>
> having been successful.<br>
> 3: [ABORT ] Exit debugger, returning to top level.<br>
><br>
> ((SB-PCL::FAST-METHOD CFFI-GROVEL::%PROCESS-GROVEL-FORM (T T T))<br>
> #<unavailable argument><br>
> #<unavailable argument><br>
> CFFI-GROVEL::CC-FLAGS<br>
> #<unavailable argument><br>
> #<unavailable argument>)<br>
><br>
><br>
> Maybe I should have modified my file differently.<br>
><br>
> I also tried the symlink approch<br>
> cd /src/include<br>
> ln -s /usr/lib64/libffi-3.0.9/include/ffi.h ffi.h<br>
> ln -s /usr/lib64/libffi-3.0.9/include/ffitarget.h ffitarget.h<br>
><br>
> and I seem to work; I got:<br>
><br>
> ; compiling (DEFCONSTANT +CGSM-BOHR-RADIUS+ ...)<br>
> ; compiling (DEFCONSTANT +CGSM-NEWTON+ ...)<br>
> ; compiling (DEFCONSTANT +CGSM-DYNE+ ...)<br>
> ; compiling (DEFCONSTANT +CGSM-JOULE+ ...)<br>
> ; compiling (DEFCONSTANT +CGSM-ERG+ ...)<br>
> ; compiling (DEFCONSTANT +CGSM-STEFAN-BOLTZMANN-CONSTANT+ ...)<br>
> ; compiling (DEFCONSTANT +CGSM-THOMSON-CROSS-SECTION+ ...)<br>
><br>
> ; /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/gsll/physical-constants/cgsm.fasl<br>
> written<br>
> ; compilation finished in 0:00:00<br>
> ; compiling file<br>
> "/usr/share/common-lisp/source/gsll/physical-constants/export.lisp"<br>
> (written 01 MAR 2010 11:53:10 PM):<br>
> ; compiling (IN-PACKAGE :GSL)<br>
> ; compiling (EXPORT (QUOTE #))<br>
><br>
> ; /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/gsll/physical-constants/export.fasl<br>
> written<br>
> ; compilation finished in 0:00:00<br>
> ;<br>
> ; compilation unit finished<br>
> ; caught 1 STYLE-WARNING condition<br>
> ; printed 41 notes<br>
> NIL<br>
> *<br>
><br>
> Thanks for the help,<br>
> NIK<br>
><br>
> On Tue, Mar 2, 2010 at 10:05 AM, Sumant Oemrawsingh <<a href="mailto:soemraws@xs4all.nl">soemraws@xs4all.nl</a>> wrote:<br>
>> Hi,<br>
>><br>
>> Run pkg-config --cflags libffi and behold that ffi.h is probably in some<br>
>> non-standard location like /usr/lib64/libffi-3.0.8/include. You can either<br>
>> edit the source libffi-unix.lisp or symlink to a standard location like<br>
>> /usr/include.<br>
>><br>
>> As I understand, this is a problem due to upstream, not with your distro.<br>
>><br>
>> Hope it helps,<br>
>> Sumant<br>
>><br>
>> On Mon, Mar 01, 2010 at 11:57:25PM +0100, N J wrote:<br>
>>> Hey,<br>
>>><br>
>>> When I run<br>
>>> (asdf:operate 'asdf:load-op :gsll)<br>
>>> in sbcl<br>
>>><br>
>>> I get:<br>
>>><br>
>>> ; loading system definition from /usr/share/common-lisp/systems/c-array.asd<br>
>>> ; into #<PACKAGE "ASDF0"><br>
>>> ; registering #<SYSTEM C-ARRAY {10026C51D1}> as C-ARRAY<br>
>>> ; compiling file "/usr/share/common-lisp/source/fsbv/init.lisp"<br>
>>> (written 01 MAR 2010 11:39:35 PM):<br>
>>> ; compiling (IN-PACKAGE :COMMON-LISP-USER)<br>
>>> ; compiling (DEFPACKAGE :FOREIGN-STRUCTURES-BY-VALUE ...)<br>
>>> ; compiling (CFFI:LOAD-FOREIGN-LIBRARY "libffi.so")<br>
>>> ; compiling (PUSHNEW :FSBV ...)<br>
>>><br>
>>> ; /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/init.fasl<br>
>>> written<br>
>>> ; compilation finished in 0:00:00<br>
>>> ; cc -m64 -fPIC -o<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c<br>
>>><br>
>>> debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread"<br>
>>> RUNNING {10023F6A01}>:<br>
>>> External process exited with code 1.<br>
>>> Command was: "cc" "-m64" "-fPIC" "-o"<br>
>>> "/home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix"<br>
>>> "/home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c"<br>
>>> Output was:<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:7:17:<br>
>>> error: ffi.h: No such file or directory<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:<br>
>>> In function ‘main’:<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:40:<br>
>>> error: ‘FFI_OK’ undeclared (first use in this function)<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:40:<br>
>>> error: (Each undeclared identifier is reported only once<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:40:<br>
>>> error: for each function it appears in.)<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:45:<br>
>>> error: ‘FFI_BAD_TYPEDEF’ undeclared (first use in this function)<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:50:<br>
>>> error: ‘FFI_BAD_ABI’ undeclared (first use in this function)<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:61:<br>
>>> error: ‘FFI_DEFAULT_ABI’ undeclared (first use in this function)<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:66:<br>
>>> error: ‘FFI_SYSV’ undeclared (first use in this function)<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:71:<br>
>>> error: ‘FFI_UNIX64’ undeclared (first use in this function)<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:79:<br>
>>> error: ‘ffi_abi’ undeclared (first use in this function)<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:126:<br>
>>> error: invalid application of ‘sizeof’ to incomplete type ‘struct<br>
>>> _ffi_type’<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:126:<br>
>>> warning: format ‘%i’ expects type ‘int’, but argument 3 has type ‘long<br>
>>> unsigned int’<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:131:<br>
>>> error: dereferencing pointer to incomplete type<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:136:<br>
>>> error: dereferencing pointer to incomplete type<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:141:<br>
>>> error: dereferencing pointer to incomplete type<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:146:<br>
>>> error: dereferencing pointer to incomplete type<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:<br>
>>> In function ‘print_double_for_lisp’:<br>
>>> /home/rpx/.fasls/sbcl-1.0.19-gentoo-linux-x86-64/usr/share/common-lisp/source/fsbv/libffi-unix.c:397:<br>
>>> warning: incompatible implicit declaration of built-in function<br>
>>> ‘memset’<br>
>>><br>
>>><br>
>>> My packages and gits are:<br>
>>> git://<a href="http://repo.or.cz/gsll.git" target="_blank">repo.or.cz/gsll.git</a><br>
>>> 4fef622be12cf318e015b2ba5aba6c63d4296f1e<br>
>>> master<br>
>>><br>
>>> git://<a href="http://repo.or.cz/fsbv.git" target="_blank">repo.or.cz/fsbv.git</a><br>
>>> dd8025f51fd8272b725bd73bc0b1875bae2bcf5b<br>
>>> master<br>
>>><br>
>>> cffi-0.10.5<br>
>>><br>
>>><br>
>>> Thank you guys for any help<br>
>>> NIK<br>
<br>
_______________________________________________<br>
Gsll-devel mailing list<br>
<a href="mailto:Gsll-devel@common-lisp.net">Gsll-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/gsll-devel</a><br>
</blockquote></div><br>