<div>Do you have the source code of uiop available in the central registry? Quicklisp won't<br></div><div>download it, because asdf considers it being preloaded. Also, if so, do you have uiop<br></div><div>listed as a dependency?<br></div><div><br></div><div>Alternatively you may add asdf as a dependency to your system.<br></div><div><br></div><div>Regards,<br></div><div>Daniel<br></div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user"><div>--<br></div><div>Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland<br></div><div>TurtleWare - Daniel Kochmański      | <a href="http://www.turtleware.eu">www.turtleware.eu</a><br></div><div><br></div><div>"Be the change that you wish to see in the world." - Mahatma Gandhi<br></div><div><br></div></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Tuesday, 1 December 2020 22:01, Иван Трусков <trus19@gmail.com> wrote:<br></div><div> <br></div><blockquote class="protonmail_quote" type="cite"><div dir="ltr"><div>Thank you very much. After rebuilding with newer version of ecl and with :init-name supplied compilation was a success.<br></div><div><br></div><div>However, when i try to run the resulting executable, i get this error:<br></div><div><br></div><div><div>Condition of type: SIMPLE-ERROR<br></div><div>Package ((UIOP/STREAM . #<UIOP/STREAM package>)) referenced in compiled file<br></div><div>  NIL<br></div><div>but has not been created<br></div><div><br></div><div>Available restarts:<br></div><div><br></div><div>1. (IGNORE) Ignore the error, and try the operation again<br></div></div><div><br></div><div>What should be done in this situation and how can i avoid it? Searching internet with this message did not yield any meaningful results (except for one Stackoverflow post that tells about having the same mistake).<br></div></div><div><br></div><div class="gmail_quote"><div dir="ltr">вт, 1 дек. 2020 г. в 22:15, Marius Gerbershagen <<a href="mailto:marius.gerbershagen@gmail.com">marius.gerbershagen@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>The generated library does indeed contain all systems that your library <br></div><div> contains on. The undefined references are init functions, which need to <br></div><div> be called via ecl_init_module after cl_boot to initialize the compiled <br></div><div> libraries (see <br></div><div> <a href="https://common-lisp.net/project/ecl/static/manual/System-building.html#Build-it-as-shared-library-and-use-in-C" rel="noreferrer" target="_blank">https://common-lisp.net/project/ecl/static/manual/System-building.html#Build-it-as-shared-library-and-use-in-C</a> <br></div><div> for more details).<br></div><div> <br></div><div> Since you didn't specify an explicit init name yourself, init functions <br></div><div> are automatically generated for each system contained in the final <br></div><div> library. When compiling a monolithic library, it is preferable to <br></div><div> specify an explicit init name yourself, for example as<br></div><div> <br></div><div> (asdf:make-build :embedded-console :type :static-library :move-here <br></div><div> #P"/my/output/dir" :monolithic t :init-name "init_lib_embedded_console")<br></div><div> <br></div><div> and then invoke it using<br></div><div> <br></div><div> extern void init_lib_embedded_console(cl_object);<br></div><div> /* ... */<br></div><div> cl_boot(argc, argv);<br></div><div> ecl_init_module(NULL, init_lib_embedded_console);<br></div><div> <br></div><div> Am 29.11.20 um 13:17 schrieb Иван Трусков:<br></div><div> > Hello. I am trying to make a library that makes use of 'STR' package and <br></div><div> > link it into my C program.<br></div><div> > I presumed that using :monolithic t flag would result in the static <br></div><div> > library that contained all systems my library depends on. However it <br></div><div> > seems that is not the case.<br></div><div> > <br></div><div> > Here is my .asd file:<br></div><div> > <br></div><div> > (defsystem "embedded-console"<br></div><div> >    :description "embedded console - ECL functions for smart snake game"<br></div><div> >    :author "Ivan Truskov <<a href="mailto:trus19@gmail.com" target="_blank">trus19@gmail.com</a> <mailto:<a href="mailto:trus19@gmail.com" target="_blank">trus19@gmail.com</a>>>"<br></div><div> >    :components ((:file "embedded-console"))<br></div><div> >    :depends-on ("str"))<br></div><div> > <br></div><div> > I am compiling the library with command:<br></div><div> > <br></div><div> > ecl -norc -eval '(require :ecl-quicklisp)'<br></div><div> >                      -eval '(push \"/my/src/dir/\" asdf:*central-registry*)'<br></div><div> >                      -eval '(asdf:make-build :embedded-console :type <br></div><div> > :static-library :move-here \#P\"/my/output/dir}\" :monolithic t )'<br></div><div> >                      -eval '(quit)'<br></div><div> > <br></div><div> > However, when i try to link with resulting library, this is what i get:<br></div><div> > <br></div><div> > ... undefined reference to `init_lib_CL_PPCRE'<br></div><div> > ... undefined reference to `init_lib_BASE'<br></div><div> > ... undefined reference to `init_lib_CL_UNICODE'<br></div><div> > ... undefined reference to `init_lib_CL_PPCRE_UNICODE'<br></div><div> > ... undefined reference to `init_lib_CL_CHANGE_CASE'<br></div><div> > ... undefined reference to `init_lib_STR'<br></div><div> > ... undefined reference to `init_lib_EMBEDDED_CONSOLE'<br></div><div> > <br></div><div> > And indeed, when i run nm over the built file <br></div><div> > embedded-console--all-systems.a, this is output:<br></div><div> > <br></div><div> > eclinitVtJU9J.o:<br></div><div> > 0000000000000000 b Cblock.10857<br></div><div> >                   U cl_boot<br></div><div> >                   U cl_symbols<br></div><div> >                   U _ecl_frs_push<br></div><div> >                   U ecl_init_module<br></div><div> >                   U ecl_make_codeblock<br></div><div> >                   U ecl_process_env<br></div><div> >                   U _GLOBAL_OFFSET_TABLE_<br></div><div> >                   U init_lib_BASE<br></div><div> >                   U init_lib_CL_CHANGE_CASE<br></div><div> >                   U init_lib_CL_PPCRE<br></div><div> >                   U init_lib_CL_PPCRE_UNICODE<br></div><div> >                   U init_lib_CL_UNICODE<br></div><div> >                   U init_lib_EMBEDDED_CONSOLE<br></div><div> > 0000000000000000 T init_lib_EMBEDDED_CONSOLE__ALL_SYSTEMS<br></div><div> >                   U init_lib_STR<br></div><div> > 0000000000000110 T main_lib_EMBEDDED_CONSOLE__ALL_SYSTEMS<br></div><div> >                   U _setjmp<br></div><div> > nm: cl-ppcre.a: File format not recognized<br></div><div> > nm: base.a: File format not recognized<br></div><div> > nm: cl-unicode.a: File format not recognized<br></div><div> > nm: cl-ppcre-unicode.a: File format not recognized<br></div><div> > nm: cl-change-case.a: File format not recognized<br></div><div> > nm: str.a: File format not recognized<br></div><div> > nm: embedded-console.a: File format not recognized<br></div><div> > <br></div><div> > What am i doing wrong? What should i change to get static library <br></div><div> > containing all systems i am intending to use (and maybe only them, if <br></div><div> > possible)?<br></div><div> <br></div></blockquote></div></blockquote><div><br></div>