Search code examples
common-lispquicklispasdf

How to fix asdf error when using buildapp on a quicklisp project


I've been making my first quicklisp project lately and I wanted to share it. I've put it on github, but not everyone has emacs + slime + quicklisp installed so I wanted to make an executable I could put with the code.

To do this I'm using buildapp and following the steps laid out in this stackoverflow answer.

$ sbcl --no-userinit --no-sysinit --non-interactive \
       --load ~/quicklisp/setup.lisp \
       --eval '(ql:quickload "ltk-colorpicker")' \
       --eval '(ql:write-asdf-manifest-file "quicklisp-manifest.txt")'

$ buildapp --output out \
           --manifest-file quicklisp-manifest.txt \
           --load-system ltk-colorpicker \
           --entry colorpicker

After running those commands I get the following error:

Fatal INPUT-ERROR-IN-LOAD:
  READ error during LOAD:

    The symbol "*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*" is not external in the ASDF/FIND-SYSTEM package.

      Line: 16, Column: 90, File-Position: 15267

      Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/nathan/quicklisp/local-projects/ltk-colorpicker/dumper-2SKVI5f7.lisp" {1001B70F83}>

The main problem here is that I don't even have a clue at how to begin to fix it. I've seen this gibhub issue, but that had to do with problems with Homebrew and it never even mentions buildapp. It's all very confusing. And I hope I could get some help.

Thanks in advance for any answers.


Solution

  • I can reproduce the error. As suggested in the comments, you can build an up-to-date version of buildapp as follows:

    $ sbcl
    * (ql:quickload :buildapp)
    ...
    
    * (buildapp:build-buildapp 
        (merge-pathnames "bin/buildapp" (user-homedir-pathname)))
    

    This build $HOME/bin/buildapp. When I use the new binary, there is no error anymore.

    You can also avoid generating an executable (that can end up being outdated) by systematically calling the buildapp::main function from Common Lisp; you will then always have the version that corresponds to the current release of quicklisp:

    * (buildapp::main 
        '("BUILDAPP" ;; argv[0] must exist but the value is not important
          "--manifest-file" "/tmp/quicklisp-manifest.txt" 
          "--load-system" "drakma" "--output" "/tmp/test"))