Trashtalk
Trashtalk

Reputation: 341

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.

Upvotes: 4

Views: 377

Answers (2)

coredump
coredump

Reputation: 38809

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"))

Upvotes: 5

Trashtalk
Trashtalk

Reputation: 341

Some extra info from my point:

The solution was to use the newest version of buildapp as @coredump mentioned. I updated by going to the github page, downloading the zip and doing the following commands at the point where buildapp is stored.

$ make
$ cp buildapp /usr/bin

(This of course only works on linux.) This is not an elegant solution but buildapp hasn't updated in 4 years, I think it's a safe enough bet. I also made a mistake with the command. The --entry part is wrong. It should have been: `--entry ltk-colorpicker::main`` where main is a function that takes one variable since that's required by the spec.

Main is just this: (main (i) (declare (ignore i)) (colorpicker))

Upvotes: 1

Related Questions