Search code examples
common-lispsbclasdf

cffi installation


I'm trying to install cffi package into sbcl. First, I tried clbuild that is recommended on the cffi installation page. When I tried to run :

clbuild quickload cffi

I was given an error saying :

The function ASDF::SOURCE-REGISTRY is undefined.

I then tried asdf-install, it end up complaining about

Component "cffi-examples" not found

Any help on this would be appreciated.

UPDATE

For asdf-install, I'm running sbcl with slime. It seems that whenever it complains about a component that is missing, that component is actually installed. I just have to abort the debugger and restart Emacs, start slime, and do that install again, and it will finish successfully. If I don't run it with slime, just running it inside sbcl prompt in terminal, it will keep complaining about the component missing nonstop.

So to get cffi installed with asdf-install, I had to restart Emacs for about 4-5 times.

I'm not sure if there is configuration issue with sbcl?

I suppose I should ask this question in different thread.


Solution

  • It's pretty easy with Quicklisp. To install Quicklisp:

    Then you can install and load CFFI like so:

    • (ql:quickload "cffi")

    I wrote a bit about how I manage small projects and their required libraries at Making a small Lisp project with quickproject and Quicklisp.