Re: Compiling a binary that uses quicklisp

Daniel KochmaƄski <[email protected]> Fri, 10 Feb 2023 06:07:29 +0000
Newsgroups gmane.lisp.ecl.general
Message-ID <K78lzyjkxECPT-sLYlIIcI5YSZukF-RrDCYUtH8lGL1v_Jd8vtey6on1O6MoR1AGKHUXxFaZUbVnImFuV7QbD1Cc4U7vxmae55q-cxfhE8A=@turtleware.eu>
Hello Brandon,


------- Original Message -------
On Friday, February 10th, 2023 at 00:20, Brandon Hale <bthaleproductions@gm=
ail.com> wrote:


> Hello all,
>=20
> I apologize if this is either the wrong place to get help with ecl, or if=
 this is asked all of the time.=20

this is the right place, don't worry :)


> I've written a small replacement for i3status with common lisp and want t=
o use ecl to make a binary so when i3wm loads, it just loads the cl-i3statu=
s binary. I've looked at the ecl documentation online and it suggests doing=
 something like this:
>=20
> (ql:quickload :cl-i3)
>=20
> (asdf:make-build :cl-i3
>=20
>                  :type :program
>=20
>                  :move-here #P"/home/brandon/Programming/lisp/cl-i3/"
>=20
>                  :prologue-code '(require 'asdf))
>=20
> So, I run this and the binary appears. However, when I try to run it, I g=
et this output:
>=20
> ;;; Loading #P"/usr/lib/ecl-21.2.1/asdf.fas"
> ;;; Computing Hangul syllable names
> Condition of type: MISSING-COMPONENT
> Component "str" not found
>=20
> Available restarts:
>=20
> 1. (RETRY) Retry ASDF operation.
> 2. (CLEAR-CONFIGURATION-AND-RETRY) Retry ASDF operation after resetting t=
he configuration.
>=20
> Top level in: #<process TOP-LEVEL 0x557ade1c2f80>.
> >
>=20
> I imagine it is just because of my use of quicklisp packages, but how do =
I compile the packages into the binary?

this error message seems to suggest that you use a system "str" without dec=
laring it in dependencies. In your
project file my-project.asd add

(defsystem "my-project"
  ...
  :depends-on (... "str")
  ...)

depending on what you want from your project you may not need (require 'asd=
f) in the prologue code. Also you
may consider passing :monolithic t flag to make-build.

Make sure that you study well-commented example in ecl source repository un=
der examples/asdf_with_dependence/.

Last but not least make sure that you use the latest release (currently it =
is 21.2.1) or a build from the branch
"develop" if you are not afraid of cutting your self on the bleeding edge ;=
).

If none of these advises helps then please try to minimize the test case to=
 the minimum (basically an asd system
with a singly stub file and all dependencies you need) and make an issue ti=
cket on gitlab

https://gitlab.com/embeddable-common-lisp/ecl/-/issues

mind that such action requires registration on the gitlab platform.

>=20
> Thank you very much for any help you can offer,
>=20
> Brandon Hale

Best regards,
Daniel

--
Daniel Kochma=C5=84ski ;; aka jackdaniel | Przemy=C5=9Bl, Poland
TurtleWare - Daniel Kochma=C5=84ski=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | www.tur=
tleware.eu

"Be the change that you wish to see in the world." - Mahatma Gandhi