I'm working on a project in Common Lisp that uses GPGME for encryption. GPGME is installed from my distribution's repositories.
The following code works correctly when running in the repl, or if I load the file with --load and --eval '(main)' --eval '(exit)' from the command line, but when I build an executable with sbcl --load gpgme-test.lisp --eval "(sb-ext:save-lisp-and-die #p\"test\" :toplevel #'main :executable t)", I get GPGME returned error: Not operational (Unspecified source) when running the executable.
(eval-when (:compile-toplevel)
(ql:quickload :gpgme))
(require 'gpgme)
(defun main ()
(gpgme:with-context (ctx)
(print (gpgme:get-key ctx "<id here>"))))
I'm building the executable with sbcl's --save-lisp-and-die option. I've also tried building the full project using Deploy with the same results.