chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Problem w/ my egg


From: felix winkelmann
Subject: Re: [Chicken-users] Problem w/ my egg
Date: Mon, 3 Oct 2005 21:13:53 +0200

On 9/28/05, Kon Lovett <address@hidden> wrote:
>
> 1) The "Warning: library unit `stack' compiled in dynamic mode" msg;
> why? The .setup states '-s' in the compile stmt.

You declare a "unit" in stack-support, which means: this is a separately
loadable/linkable entity with a distinctly labeled toplevel procedure,
and thus can be linked statically.
Removing the `(declare (unit ...))' declaration makes it a dynamically
loadable entity with a normal (default-named) toplevel procedure, loadable
via `load' or `require'.

`(declare (unit ...))' and -s can in certain situations be usable (for example
when you are creating a library containing several units), but usually does
the wrong thing (hence the warning).

>
> 2) What unbound variable?
>

The unbound variable is weird, though, but has a reason: the runtime system
tries to load a .so with the given name, but fails (probably it fails to link at
runtime for some reason). If the loading of a .so fails, chicken attempts to
load it as Scheme source code, which nearly always results in what you
are experiencing above.

Normally, it should load stack-support.so, do you have a stack_ext_1.so
lying around in your working directory?

Removing the 'uses' declaration from stack-support.scm and changing
the 'use' in stack.scm to refer to stack-support fixed the problem.


cheers,
felix




reply via email to

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