For some weird reasons I manage to compile this reluctant file in an
interactive session by accepting the error in the debugger and retrying
compilation later on when the compiled file is required.

Not sure in what retrying a compilation on the interactive debugger is
different from compiling normally. But I need to understand why the
retrying of compilation does in order to replicate it without the need
of an interactive session.

Here are the logs:
This is the first error where where I accept:

> ASDF could not load incudine because
> COMPILE-FILE-ERROR while
> compiling #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" 
> "cffi-sndfile">.
> While evaluating the form starting at line 3, column 0
>   of #P"/home/teddd/src/music/incudine/require.lisp":

> debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
> #<THREAD tid=19946 "main thread" RUNNING {100AFF0113}>:
>   COMPILE-FILE-ERROR while
>   compiling #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" 
> "cffi-sndfile">

> 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 #<INCUDINE-SOURCE-FILE 
> "incudine" "contrib/cl-sndfile" "cffi-sndfile">.
>   1: [ACCEPT                       ] Continue, treating
>                                      compiling #<INCUDINE-SOURCE-FILE 
> "incudine" "contrib/cl-sndfile" "cffi-sndfile">
>                                      as having been successful.
>   2:                                 Retry ASDF operation.
>   3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
>                                      configuration.
>   4:                                 Retry ASDF operation.
>   5:                                 Retry ASDF operation after resetting the
>                                      configuration.
>   6: [RETRY                        ] Retry EVAL of current toplevel form.
>   7: [CONTINUE                     ] Ignore error and continue loading file 
> "/home/teddd/src/music/incudine/require.lisp".
>   8: [ABORT                        ] Abort loading file 
> "/home/teddd/src/music/incudine/require.lisp".
>   9:                                 Ignore runtime option --load 
> "require.lisp".
>  10:                                 Skip rest of --eval and --load options.
>  11:                                 Skip to toplevel READ/EVAL/PRINT loop.
>  12: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the 
> process).

> (UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T 
> "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . 
> #<ASDF/USER::INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" 
> "cffi-sndfile">)))
> ; File has been modified since compilation:
> ;   SYS:CONTRIB;ASDF;ASDF.LISP.NEWEST
> ; Using form offset instead of character position.

>    source: (ERROR 'COMPILE-FILE-ERROR :CONTEXT-FORMAT CONTEXT-FORMAT
>                   :CONTEXT-ARGUMENTS CONTEXT-ARGUMENTS)
> 0] 1

Then comes the second error where I retry compilation:

> ASDF could not load incudine because
> Couldn't load
> #P"/home/teddd/.cache/common-lisp/sbcl-2.3.5-linux-x64/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile.fasl":
> file does not exist..
> While evaluating the form starting at line 3, column 0
>   of #P"/home/teddd/src/music/incudine/require.lisp":

> debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
> #<THREAD tid=19946 "main thread" RUNNING {100AFF0113}>:
>   Couldn't load
>   
> #P"/home/teddd/.cache/common-lisp/sbcl-2.3.5-linux-x64/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile.fasl":
>   file does not exist.

> Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

> restarts (invokable by number or by possibly-abbreviated name):
>   0: [TRY-RECOMPILING              ] Recompile cffi-sndfile and try loading 
> it again
>   1: [RETRY                        ] Retry loading FASL for
>    #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">.
>   2: [ACCEPT                       ] Continue, treating loading FASL for
>    #<INCUDINE-SOURCE-FILE "incudine" "contrib/cl-sndfile" "cffi-sndfile">
>                                      as having been successful.
>   3:                                 Retry ASDF operation.
>   4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
>                                      configuration.
>   5:                                 Retry ASDF operation.
>   6:                                 Retry ASDF operation after resetting the
>                                      configuration.
>   7: [RETRY                        ] Retry EVAL of current toplevel form.
>   8: [CONTINUE                     ] Ignore error and continue loading file 
> "/home/teddd/src/music/incudine/require.lisp".
>   9: [ABORT                        ] Abort loading file 
> "/home/teddd/src/music/incudine/require.lisp".
>  10:                                 Ignore runtime option --load 
> "require.lisp".
>  11:                                 Skip rest of --eval and --load options.
>  12:                                 Skip to toplevel READ/EVAL/PRINT loop.
>  13: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the 
> process).

> (LOAD 
> #P"/home/teddd/.cache/common-lisp/sbcl-2.3.5-linux-x64/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile.fasl"
>  :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
> 0] 0
> ; compiling file 
> "/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile.lisp" 
> (written 28 SEP 2023 03:02:26 PM):

> ; wrote 
> /home/teddd/.cache/common-lisp/sbcl-2.3.5-linux-x64/home/teddd/src/music/incudine/contrib/cl-sndfile/cffi-sndfile-tmpJAIDFZTC.fasl
> ; compilation finished in 0:00:00.132

Tada. Any idea how I could achieve this without an interactive session ?

Reply via email to