The lisp program to compile :

library.lisp

(load "~/quicklisp/setup.lisp")
(declaim (optimize (speed 3) (safety 3) (space 0) (debug 3)))
(ql:quickload "defstar")

(defpackage package-library
    (:use #:cl #:defstar)
    (:export printstring))

(in-package :package-library)
(defun* (printstring -> boolean) ((s string))
    (princ s) t)

The lisp program performing the compilation :

compîle.lisp

(declaim (optimize (speed 3) (safety 3) (space 0) (debug 3)))
(load "~/quicklisp/setup.lisp")

(format t "~a~%" "COMPILING library.lisp")
(CL:COMPILE-FILE "library.lisp")

(format t "~a~%" "Done compiling")
(quit)

The script to perform the compilation :

rm *.abcl
echo "COMPILING"
time abcl --noinform --noinit --nosystem --load compile.lisp

The error/bug :


COMPILING library.lisp
; Compiling /mnt/xxx_data/Languages_ok/lisp/abcl/module/library.lisp ...
; (LOAD "~/quicklisp/setup.lisp")
; (DECLAIM (OPTIMIZE # ...))
; (QUICKLISP-CLIENT:QUICKLOAD "defstar")
; (DEFPACKAGE PACKAGE-LIBRARY ...)
Error loading /mnt/xxx_data/Languages_ok/lisp/abcl/module/compile.lisp at line 6 (offset 171)
#: Debugger invoked on condition of type ERROR
  DEFSTAR is not the name of a package.

  • Ok_Specific_7749OPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    Thanks for answering/solving this problem. It was not obvious for me.
    Now i have another question would it be possible to do something similar using sbcl or ccl. I.e. creating a compiled library and calling it from a main.lisp file.