On Fri, Jan 12, 2024 at 02:37:03AM +0100, Erica Z wrote:
> hello! i am packaging chicken for a linux distribution, and i have a
> question about the libraries that end in import.so; what is their exact
> role? under which circumstances are they loaded? would they need to be
> available to a distributed program that links to chicken?

Hi Erica,

In normal use, when a program is compiled, it doesn't need the
.import.so files because the import libraries are only consulted to
find out what identifiers are exported by the module being loaded,
and the compiler loads these files when it compiles the program.
In this situation they have a role not unlike header files in C.

The .import.so files are needed when a program dynamically loads a
module.  This happens obviously at the REPL (interactive use) but
there are also some eggs that try to conditionally load extensions,
like for example openssl for optional SSL support.  For such eggs or
programs, the import.so file would still be needed.

Programs that load user code (on a REPL or for configuration purposes)
would also likely need the import.so files, if the user wants to import

In short, you're probably best off including the import.so files in all
CHICKEN-related packages.

Note that it's also possible to statically compile programs.  In those
cases you wouldn't need *any* .so files.


Attachment: signature.asc
Description: PGP signature

Reply via email to