Need help from Lisp wizards — looks like I'm missing something simple and obvious (but not so obvious for beginner). I'm trying to build (with ECL) the simple program, which uses ql:quickload to load parse-number, then prints "Hello world". It builds without errors, but resulting binary could not be executed — it prints error message about unknown "ql:quickload" function.

QuickLisp was installed like described in the official documentation. It works in SBCL, it works in ECL REPL and it has the necessary lines in the ~/.eclrc:

;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(ql:quickload '(:slite) :silent t)

The program, itself, runs successfully if I just evaluate the next code in the REPL:

(ql:quickload '(:parse-number) :silent t)

(defpackage :test
(:use :cl))

(in-package :test)

(defun toplevel ()
(print "Hello world"))

(progn
(toplevel)
(ext:quit))

And it compiles:

ecl --eval '(progn (compile-file "test.lisp" :system-p t) (c:build-program "test" :lisp-files '"'"'("test.o")) (quit))'
;;; Loading "/home/drag0n/quicklisp/setup.lisp"
;;; Loading "/usr/local/lib/ecl-24.5.10/asdf.fas"
;;;
;;; Compiling test.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling test.lisp.
;;;

But doesn't print "Hello world":

./test

Condition of type: UNDEFINED-FUNCTION
The function QUICKLISP-CLIENT::QUICKLOAD is undefined.
No restarts available.

Top level in: #<process TOP-LEVEL 0x8295a3f80>.
>

~/g/dotfiles/bin/.cl-bin:master*? λ cat test.lisp
(ql:quickload '(:parse-number) :silent t)

(defpackage :test
  (:use :cl))

(in-package :test)

(defun toplevel ()
  (print "Hello world"))

(progn
  (toplevel)
  (ext:quit))
~/g/dotfiles/bin/.cl-bin:master*? λ ecl --eval '(progn (compile-file "test.lisp" :system-p t) (c:build-program "test" :lisp-files '"'"'("test.o")) (quit))'
;;; Loading #P"/home/drag0n/quicklisp/setup.lisp"
;;; Loading #P"/usr/local/lib/ecl-24.5.10/asdf.fas"
;;;
;;; Compiling test.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Finished compiling test.lisp.
;;;
~/g/dotfiles/bin/.cl-bin:master*? λ ./test

Condition of type: UNDEFINED-FUNCTION
The function QUICKLISP-CLIENT::QUICKLOAD is undefined.
No restarts available.

Top level in: #<process TOP-LEVEL 0x8295a3f80>.
>
0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.bsd.cafe/users/evgandr/statuses/116231591139090531 on your instance and quote it. (Note that quoting is not supported in Mastodon.)