<div dir="ltr">Hi,<br><br>I found a ASDF-related CFFI bug a couple of days ago. Can anyone think of a good way of fixing it?<br><br><div>A method in grovel/asdf.lisp adds output files of process-op to output files of compile-op:</div><div><br></div>;;; Declare the .o and .so files as compilation outputs,<br>;;; so they get picked up by bundle operations.<br>#.(when (version<= "3.1.6" (asdf-version))<br>    '(defmethod output-files ((op compile-op) (c wrapper-file))<br>      (destructuring-bind (generated-lisp lib-file c-file o-file) (output-files 'process-op c)<br>        (declare (ignore generated-lisp c-file))<br>        (multiple-value-bind (files translatedp) (call-next-method)<br>          (values (append files (list lib-file o-file)) translatedp)))))<br><br>As a result inputs and outputs of the ops look like this:<br>process-op:<br>  input: wrapper-file<br>  output: bindings-file.lisp file.c FILE.O FILE.SO<br><br>compile-op:<br>  input: bindings-file.lisp<br>  output: bindings-file.fasl FILE.O FILE.SO<br><br>The problem is that process-op generates file.o and file.so before it generates bindings-file.lisp. Thus compile-op gets re-executed all the time, because its output files file.o and file.so are always older than its input file bindings-file.lisp. And an execution of the compile-op does not change anything, because it does not really generate .o and .so.<br>One way to fix it would be to "touch" .o and .so to get the right order of file modification times, but there may be a better way.<br><br>CFFI bug report: <a href="https://bugs.launchpad.net/cffi/+bug/1889491">https://bugs.launchpad.net/cffi/+bug/1889491</a><br><br>Thanks,<br>Ilya<br></div>