Activity log for bug #1889491

Date Who What changed Old value New value Message
2020-07-30 01:11:54 Ilya Perminov bug added bug
2020-07-31 13:11:33 Luís Oliveira cffi: status New Triaged
2020-07-31 13:11:36 Luís Oliveira cffi: importance Undecided Medium
2020-07-31 17:14:17 Ilya Perminov description I notice a problem with osicat - every time the system is loaded, wrappers.lisp (and everything that depends on it) gets recompiled. It looks like the problem is caused by a cffi bug: compile-op's input file posix/wrappers.processed-wrapper-file is generated after some compile-op's output files: CL-USER> (asdf:input-files 'asdf:compile-op (asdf:find-component :osicat '(:posix "wrappers"))) (#P"/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/wrappers.processed-wrapper-file") CL-USER> (asdf:output-files 'asdf:compile-op (asdf:find-component :osicat '(:posix "wrappers"))) (#P"/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/wrappers.fasl" #P"/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/libosicat.so" #P"/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/wrappers__wrapper.o") ".processed-wrapper-file", ".o", and ".so" files are all generated by the same process-op, and ".processed-wrapper-file" is generated last. As a result the input of the compile-op is newer than two of its outputs (unless everything happens within the same millisecond). The .o and .so files are outputs of compile-op, because of grovel/asdf.lisp: ;;; Declare the .o and .so files as compilation outputs, ;;; so they get picked up by bundle operations. #.(when (version<= "3.1.6" (asdf-version)) '(defmethod output-files ((op compile-op) (c wrapper-file)) (destructuring-bind (generated-lisp lib-file c-file o-file) (output-files 'process-op c) (declare (ignore generated-lisp c-file)) (multiple-value-bind (files translatedp) (call-next-method) (values (append files (list lib-file o-file)) translatedp))))) I notice a problem with osicat - every time the system is loaded, wrappers.lisp (and everything that depends on it) gets recompiled. It looks like the problem is caused by a cffi bug: compile-op's input file posix/wrappers.processed-wrapper-file is generated after some compile-op's output files: CL-USER> (asdf:input-files 'asdf:compile-op (asdf:find-component :osicat '(:posix "wrappers"))) (#P"/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/wrappers.processed-wrapper-file") CL-USER> (asdf:output-files 'asdf:compile-op (asdf:find-component :osicat '(:posix "wrappers"))) (#P"/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/wrappers.fasl"  #P"/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/libosicat.so"  #P"/quicklisp/dists/quicklisp/software/osicat-20180228-git/posix/wrappers__wrapper.o") ".processed-wrapper-file", ".o", and ".so" files are all generated by the same process-op, and ".processed-wrapper-file" is generated last. As a result the input of the compile-op is newer than two of its outputs (unless everything happens within the same second). The .o and .so files are outputs of compile-op, because of grovel/asdf.lisp: ;;; Declare the .o and .so files as compilation outputs, ;;; so they get picked up by bundle operations. #.(when (version<= "3.1.6" (asdf-version))     '(defmethod output-files ((op compile-op) (c wrapper-file))       (destructuring-bind (generated-lisp lib-file c-file o-file) (output-files 'process-op c)         (declare (ignore generated-lisp c-file))         (multiple-value-bind (files translatedp) (call-next-method)           (values (append files (list lib-file o-file)) translatedp)))))