Guest User

Need help with CL/ASDF building executables

a guest
Oct 26th, 2024
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | Source Code | 0 0
  1. I have the following project structure, located in ~/proj/fash:
  2. - .git/
  3. - fash.asd
  4. - Makefile
  5. - src/fash.lisp
  6.  
  7.  
  8. Contents of fash.asd:
  9. >(asdf:defsystem "fash"
  10. > :depends-on ("cl")
  11. > :build-operation program-op
  12. > :components ((:file "src/fash")))
  13.  
  14.  
  15. Contents of src/fash.lisp:
  16. > (defpackage :fash
  17. > (:use :cl)
  18. > (:export
  19. > #:entrypoint))
  20. >
  21. > (in-package :fash)
  22. >
  23. > (defun entrypoint ()
  24. > "Entrypoint for FASH executable."
  25. > (format t "It works!!!"))
  26.  
  27.  
  28. Contents of Makefile:
  29. > fash:
  30. > sbcl --no-userinit --no-sysinit --non-interactive \
  31. > --load ~/lisp/quicklisp/setup.lisp \
  32. > --eval '(load "fash.asd")' \
  33. > --eval '(ql:quickload fash)' \
  34. > --eval "(sb-ext:save-lisp-and-die :executable t :toplevel #'entrypoint)"
  35.  
  36.  
  37. Output from `make fash`:
  38. > sbcl --no-userinit --no-sysinit --non-interactive --load ~/lisp/quicklisp/setup.lisp --eval '(load "fash.asd")' --eval '(ql:quickload fash)' --eval "(sb-ext:save-lisp-and-die :executable t :toplevel #'entrypoint)"
  39. > This is SBCL 2.4.9, an implementation of ANSI Common Lisp.
  40. > More information about SBCL is available at <http://www.sbcl.org/>.
  41. >
  42. > SBCL is free software, provided as is, with absolutely no warranty.
  43. > It is mostly in the public domain; some portions are provided under
  44. > BSD-style licenses. See the CREDITS and COPYING files in the
  45. > > distribution for more information.
  46. > Unhandled UNBOUND-VARIABLE in thread #<SB-THREAD:THREAD tid=118163 "main thread" RUNNING
  47. > {1103F780A3}>:
  48. > The variable FASH is unbound.
  49. >
  50. > Backtrace for: #<SB-THREAD:THREAD tid=118163 "main thread" RUNNING {1103F780A3}>
  51. > 0: (SB-INT:SIMPLE-EVAL-IN-LEXENV FASH #<NULL-LEXENV>)
  52. > 1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (QUICKLISP-CLIENT:QUICKLOAD FASH) #<NULL-LEXENV>)
  53. > 2: (EVAL (QUICKLISP-CLIENT:QUICKLOAD FASH))
  54. > 3: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:LOAD . "/home/tgwil/lisp/quicklisp/setup.lisp") (:EVAL . "(load \"fash.asd\")") (:EVAL . "(ql:quickload fash)") (:EVAL . "(sb-ext:save-lisp-and-die :executable t :toplevel #'entrypoint)") (:QUIT)))
  55. > 4: (SB-IMPL::TOPLEVEL-INIT)
  56. > 5: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
  57. > 6: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
  58. > 7: (SB-IMPL::%START-LISP)
  59. >
  60. > unhandled condition in --disable-debugger mode, quitting
  61. > *** Error code 1
  62. >
  63. > Stop.
  64. > make: stopped in /home/tgwil/proj/fash
Advertisement
Add Comment
Please, Sign In to add comment