[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Some questions about CHICKEN 5 eggs and modules

From: Thomas Chust
Subject: [Chicken-users] Some questions about CHICKEN 5 eggs and modules
Date: Tue, 21 Aug 2018 11:55:08 +0200


playing with the new CHICKEN 5 module system and egg format raised a couple of 
questions in my head – perhaps someone on this list can provide a few answers 

- Some eggs install one extension library containing several modules. The new 
CHICKEN module system always tries to load a library named the same as the 
module upon import. Is it no longer possible to separate library loading and 
module import? How can one consume those "compound" libraries now?

- If an (extension ...) form in an .egg file lists modules that have a 
composite name, such as (foo bar), the egg installation process then tries to 
pass the literal "(foo bar)" as a component of the import library name to the 
compiler and it appears in the generated install script. Is this a bug or is it 
intentional? It seems inconsistent with the name mangling using "." between 
module name components that is applied elsewhere.

- How can I specify compiler flags and native library dependencies specific to 
certain target platforms in an .egg file? As far as I can see, the only way to 
do that is a custom build script, but that has problems of its own.

- How can I compile multiple source files, for example one scheme file and 
several C files, into an extension library in an .egg file? As far as I can 
see, the only way to do that is a custom build script, but that has problems of 
its own. In particular it is nearly impossible to do this right in the case of 
static linking, where CHICKEN seems to expect a single object file output (yes, 
ELF object files can be merged, but that's a pain in the rear).

- When I specify a custom build script for an extension library in an .egg 
file, it is used to compile both the extension library and the import 
libraries. Frequently, some special build flags are required for the extension 
library to include / link to native code, but not for the import library. 
Implementing special logic in the build script to differentiate these cases is 
clumsy and error prone. Is there a better way to handle that situation?

- Is there a clean way to install C and Scheme include files somewhere else 
than the default place from an .egg file? It seems to be possible to specify 
absolute target paths, but that is pretty much useless since the prefix of the 
CHICKEN installation is not known at the time the .egg file is written. Also, 
specifying relative *source* paths for include files doesn't even work, if they 
have subdirectory components, because the files get installed in the top level 
target directories but their full relative paths get entered into the .egg-info 
files. An equivalent to custom build scripts doesn't seem to exist for file 
deployment either.

Any helpful insight would be appreciated!


Intelligence may only be the second oldest profession in the world,
but it is more immoral and there are more amateurs practicing it than
the oldest one.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]