Discussion:
[Chicken-users] Some questions about CHICKEN 5 eggs and modules
f***@bevuta.com
2018-08-28 18:40:33 UTC
Permalink
Hi, Thomas!

I'll try to address some of your questions.
- 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?
To simplify the confusion related to "require-extension", "use", etc.
"import" does now both loading and import in one step. "Compound" libraries
(in the sense of putting more than one module into a single binary) must be
done manually and is not directly supported by the new system. You can
split up your extension into multiple modules and let them load recursively,
by using a wrapper module that imports and reexports bindings, if you need
this.

The underlying machinery is still the same, but in the interest of making
things simpler for the user, the high-level view that can be specified in
egg files provides fewer options. In theory more complex build situations
could be supported, but that would make the egg build system very complex,
as it already has to work across a range of platforms.
- 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.
This is a bug. Compound names should be canonicalized using "." syntax
when they appear in user forms. If you can provide a simple example, we can
try to address this.
- 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.
That is correct. Some mechanism may be provided in the future, I'm not sure
about the details, though. If you can specify "has problems of its own" in
more detail, we can try to address these.
- 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).
Yes, use a custom build script. I'm working on a way to handle the case of separate
..c files that need to be linked. Due to how we support static linking this is
not trivial.
- 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?
That is a bug. The import library should not be passed to the custom build.
A patch is currently pending on chicken-hackers.
- 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.
Installation into system paths seems to me somewhat questionable -
files installed for CHICKEN should end in a location specific to that
CHICKEN installation. If you can give a specific example where this
is useful, I'd appreciate it.

A final note: don't expect too much of chicken-install: it is neither a
package system, nor it is a general build system. It addresses the basic
need of installing Scheme libraries. These may use foreign code and
we will try to work on supporting the most common cases.
But not all scenarios can be convered, as you will surely understand,
the different OS- and toolchain-idiosynchrasies are already making
this a serious piece of work. If you have very specialized build- and/or
usage-cases, consider distributing the code not as an egg but as a
normal library using whatever build system you prefer.

Hope this helps.


felix
Ivan Raikov
2018-08-28 19:13:50 UTC
Permalink
Hi Felix,

I think this last question about installing include files is closely
related to my question, so let me try to clarify.

I have a couple of eggs that generate and compile code similar to the
way chicken-crunch works. These eggs would install header or source
files that are required for the compilation process. Some of these
source files belong to distinct functional modules that are organized
in subdirectories. In CHICKEN 4, it was possible to install these
files to corresponding subdirectories of CHICKEN_PREFIX/share/chicken,
thus preserving the logical structure. In CHICKEN 5, this is currently
not possible, but I think it would be a very convenient feature. We
can of course define our own conventions and install the additional
files into subdirectories of $HOME, but it makes more sense to me to
keep them in the CHICKEN directory hierarchy. I hope this makes sense.

Best regards,
-Ivan
<snip>
- 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.
Installation into system paths seems to me somewhat questionable -
files installed for CHICKEN should end in a location specific to that
CHICKEN installation. If you can give a specific example where this
is useful, I'd appreciate it.
A final note: don't expect too much of chicken-install: it is neither a
package system, nor it is a general build system. It addresses the basic
need of installing Scheme libraries. These may use foreign code and
we will try to work on supporting the most common cases.
But not all scenarios can be convered, as you will surely understand,
the different OS- and toolchain-idiosynchrasies are already making
this a serious piece of work. If you have very specialized build- and/or
usage-cases, consider distributing the code not as an egg but as a
normal library using whatever build system you prefer.
f***@bevuta.com
2018-08-28 20:07:05 UTC
Permalink
Post by Ivan Raikov
I have a couple of eggs that generate and compile code similar to the
way chicken-crunch works. These eggs would install header or source
files that are required for the compilation process. Some of these
source files belong to distinct functional modules that are organized
in subdirectories. In CHICKEN 4, it was possible to install these
files to corresponding subdirectories of CHICKEN_PREFIX/share/chicken,
thus preserving the logical structure. In CHICKEN 5, this is currently
not possible, but I think it would be a very convenient feature. We
can of course define our own conventions and install the additional
files into subdirectories of $HOME, but it makes more sense to me to
keep them in the CHICKEN directory hierarchy. I hope this makes sense.
So the basic problem is to install multiple sets of files, in separate
steps? I think for "scheme-include" components this should be possible,
but (as far as I can see) this is not currently possible for "c-include"
components (but could be added).


felix
Ivan Raikov
2018-08-28 21:24:47 UTC
Permalink
Yes, exactly, the issue is installing multiple sets of files in
different subdirectories of PREFIX/{include,share}. It would be very
useful for "c-include" as well as "data" components.
Thanks,

-Ivan
Post by f***@bevuta.com
Post by Ivan Raikov
I have a couple of eggs that generate and compile code similar to the
way chicken-crunch works. These eggs would install header or source
files that are required for the compilation process. Some of these
source files belong to distinct functional modules that are organized
in subdirectories. In CHICKEN 4, it was possible to install these
files to corresponding subdirectories of CHICKEN_PREFIX/share/chicken,
thus preserving the logical structure. In CHICKEN 5, this is currently
not possible, but I think it would be a very convenient feature. We
can of course define our own conventions and install the additional
files into subdirectories of $HOME, but it makes more sense to me to
keep them in the CHICKEN directory hierarchy. I hope this makes sense.
So the basic problem is to install multiple sets of files, in separate
steps? I think for "scheme-include" components this should be possible,
but (as far as I can see) this is not currently possible for "c-include"
components (but could be added).
felix
Thomas Chust
2018-08-29 09:44:54 UTC
Permalink
Hello,

multiple sets of files may already be possible with multiple component forms in the .egg, but installation into any nested subdirectories relative to the CHICKEN installation prefix is currently not possible.

For example, some include files provided with the protocol buffers egg would technically have to be stored in certain subdirectories of the C include path (<include>/extend/protobuf/...) for the protocol buffer compiler to pick them up correctly. Currently I have to move those files around manually after installation.

Ciao,
Thomas
Post by Ivan Raikov
Yes, exactly, the issue is installing multiple sets of files in
different subdirectories of PREFIX/{include,share}. It would be very
useful for "c-include" as well as "data" components.
Thanks,
-Ivan
Post by f***@bevuta.com
Post by Ivan Raikov
I have a couple of eggs that generate and compile code similar to the
way chicken-crunch works. These eggs would install header or source
files that are required for the compilation process. Some of these
source files belong to distinct functional modules that are organized
in subdirectories. In CHICKEN 4, it was possible to install these
files to corresponding subdirectories of CHICKEN_PREFIX/share/chicken,
thus preserving the logical structure. In CHICKEN 5, this is currently
not possible, but I think it would be a very convenient feature. We
can of course define our own conventions and install the additional
files into subdirectories of $HOME, but it makes more sense to me to
keep them in the CHICKEN directory hierarchy. I hope this makes sense.
So the basic problem is to install multiple sets of files, in separate
steps? I think for "scheme-include" components this should be possible,
but (as far as I can see) this is not currently possible for "c-include"
components (but could be added).
felix
_______________________________________________
Chicken-users mailing list
https://lists.nongnu.org/mailman/listinfo/chicken-users
--
Life is not a battle to win but a melody to sing.
-- Amit Ray
f***@bevuta.com
2018-08-29 12:09:01 UTC
Permalink
Post by Thomas Chust
Hello,
multiple sets of files may already be possible with multiple component forms in the .egg, but installation into any nested subdirectories relative to the CHICKEN installation prefix is currently not possible.
For example, some include files provided with the protocol buffers egg would technically have to be stored in certain subdirectories of the C include path (<include>/extend/protobuf/...) for the protocol buffer compiler to pick them up correctly. Currently I have to move those files around manually after installation.
Can you supply me with a sample .egg file that specifies
the case you'd like to have supported?


felix
Thomas Chust
2018-08-29 14:24:18 UTC
Permalink
Post by f***@bevuta.com
Post by Thomas Chust
[...]
multiple sets of files may already be possible with multiple component forms in the .egg, but installation into any nested subdirectories relative to the CHICKEN installation prefix is currently not possible.
For example, some include files provided with the protocol buffers egg would technically have to be stored in certain subdirectories of the C include path (<include>/extend/protobuf/...) for the protocol buffer compiler to pick them up correctly. Currently I have to move those files around manually after installation.
Can you supply me with a sample .egg file that specifies
the case you'd like to have supported?
[...]
Hello Felix,

you could take a look at protobuf.egg in the CHICKEN 5 branch[1]. There
you will find a clause that reads:

(c-include extend/protobuf
(files
"extend/protobuf/bigint.proto"
"extend/protobuf/chicken.proto"))

What I would like is to install these files as

<PREFIX>/include/extend/protobuf/bigint.proto
<PREFIX>/include/extend/protobuf/chicken.proto

what actually happens is that these files are installed as

<PREFIX>/include/chicken/bigint.proto
<PREFIX>/include/chicken/chicken.proto

but the .egg-info file lists

<PREFIX>/include/chicken/extend/protobuf/bigint.proto
<PREFIX>/include/chicken/extend/protobuf/chicken.proto

The inconsistency between the installation script and the .egg-info
file is probably a bug.

Additionally I propose that the (destination ...) form should be made
relative to the default target directory and create all specified
subdirectories as necessary, then I could just add a

(destination "../extend/protobuf")

to the c-include form above and be happy.

At least this would make a lot more sense than the current behaviour
where a relative path in the destination form is relative to the source
directory where the egg is built, and the correct absolute path for the
destination can never be determined correctly at the time the .egg file
is written.

Ciao,
Thomas


--
[1]: http://chust.org/repos/chicken-protobuf/doc/chicken-5/protobuf.egg
--
I think that in the nuclear world the true enemy can't be destroyed.
[...] In my humble opinion, in the nuclear world the true enemy is war
itself.
-- Cmdr. Hunter from the movie "Crimson Tide"
f***@bevuta.com
2018-08-29 20:21:28 UTC
Permalink
Post by Thomas Chust
Additionally I propose that the (destination ...) form should be made
relative to the default target directory and create all specified
subdirectories as necessary, then I could just add a
(destination "../extend/protobuf")
to the c-include form above and be happy.
I don't see the motivation for installing files outside of the chicken installation
tree, so it is not clear to me what you want to achieve with this.

Creating directories as necessary will on the other hand be automatically, if transparent
handling of nested directories is implemented (I'm currently working on this,
so thanks for your example...)


felix
John Cowan
2018-08-29 21:20:09 UTC
Permalink
Post by f***@bevuta.com
I don't see the motivation for installing files outside of the chicken installation
tree, so it is not clear to me what you want to achieve with this.
From what I understand (which may be wrong) it's so that chicken-install
can put a
file in a place expected by some external library.
--
John Cowan http://vrici.lojban.org/~cowan ***@ccil.org
If I read "upcoming" in [the newspaper] once more, I will be downcoming
and somebody will be outgoing.
Thomas Chust
2018-08-30 09:21:45 UTC
Permalink
Post by John Cowan
Post by f***@bevuta.com
I don't see the motivation for installing files outside of the chicken installation
tree, so it is not clear to me what you want to achieve with this.
From what I understand (which may be wrong) it's so that chicken-install
can put a
file in a place expected by some external library.
[...]
Hello,

that is precisely the use case I have in mind, yes.

Also, on my machine I consider the entire /opt/chicken prefix to be my "chicken installation tree", and I don't want to put anything outside of that, but I do want to put things inside in any location that appears right, not just one of three fixed paths ;-)

Ciao,
Thomas
--
There are only two things wrong with C++: The initial concept and the
implementation.
-- Bertrand Meyer
Vasilij Schneidermann
2018-08-30 07:38:03 UTC
Permalink
Post by f***@bevuta.com
So the basic problem is to install multiple sets of files, in separate
steps? I think for "scheme-include" components this should be possible,
but (as far as I can see) this is not currently possible for "c-include"
components (but could be added).
It's for more than that. SPOCK for instance installs its Scheme *and*
JS runtime into PREFIX/lib/chicken/8/spock/. The latter is neither a
scheme-include nor a c-include. Feathers installs itself into
PREFIX/share/chicken/feathers.tcl. I'm not sure what I'd categorize
these as, but I suspect these eggs cannot be ported until you can
specify a PREFIX-relative destination directory (as opposed to
specifying the type of file to be installed).

Vasilij
f***@bevuta.com
2018-08-30 11:14:04 UTC
Permalink
Post by Vasilij Schneidermann
Post by f***@bevuta.com
So the basic problem is to install multiple sets of files, in separate
steps? I think for "scheme-include" components this should be possible,
but (as far as I can see) this is not currently possible for "c-include"
components (but could be added).
It's for more than that. SPOCK for instance installs its Scheme *and*
JS runtime into PREFIX/lib/chicken/8/spock/. The latter is neither a
scheme-include nor a c-include. Feathers installs itself into
PREFIX/share/chicken/feathers.tcl. I'm not sure what I'd categorize
these as, but I suspect these eggs cannot be ported until you can
specify a PREFIX-relative destination directory (as opposed to
specifying the type of file to be installed).
Feathers is part of the core system and ths spock stuff could in theory
simply be treated as data and installed/accessed from a diffent location,
so it is already possible, even if not ideal. But a patch is pending, as you
probably know, so no need to panic.


felix
Ivan Raikov
2018-08-31 19:54:31 UTC
Permalink
Thanks for making a patch for this issue!

-Ivan
Post by f***@bevuta.com
Post by Vasilij Schneidermann
Post by f***@bevuta.com
So the basic problem is to install multiple sets of files, in separate
steps? I think for "scheme-include" components this should be possible,
but (as far as I can see) this is not currently possible for "c-include"
components (but could be added).
It's for more than that. SPOCK for instance installs its Scheme *and*
JS runtime into PREFIX/lib/chicken/8/spock/. The latter is neither a
scheme-include nor a c-include. Feathers installs itself into
PREFIX/share/chicken/feathers.tcl. I'm not sure what I'd categorize
these as, but I suspect these eggs cannot be ported until you can
specify a PREFIX-relative destination directory (as opposed to
specifying the type of file to be installed).
Feathers is part of the core system and ths spock stuff could in theory
simply be treated as data and installed/accessed from a diffent location,
so it is already possible, even if not ideal. But a patch is pending, as you
probably know, so no need to panic.
felix
Peter Bex
2018-08-29 06:13:30 UTC
Permalink
Post by f***@bevuta.com
- 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).
Yes, use a custom build script. I'm working on a way to handle the case of separate
..c files that need to be linked. Due to how we support static linking this is
not trivial.
As far as I understand the question (probably not really), a simple way to
do this is to (foreign-declare "#include \"foo.c\"") and add foo.h to the
source-dependencies of the file (see for example the simple-sha1 and
simple-md5 eggs, they do this). No need for any special handling.

Of course it means your C files get a lot larger, and you don't benefit
from reduced compilation times from separate compilation.

Cheers,
Peter
f***@bevuta.com
2018-08-29 08:57:54 UTC
Permalink
Post by Peter Bex
As far as I understand the question (probably not really), a simple way to
do this is to (foreign-declare "#include \"foo.c\"") and add foo.h to the
source-dependencies of the file (see for example the simple-sha1 and
simple-md5 eggs, they do this). No need for any special handling.
Of course it means your C files get a lot larger, and you don't benefit
from reduced compilation times from separate compilation.
That's right, this will work in many cases. On the other hand, foo.c
will be compiled in the environment that chicken.h defines, including
all macro and type definitions, which may pollute what foo.c expects
to be seen. "Reparing" the environment may range from difficult to
impossible should foo.c have name clashes with anything defined
in chicken.h. Moreover, foo.c may need special compilation flags
that are not compatible with CHICKEN-generated source code.

The foreign-declare case is simple and straightforward and should
be used, if possible, but we need a fallback solution and this case
of a separate .c file is common enough to be addressed.


felix
Peter Bex
2018-08-29 09:05:21 UTC
Permalink
Post by f***@bevuta.com
The foreign-declare case is simple and straightforward and should
be used, if possible, but we need a fallback solution and this case
of a separate .c file is common enough to be addressed.
For 5.0?

Cheers,
Peter
f***@bevuta.com
2018-08-29 09:07:02 UTC
Permalink
Post by Peter Bex
Post by f***@bevuta.com
The foreign-declare case is simple and straightforward and should
be used, if possible, but we need a fallback solution and this case
of a separate .c file is common enough to be addressed.
For 5.0?
Perhaps not.


felix
Thomas Chust
2018-08-29 10:20:35 UTC
Permalink
Post by f***@bevuta.com
Post by Peter Bex
As far as I understand the question (probably not really), a simple way to
do this is to (foreign-declare "#include \"foo.c\"") and add foo.h to the
source-dependencies of the file (see for example the simple-sha1 and
simple-md5 eggs, they do this). No need for any special handling.
Of course it means your C files get a lot larger, and you don't benefit
from reduced compilation times from separate compilation.
That's right, this will work in many cases. On the other hand, foo.c
will be compiled in the environment that chicken.h defines, including
all macro and type definitions, which may pollute what foo.c expects
to be seen. "Reparing" the environment may range from difficult to
impossible should foo.c have name clashes with anything defined
in chicken.h. Moreover, foo.c may need special compilation flags
that are not compatible with CHICKEN-generated source code.
[...]
Hello,

I would argue that mashing together C compilation units using
brute-force #include is almost never the right thing to do and will
rarely work correctly, for the reasons Felix pointed out, unless the
code has specifically been written to function in the environment
provided by the other header files. C is designed to use a number of
separate files to manage the global state of preprocessor and compiler!

Ciao,
Thomas
--
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.
Thomas Chust
2018-08-29 10:14:35 UTC
Permalink
Post by f***@bevuta.com
[...]
I'll try to address some of your questions.
[...]
Hello,

thanks for taking the time to reply :-)
Post by f***@bevuta.com
[...]
- 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?
To simplify the confusion related to "require-extension", "use", etc.
"import" does now both loading and import in one step. "Compound" libraries
[...] must be done manually and is not directly supported by the new
system.
[...]
The underlying machinery is still the same, but in the interest of making
things simpler for the user, the high-level view that can be specified in
egg files provides fewer options.
[...]
I can't say that I like this design decision, but I guess I'll have to
live with it. If this is unsupported, it also feels strange that
the .egg format allows specification of multiple import libraries per
extension at all – the provider side of the picture, when you write a
library with multiple modules, is supported, but the consumer side,
when you try to use it, is suddenly not supported any longer.

You also suggest that separating load and import is possible when done
"manually", but I couldn't find any information on how one would
approach that. Could you elaborate this "manual" approach a little bit?
Post by f***@bevuta.com
[...]
- 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.
This is a bug. Compound names should be canonicalized using "." syntax
when they appear in user forms. If you can provide a simple example, we can
try to address this.
[...]
$ cat foobar.scm
(module (foo bar)
(hello)
(import
scheme)

(define (hello)
(display "Hello world!")
(newline))

)

$ cat foobar.egg
((components
(extension foobar
(modules (foo bar)))))

$ chicken-install -n
building foobar
[...]
/opt/chicken/bin/csc -setup-mode -s -host -I /home/murphy/foobar -C
-I/home/murphy/foobar -O2 -d0 /home/murphy/foobar/(foo bar).import.scm
-o /home/murphy/foobar/(foo bar).import.so csc: file
`/home/murphy/foobar/(foo bar).import.scm' does not exist

Error: shell command terminated with nonzero exit code
16384
"sh /home/murphy/foobar/foobar.build.sh"
Post by f***@bevuta.com
[...]
- 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).
Yes, use a custom build script. I'm working on a way to handle the case of separate
..c files that need to be linked. Due to how we support static linking this is
not trivial.
[...]
How about producing .a / .lib files instead of .o files for static
linkage – wouldn't that simplify including multiple compilation units?

Thanks again for the useful feedback!

Ciao,
Thomas
--
Liebe ist die beste Geisteskrankheit, die man sich wünschen kann.
-- Lisa Eckhart
f***@bevuta.com
2018-08-29 12:17:08 UTC
Permalink
Post by Thomas Chust
I can't say that I like this design decision, but I guess I'll have to
live with it. If this is unsupported, it also feels strange that
the .egg format allows specification of multiple import libraries per
extension at all – the provider side of the picture, when you write a
library with multiple modules, is supported, but the consumer side,
when you try to use it, is suddenly not supported any longer.
I'm not sure what you mean, some example would be helpful here.
Post by Thomas Chust
You also suggest that separating load and import is possible when done
"manually", but I couldn't find any information on how one would
approach that. Could you elaborate this "manual" approach a little bit?
The low-level forms for loading/linking are still available (uses, load-library),
it's the high-level view that has changed.
Post by Thomas Chust
$ cat foobar.egg
((components
(extension foobar
(modules (foo bar)))))
$ chicken-install -n
building foobar
[...]
/opt/chicken/bin/csc -setup-mode -s -host -I /home/murphy/foobar -C
-I/home/murphy/foobar -O2 -d0 /home/murphy/foobar/(foo bar).import.scm
-o /home/murphy/foobar/(foo bar).import.so csc: file
`/home/murphy/foobar/(foo bar).import.scm' does not exist
Sure, that should indeed be handled. I'll fix this.
Post by Thomas Chust
Post by f***@bevuta.com
Yes, use a custom build script. I'm working on a way to handle the case of separate
..c files that need to be linked. Due to how we support static linking this is
not trivial.
[...]
How about producing .a / .lib files instead of .o files for static
linkage – wouldn't that simplify including multiple compilation units?
It would, but would complicate other cases. You need different tools on
different platforms, need run ranlib(1) on installed .a's on MacOS, and so
on. It's certainly one way of doing this, but we already support .o files.

Patches are welcome, of course...


felix
Thomas Chust
2018-08-29 14:42:34 UTC
Permalink
Post by f***@bevuta.com
Post by Thomas Chust
[...]
I can't say that I like this design decision, but I guess I'll have to
live with it. If this is unsupported, it also feels strange that
the .egg format allows specification of multiple import libraries per
extension at all – the provider side of the picture, when you write a
library with multiple modules, is supported, but the consumer side,
when you try to use it, is suddenly not supported any longer.
I'm not sure what you mean, some example would be helpful here.
[...]
Hello Felix,

hmm, I was under the impression that we could now declare multiple
(modules ...) in an (extension ...) but there was no way to access them
because (import ...) would always try to load both the import library
and the extension of the same name.

However, I just realized that my old default approach of doing
(require-library ...) first and (import ...) later still seems to work
fine. Only when commpiling such code, CHICKEN will always complain that
the extensions with the same names as the modules do not exist, but
that's a minor nuisance.

So never mind that stupid question ;-)

Ciao,
Thomas
--
There are only two things wrong with C++: The initial concept and the
implementation.
-- Bertrand Meyer
Loading...