Hi there, I'm trying to package Incudine, a Music/DSP programming environment for Common Lisp. I'm stuck with the binding of libsndfile. First libsndfile.so could not be found, but I fixed the paths like it is commonly done in other CL packages. Next problem is that somehow the bindings are not working. The error I get:
> file: > /gnu/store/s2657snmavhsnqyr0hf6f8a2v1lvrln2-sbcl-incudine-0.0.0-1.21c99e4/share/common-lisp/sbcl/incudine/contrib/cl-sndfile/cffi-sndfile.lisp > in: DEFUN MAKE-SNDINFO > (CFFI:FOREIGN-TYPE-SIZE '(:STRUCT SNDFILE:INFO)) > > caught WARNING: > Error during compiler-macroexpansion of > (CFFI:FOREIGN-TYPE-SIZE '(:STRUCT INFO)). Use *BREAK-ON-SIGNALS* to > intercept. > > Unknown CFFI type (:STRUCT INFO) Now in the source file `cffi-sndfile.lisp`, there is: > (declaim (inline make-sndinfo)) > (defun make-sndinfo (&optional pointer) > (%make-sndinfo > :pointer (or pointer > (cffi:foreign-alloc :int8 > :count (cffi:foreign-type-size '(:struct info)) > :initial-element 0)))) > > [...] > > (cffi:defcstruct info > (frames sf-count) > (sample-rate :int) > (channels :int) > (format :int) > (sections :int) > (seekable :int)) If I look at the source `sndfile.h` (which is present in source/.cl-union) there is: > struct SF_INFO > { sf_count_t frames ; /* Used to be called samples. > Changed to avoid confusion. */ > int samplerate ; > int channels ; > int format ; > int sections ; > int seekable ; > } ; So things look like they should match. Is there something I'm missing here? I have 0 experience with CFFI bindings, so there might be something obvious I'm missing. Cheers Théo