chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Re: sqlite3 issues


From: Thomas Christian Chust
Subject: Re: [Chicken-users] Re: sqlite3 issues
Date: Thu, 09 Nov 2006 10:54:59 +0100
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-AT; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5

elf wrote:

> the thing that got it to work (the others are mostly incidental except for
> initialize) was changing the require-extension format used in the file.
> 
> basically, i was shotgunning it, because it would kill the interpreter
> immediately upon trying to load it, [...]

Hello,

the problem I have understanding your problem is, that the code you sent
me is actually invalid, because it uses both ({require-extension | use}
...) and (declare (uses ...)) on the same extension names and it removes
the initialize method -- with those changes it should most certainly
*not* be working any longer.

In fact it doesn't even link correctly in any of my test environments,
which is no wonder as require-extension or the equivalent use are
intended for dynamic linkage at runtime while the uses declaration is
intended for static linkage...

> [...] it turned out to be from what
> i consider a problem with the compiler, namely that
> require-extensions/use/uses arent verified at compile time, and if the
> extensions do not in fact exist (or cant be loaded, or whatnot), then it
> crashes the interpreter.

Well, require-extension or its synonym use don't need any compile time
checking, but throw an exception when the extension can't be loaded at
runtime. The uses declaration doesn't need any special checks from the
CHICKEN compiler, as the system linker will complain if you don't give
it the static extension library to link.

Under no normal circumstances dynamically loading or statically linking
an extension will ever cause a crash of the CHICKEN runtime system!

If such a crash occurs, this is very likely *not* due to a mistake in my
code but rather due to lower level problems like mismatched dynamic
object versions -- that's why I recommended a full reinstall of all eggs
in proper sequence of dependencies.

But as you said, that you did recompile and reinstall all eggs in proper
sequence, I have really no clue what's wrong with your system :-(

> [...] there also seems to be some degree of confusion involving the (unit)
> declaration, the register-feature! functions, and the supported types
> for use vs uses vs require-extension, which dont all match up, for some 
> reason. [...]

In my opinion the descriptions of those constructs in the CHICKEN
documentation are very clarifying. But there have also been several
discussions about topics of statically and dynamically linked extensions
on this mailing list -- just check the archives.

cu,
Thomas




reply via email to

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