Hi everyone,
I built a binary, I run it on my server but I get an ASDF error:
and my binary exits with an error code.
ASDF looks for itself on the ~/common-lisp/ directory, which doesn't
exist on my VPS, as expected.
Do I have a way to tell ASDF to not do this, so that my binary can
run?
Actually my script doesn't exit right away, it does something, then
exits. So, something in my program or in my dependencies are asking
this operation to ASDF, when probably it shouldn't.
I'm trying to figure it out.
However if there was an easy way to gently ask ASDF not to fail,
that would be a bliss.
Thanks in advance!
More details…
---
I tried one thing.
First, let's show you my .asd declaration.
(in-package :asdf-user)
(defsystem "observatoire"
:version "0"
:depends-on (:ciel
:secret-values
:progressons
)
:components ((:module "src"
:components
((:file "packages")
(:file "common")
(:file "extractor")
(:file "stock")
(:file "ventes")
(:file "observatoire"))))
:build-operation "program-op"
:build-pathname "observatoire"
:entry-point "observatoire::main"
)
I built the binary with asdf:make.
I tried adding these lines at the end of the .asd:
#+asdf (asdf:clear-source-registry)
#+asdf (defun asdf:upgrade-asdf () nil)
This did not help, now I get:
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION QL-DIST:INSTALLEDP (3)>
when called with arguments (NIL)
I had the same issue before, which I bypassed by using Deploy and a
hook, containing those two lines:
(deploy:define-hook (:deploy asdf) (directory)
(declare (ignorable directory))
#+asdf (asdf:clear-source-registry)
#+asdf (defun asdf:upgrade-asdf () NIL))
but unsurprisingly it doesn't help either.
---
I see that ASDF is signaling a load-system-definition-error
condition.
Without knowing the root cause, I don't think handling it would
help.
I'll try to avoid the error:
;; ASDF, find-system.lisp
#'(lambda (condition)
(if (uiop:symbol-call :deploy :deployed-p) ;; added
(warn "asdf: ignoring load-system-definition-error~&") ;; added
(error 'load-system-definition-error
:name (coerce-name s) :pathname pathname :condition condition)))
Here, we use Deploy's (deploy:deployed-p) that tells us when the
binary is running.
It could be another flag.
I'll try and see…
Thanks for any pointers,
Best regards,
Vincent
@vindarel
SBCL 2.1.5
ASDF "3.3.4.15" on my development machine