Hi, I tried to load cffi that comes with Quicklisp on SBCL 1.3.2 on a Raspberry PI 2.
I had to comment out FFI_UNIX64
(cenum abi ((:default-abi "FFI_DEFAULT_ABI")) ((:sysv "FFI_SYSV")) #+nil ((:unix64 "FFI_UNIX64")) )
in the file quicklisp/dists/quicklisp/software/cffi_0.16.1/libffi/libffi-unix.lisp to make it load.
Regards, Martin
Could you send *features* so we can make a proper conditional? Thanks.
On Wed, Mar 16, 2016 at 7:47 AM, Martin Kielhorn kielhorn.martin@gmail.com wrote:
Hi, I tried to load cffi that comes with Quicklisp on SBCL 1.3.2 on a Raspberry PI 2.
I had to comment out FFI_UNIX64
(cenum abi ((:default-abi "FFI_DEFAULT_ABI")) ((:sysv "FFI_SYSV")) #+nil ((:unix64 "FFI_UNIX64")) )
in the file quicklisp/dists/quicklisp/software/cffi_0.16.1/libffi/libffi-unix.lisp to make it load.
Regards, Martin
On Wed, Mar 16, 2016 at 5:15 PM, Liam Healy lnp@healy.washington.dc.us wrote:
Could you send *features* so we can make a proper conditional? Thanks.
Judging from https://github.com/atgreen/libffi/blob/415723b40ba76f4a9df9b709db1cde0c65162... perhaps #+x86-64 is the conditional we want?
On Wed, Mar 16, 2016 at 5:15 PM, Liam Healy lnp@healy.washington.dc.us wrote:
Could you send *features* so we can make a proper conditional? Thanks.
Judging from https://github.com/atgreen/libffi/blob/415723b40ba76f4a9df9b709db1cde0c65162... perhaps #+x86-64 is the conditional we want?
+1
on another note, though, shouldn't there be a grovel primitive/syntax for something like this, basically for an #ifdef?
although, the grovel syntax, as it is, is unfortunately not too accommodating for such an extension in random non-toplevel positions...
just thinking out loud here, maybe it inspires someone with a better perspective...
On Wed, Mar 16, 2016 at 9:46 PM, Attila Lendvai attila@lendvai.name wrote:
on another note, though, shouldn't there be a grovel primitive/syntax for something like this, basically for an #ifdef?
Yes, but #ifdef doesn't know about enums fields. (Not 100% sure that's what you meant.)
Yes, but #ifdef doesn't know about enums fields. (Not 100% sure that's what you meant.)
scratch that. (my internal C parser failed me and i thought it's a row of #define's)
On Wed, 2016-03-16 at 18:35 +0000, Luís Oliveira wrote:
On Wed, Mar 16, 2016 at 5:15 PM, Liam Healy lnp@healy.washington.dc.us wrote:
Could you send *features* so we can make a proper conditional? Thanks.
Judging from https://github.com/atgreen/libffi/blob/415723b40ba76f4a9df9b709db1cde0c65162... perhaps #+x86-64 is the conditional we want?
We really really are at the point where we need to have a configure-style script run before anything and detect CPU/OS features. For Win32 the resulting .lisp file can be hard-coded because that stuff is pretty stable and arch-limited. We've been playing whack-a-mole with platform detection for too long.
My 2 rappen.
On Wed, Mar 16, 2016 at 9:51 PM, Stelian Ionescu sionescu@cddr.org wrote:
We really really are at the point where we need to have a configure-style script run before anything and detect CPU/OS features.
What's your proposal in this case? Try and compile a single program that prints FFI_UNIX64 and if it fails to compile assume the constant is not defined? Is that how configure does it? Did you mean something else?
On Wed, Mar 16, 2016 at 9:51 PM, Stelian Ionescu sionescu@cddr.org wrote:
We really really are at the point where we need to have a configure-style script run before anything and detect CPU/OS features.
What's your proposal in this case? Try and compile a single program that prints FFI_UNIX64 and if it fails to compile assume the constant is not defined? Is that how configure does it? Did you mean something else?
Yes, that's how autotools deals with that case: each test gets generated to a separate file and then compiled. That's the reason why people find autoconf-generated configure scripts to be slow: they invoke the compiler for almost every single test, but it's also what makes it robust.
Hi Liam,
here are the *features*:
pi@raspberrypi:~$ sbcl This is SBCL 1.3.2, an implementation of ANSI Common Lisp. More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. * *features*
(:QUICKLISP :SB-BSD-SOCKETS-ADDRINFO :ASDF-PACKAGE-SYSTEM :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ALIEN-CALLBACKS :ANSI-CL :ARM :ARM-VFP :ARM-VFPV2 :ASH-RIGHT-VOPS :COMMON-LISP :ELF :FP-AND-PC-STANDARD-SAVE :GENCGC :IEEE-FLOATING-POINT :LARGEFILE :LINKAGE-TABLE :LINUX :LITTLE-ENDIAN :MULTIPLY-HIGH-VOPS :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES :PRECISE-ARG-COUNT-ERROR :SB-DOC :SB-EVAL :SB-LDB :SB-PACKAGE-LOCKS :SB-SOURCE-LOCATIONS :SB-TEST :SB-UNICODE :SBCL :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS :SYMBOL-INFO-VOPS :UNIX :UNWIND-TO-FRAME-AND-CALL-VOP)
Also here is the exact git commit of SBCL that I compiled:
pi@raspberrypi:~/lisp/sbcl-1.3.2$ git log WARNING: terminal is not fully functional commit 03aaa5303de3f850ad89d646469dc8ec2a490726 Author: Douglas Katzman dougk@google.com Date: Thu Feb 18 21:31:36 2016 -0500
Remove cargo-cultish definition of fasteval's %EVAL.
Unlike for 'full-eval' it is unhelpful to inline %%EVAL, since most inner evaluations happen within pre-digested forms (and in fact *EVAL-VERBOSE* doesn't even work for those).
The system is Raspberry PI 2 Model B V1.1.
pi@raspberrypi:~/lisp/sbcl-1.3.2$ cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5
processor : 1 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5
processor : 2 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5
processor : 3 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5
Hardware : BCM2709 Revision : a01041 Serial : 00000000adad12fd
Regards, Martin
On Wed, Mar 16, 2016 at 6:15 PM, Liam Healy lnp@healy.washington.dc.us wrote:
Could you send *features* so we can make a proper conditional? Thanks.
On Wed, Mar 16, 2016 at 7:47 AM, Martin Kielhorn < kielhorn.martin@gmail.com> wrote:
Hi, I tried to load cffi that comes with Quicklisp on SBCL 1.3.2 on a Raspberry PI 2.
I had to comment out FFI_UNIX64
(cenum abi ((:default-abi "FFI_DEFAULT_ABI")) ((:sysv "FFI_SYSV")) #+nil ((:unix64 "FFI_UNIX64")) )
in the file quicklisp/dists/quicklisp/software/cffi_0.16.1/libffi/libffi-unix.lisp to make it load.
Regards, Martin