Re: Compiling a binary that uses quicklisp
Brandon Hale <[email protected]> Fri, 10 Feb 2023 14:02:19 -0500
| Newsgroups | gmane.lisp.ecl.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------BarkyLnhMaBTw4Ooyk8rvBkA Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Maybe I should get my project up in a repo, but it looks like I have the dependency listed. Here is my package's .asd named cl-i3.asd: (asdf:defsystem #:cl-i3 :name "cl-i3" :description "A replacement for i3status written in Common Lisp." :author "Brandon Hale<[email protected]>" :license "GPLv3" :version "1.0" :depends-on (#:cl-ansi-text #:trivial-battery #:str) :components ((:file "main"))) And the top portion of my main.lisp: (ql:quickload :trivial-battery) (ql:quickload :str) ;; allows for colors to be printed (ql:quickload :cl-ansi-text) (defpackage :cl-i3 (:use #:common-lisp)) I am definitely not an expert on Common Lisp packages, but this does load up in slime on my machine when I do a (ql:quickload :cl-i3) with ecl 21.2.1-3 from Arch Linux. I need to look at the well-commented example again to see what I'm doing wrong methinks. Brandon Hale On 2/10/23 01:07, Daniel Kochmański wrote: > Hello Brandon, > > > ------- Original Message ------- > On Friday, February 10th, 2023 at 00:20, Brandon Hale<[email protected]> wrote: > > >> Hello all, >> >> I apologize if this is either the wrong place to get help with ecl, or if this is asked all of the time. > this is the right place, don't worry :) > > >> I've written a small replacement for i3status with common lisp and want to use ecl to make a binary so when i3wm loads, it just loads the cl-i3status binary. I've looked at the ecl documentation online and it suggests doing something like this: >> >> (ql:quickload :cl-i3) >> >> (asdf:make-build :cl-i3 >> >> :type :program >> >> :move-here #P"/home/brandon/Programming/lisp/cl-i3/" >> >> :prologue-code '(require 'asdf)) >> >> So, I run this and the binary appears. However, when I try to run it, I get this output: >> >> ;;; Loading #P"/usr/lib/ecl-21.2.1/asdf.fas" >> ;;; Computing Hangul syllable names >> Condition of type: MISSING-COMPONENT >> Component "str" not found >> >> Available restarts: >> >> 1. (RETRY) Retry ASDF operation. >> 2. (CLEAR-CONFIGURATION-AND-RETRY) Retry ASDF operation after resetting the configuration. >> >> Top level in: #<process TOP-LEVEL 0x557ade1c2f80>. >> 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 declaring 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 'asdf) 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 under 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 ticket on gitlab > > https://gitlab.com/embeddable-common-lisp/ecl/-/issues > > mind that such action requires registration on the gitlab platform. > >> Thank you very much for any help you can offer, >> >> Brandon Hale > Best regards, > Daniel > > -- > Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland > TurtleWare - Daniel Kochmański |www.turtleware.eu > > "Be the change that you wish to see in the world." - Mahatma Gandhi > --------------BarkyLnhMaBTw4Ooyk8rvBkA Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Maybe I should get my project up in a repo, but it looks like I have the dependency listed. Here is my package's .asd named cl-i3.asd:</p> <p></p> <pre>(asdf:defsystem #:cl-i3</pre> <pre> :name "cl-i3"</pre> <pre> :description "A replacement for i3status written in Common Lisp."</pre> <pre> :author "Brandon Hale <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><[email protected]></a>"</pre> <pre> :license "GPLv3"</pre> <pre> :version "1.0"</pre> <pre> :depends-on (#:cl-ansi-text #:trivial-battery #:str)</pre> <pre> :components ((:file "main")))</pre> <p>And the top portion of my main.lisp:</p> <pre>(ql:quickload :trivial-battery)</pre> <pre>(ql:quickload :str)</pre> <pre>;; allows for colors to be printed</pre> <pre>(ql:quickload :cl-ansi-text)</pre> <pre> (defpackage :cl-i3</pre> <pre> (:use #:common-lisp))</pre> <p>I am definitely not an expert on Common Lisp packages, but this does load up in slime on my machine when I do a <br> </p> <pre>(ql:quickload :cl-i3) </pre> <p>with ecl 21.2.1-3 from Arch Linux.</p> <p><br> </p> <p>I need to look at the well-commented example again to see what I'm doing wrong methinks.</p> <p>Brandon Hale<br> </p> <div class="moz-cite-prefix">On 2/10/23 01:07, Daniel Kochmański wrote:<br> </div> <blockquote type="cite" cite="mid:K78lzyjkxECPT-sLYlIIcI5YSZukF-RrDCYUtH8lGL1v_Jd8vtey6on1O6MoR1AGKHUXxFaZUbVnImFuV7QbD1Cc4U7vxmae55q-cxfhE8A=@turtleware.eu"> <pre class="moz-quote-pre" wrap="">Hello Brandon, ------- Original Message ------- On Friday, February 10th, 2023 at 00:20, Brandon Hale <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><[email protected]></a> wrote: </pre> <blockquote type="cite"> <pre class="moz-quote-pre" wrap="">Hello all, I apologize if this is either the wrong place to get help with ecl, or if this is asked all of the time. </pre> </blockquote> <pre class="moz-quote-pre" wrap=""> this is the right place, don't worry :) </pre> <blockquote type="cite"> <pre class="moz-quote-pre" wrap="">I've written a small replacement for i3status with common lisp and want to use ecl to make a binary so when i3wm loads, it just loads the cl-i3status binary. I've looked at the ecl documentation online and it suggests doing something like this: (ql:quickload :cl-i3) (asdf:make-build :cl-i3 :type :program :move-here #P"/home/brandon/Programming/lisp/cl-i3/" :prologue-code '(require 'asdf)) So, I run this and the binary appears. However, when I try to run it, I get this output: ;;; Loading #P"/usr/lib/ecl-21.2.1/asdf.fas" ;;; Computing Hangul syllable names Condition of type: MISSING-COMPONENT Component "str" not found Available restarts: 1. (RETRY) Retry ASDF operation. 2. (CLEAR-CONFIGURATION-AND-RETRY) Retry ASDF operation after resetting the configuration. Top level in: #<process TOP-LEVEL 0x557ade1c2f80>. </pre> <blockquote type="cite"> <pre class="moz-quote-pre" wrap=""> </pre> </blockquote> <pre class="moz-quote-pre" wrap=""> I imagine it is just because of my use of quicklisp packages, but how do I compile the packages into the binary? </pre> </blockquote> <pre class="moz-quote-pre" wrap=""> this error message seems to suggest that you use a system "str" without declaring 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 'asdf) 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 under 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 ticket on gitlab <a class="moz-txt-link-freetext" href="https://gitlab.com/embeddable-common-lisp/ecl/-/issues">https://gitlab.com/embeddable-common-lisp/ecl/-/issues</a> mind that such action requires registration on the gitlab platform. </pre> <blockquote type="cite"> <pre class="moz-quote-pre" wrap=""> Thank you very much for any help you can offer, Brandon Hale </pre> </blockquote> <pre class="moz-quote-pre" wrap=""> Best regards, Daniel -- Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland TurtleWare - Daniel Kochmański | <a class="moz-txt-link-abbreviated" href="http://www.turtleware.eu">www.turtleware.eu</a> "Be the change that you wish to see in the world." - Mahatma Gandhi </pre> </blockquote> </body> </html> --------------BarkyLnhMaBTw4Ooyk8rvBkA--