結論

そのままningleをquickloadできなかった。

CFFIのバージョンを上げるとできた。 コミットNo.は、 07d5940c869072f2e91444bacb9683bc300243e2



前提条件

2017/01/29現在の情報

SSH接続等の設定済み

sbcl、quicklispはインストール済み

もしかしたら、ASDFのバージョンを上げているかも

RaspberryPi側の設定とバージョン情報

OS: Raspbian

SBCL バージョン: 1.2.4.debian

ASDF バージョン: 3.1.3

操作メモ

1. Ningleのインストール

Quicklispからインストールできるので、 (ql:quickload :ningle) を実行してみる。

すると、以下のエラーが発生した。

pi@raspberrypi:~ $ sbcl This is SBCL 1.2.4.debian, 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. * (ql:quickload :ningle) To load "ningle": Load 1 ASDF system: ningle ; Loading "ningle" ..............; ; caught ERROR: ; READ error during COMPILE-FILE: unmatched close parenthesisLine: 82, Column: 19, File-Position: 2874Stream: #<SB-SYS:FD-STREAM for "file /home/pi/quicklisp/dists/quicklisp/software/cffi_0.17.1/toolchain/c-toolchain.lisp" {52B306F9}> debugger invoked on a LOAD-SYSTEM-DEFINITION-ERROR: Error while trying to load definition for system static-vectors from pathname /home/pi/quicklisp/dists/quicklisp/software/static-vectors-1.6/static-vectors.asd: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "cffi-toolchain" "toolchain" "c-toolchain"> Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [RETRY ] Retry compiling #<CL-SOURCE-FILE "cffi-toolchain" "toolchain" "c-toolchain">. 1: [ACCEPT ] Continue, treating compiling #<CL-SOURCE-FILE "cffi-toolchain" "toolchain" "c-toolchain"> as having been successful. 2: [RETRY ] Retry EVAL of current toplevel form. 3: [CONTINUE ] Ignore error and continue loading file "/home/pi/quicklisp/dists/quicklisp/software/static-vectors-1.6/static-vectors.asd". 4: [ABORT ] Abort loading file "/home/pi/quicklisp/dists/quicklisp/software/static-vectors-1.6/static-vectors.asd". 5: Retry ASDF operation. 6: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration. 7: Give up on "ningle" 8: Exit debugger, returning to top level. ((FLET #:HANDLER1576 :IN ASDF/FIND-SYSTEM:LOAD-ASD) #<COMPILE-FILE-ERROR {52C39DA9}>) 0] 8 ; ; compilation unit aborted ; caught 3 fatal ERROR conditions ; caught 1 ERROR condition *

; READ error during COMPILE-FILE: unmatched close parenthesisLine: 82, Column: 19, File-Position: 2874Stream: #<SB-SYS:FD-STREAM for “file /home/pi/quicklisp/dists/quicklisp/software/cffi_0.17.1/toolchain/c-toolchain.lisp” {52B306F9}>

なにやら、cffiのc-toolchain.lisp内で、括弧が足りない様子

2. 調査のため、CFFIの最新コードを取得

とりあえず、cffiの最新コードをとってきて原因を見てみる。

Quicklispからquickloadできるように、 quicklisp/local-projects に置く。

pi@raspberrypi:~ $ cd ~/quicklisp/local-projects/ pi@raspberrypi:~/quicklisp/local-projects $ git clone https://github.com/cffi/cffi.git Cloning into 'cffi'... remote: Counting objects: 5877, done. remote: Compressing objects: 100% (3/3), done. remote: Total 5877 (delta 0), reused 0 (delta 0), pack-reused 5874 Receiving objects: 100% (5877/5877), 2.39 MiB | 988.00 KiB/s, done. Resolving deltas: 100% (3871/3871), done. Checking connectivity... done.

ためしに、原因のcffi-toolchainをquickloadしてみる。

* (ql:quickload :cffi-toolchain) To load "cffi-toolchain": Load 1 ASDF system: cffi-toolchain ; Loading "cffi-toolchain" .................................................. [package cffi-sys]................................ [package cffi].................................... .................................................. [package cffi-features]... (:CFFI-TOOLCHAIN) *

読みこめた…

3. Ningleの再インストール

まさかと思い、この状態でNingleをquickloadしてみる。

* (ql:quickload :ningle) To load "ningle": Load 1 ASDF system: ningle ; Loading "ningle" .................................................. [package static-vectors].; cc -marm -o /home/pi/.cache/common-lisp/sbcl-1.2.4.debian-linux-arm/home/pi/quicklisp/dists/quicklisp/software/static-vectors-1.6/src/ffi-types__grovel-tmp8UG37QJ5 -I/home/pi/quicklisp/local-projects/cffi/ /home/pi/.cache/common-lisp/sbcl-1.2.4.debian-linux-arm/home/pi/quicklisp/dists/quicklisp/software/static-vectors-1.6/src/ffi-types__grovel.c ; /home/pi/.cache/common-lisp/sbcl-1.2.4.debian-linux-arm/home/pi/quicklisp/dists/quicklisp/software/static-vectors-1.6/src/ffi-types__grovel /home/pi/.cache/common-lisp/sbcl-1.2.4.debian-linux-arm/home/pi/quicklisp/dists/quicklisp/software/static-vectors-1.6/src/ffi-types__grovel.grovel-tmp.lisp ......................... [package fast-io]................................. [package jonathan.error].......................... [package jonathan.util]........................... [package jonathan.encode]......................... [package jonathan.decode]......................... [package jonathan.helper]......................... [package jonathan]................................ [package http-body.multipart]..................... [package http-body.util].......................... [package http-body.json].......................... [package http-body.urlencoded].................... [package http-body]............................... [package lack.request]............................ [package ningle.context].......................... [package ningle.route]............................ [package ningle.app].............................. [package ningle] (:NINGLE) *

こっちも読み込めた…

ということで、clackをインストールし、READMEのプログラムを実行してみる。

* (ql:quickload :clack) To load "clack": Load 1 ASDF system: clack ; Loading "clack" ..... (:CLACK) * (defvar *app* (make-instance 'ningle:<app>)) *APP* * (setf (ningle:route *app* "/") "Welcome to ningle!") "Welcome to ningle!" * (setf (ningle:route *app* "/") "Welcome to ningle!") WARNING: Redefining a route for "/" #(GET). "Welcome to ningle!" * (clack:clackup *app*) Hunchentoot server is going to start. Listening on localhost:5000.

どうやら問題なさそうだ。

ブラウザでもアクセスできる。

原因っぽいもの

どうやら、quicklispでインストールできるのがcffi-0.18.0らしく、それがRaspberryPiと相性が悪いようだ。(詳細は調べてないから、原因ははっきり分からないけど)

今後について

cffiのリリースに注意しつつ、とりあえず運用してみる。

元々、家のローカルネットワーク内でしか動かさないから自分しか困らないし。