cffi-tests won't quickload on M1 MacBook
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CFFI |
New
|
Undecided
|
Unassigned |
Bug Description
When I try to test cffi with the arm64 port of SBCL 2.1.3 on my MacBook with M1 CPU running MacOSX I get the following error:
My system is M1 MacBook Air with 16Gb RAM.
% uname -a
Darwin BelasMacBookAir
SBCL 2.1.3:
[SBCL] CL-USER> *features*
(:QUICKLISP :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-MACOSX :OS-UNIX
:NON-BASE-
:IEEE-
:SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)
[SBCL] CL-USER> (ql:quickload :cffi)
To load "cffi":
Load 1 ASDF system:
cffi
; Loading "cffi"
.
(:CFFI)
[SBCL] CL-USER> (ql:quickload :cffi-tests)
To load "cffi-tests":
Load 1 ASDF system:
cffi-tests
; Loading "cffi-tests"
; pkg-config libffi --cflags
-I/Library/
; cc -o /Users/
/Users/
use of undeclared identifier 'FFI_UNIX64'
fprintf(output, "%"PRIiMAX, (intmax_
1 error generated.
debugger invoked on a CFFI-GROVEL:
with command ("cc" "-o" "/Users/
exited with error code 1
If I uncomment the faulty line in libffi-types.lisp
#-(or freebsd windows)
(cenum abi
((:default-abi "FFI_DEFAULT_ABI"))
#-x86-64
((:sysv "FFI_SYSV"))
#-arm64
((:unix64 "FFI_UNIX64")))
cffi-test load without any warning or error, however when I run the test I get this:
[SBCL] CL-USER> (ql:quickload :cffi-tests)
To load "cffi-tests":
Load 1 ASDF system:
cffi-tests
; Loading "cffi-tests"
........
(:CFFI-TESTS)
[SBCL] CL-USER> (asdf:test-system :cffi-tests)
;;; running tests (uncompiled)
Doing 332 pending tests of 332 tests total.
LOAD-CORE-
FUNCALL.LONG-LONG FUNCALL.
FUNCALL.STRING.1 FUNCALL.STRING.2 FUNCALL.STRING.3 FUNCALL.
Test FUNCALL.
Form: (WITH-FOREIGN-
(SETF (MEM-REF S :CHAR) 0)
Expected value: "A"
Actual value: "".
Test FUNCALL.VARARGS.INT failed
Form: (WITH-FOREIGN-
(SETF (MEM-REF S :CHAR) 0)
Expected value: "1000"
Actual value: "0".
Test FUNCALL.
Form: (WITH-FOREIGN-
(SETF (MEM-REF S :CHAR) 0)
Expected value: "131072"
Actual value: "0".
Test FUNCALL.
Form: (WITH-FOREIGN-
(SETF (MEM-REF S :CHAR) 0)
Expected value: "314"
Actual value: "0".
rlwrap: warning: sbcl crashed, killed by SIGSEGV.
rlwrap itself has not crashed, but for transparency,
it will now kill itself (without dumping core) with the same signal
warnings can be silenced by the --no-warnings (-n) option
zsh: segmentation fault rlwrap sbcl