guile-user
[Top][All Lists]
Advanced

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

Re: statically linking in srfi modules


From: Richard Shann
Subject: Re: statically linking in srfi modules
Date: Sat, 09 Feb 2013 17:57:08 +0000

On Sat, 2013-02-09 at 10:32 -0500, Mark H Weaver wrote:
> Richard Shann <address@hidden> writes:
> > Well it seems I may have been premature in saying that srfi-1 was
> > successfully loaded. Although the error message is gone, there is no
> > symbol 'map which srfi-1 should have re-defined. 
> > Can someone suggest what this might be a symptom of? 
> 
> I wrote:
> > I know what's wrong.  Please try replacing the calls to
> > 'scm_c_register_extension' with the following:
> >
> >   scm_c_define_module ("srfi srfi-1",  init_srfi_1,  NULL);
> >   scm_c_define_module ("srfi srfi-60", init_srfi_60, NULL);
> [...]

This worked in that map was defined, but then make-regexp was undefined
- we (use-modules (ice-9 regex)) in our opening preamble, which I guess
may re-define that, but grepping through the ice-9 directory I didn't
see any sign of the load-extension call that happens in srfi-1 and 60.
> 
> Sorry, this isn't quite right either.  Instead of the above, please try
> replacing the calls to 'scm_c_register_extension' with the following:
> 
>   scm_c_call_with_current_module (scm_c_resolve_module ("srfi srfi-1"),
>                                   init_srfi_1, NULL);
>   scm_c_call_with_current_module (scm_c_resolve_module ("srfi srfi-60"),
>                                   init_srfi_60, NULL);
> 
> Where 'init_srfi_1' and 'init_srfi_60' are defined as follows:
> 
>   static SCM
>   init_srfi_1 (void *dummy)
>   {
>     scm_init_srfi_1 ();
>     return SCM_UNSPECIFIED;
>   }
> 
>   static SCM
>   init_srfi_60 (void *dummy)
>   {
>     scm_init_srfi_60 ();
>     return SCM_UNSPECIFIED;
>   }
> 
This seemed to have a dramatic effect! The program exits at startup with
the message
ERROR: Unbound variable: map

and return status 1

Until now I felt we were converging on something :) One thing that
puzzles me is that other srfi numbers have static libraries generated
for them, but on 1 and 60 would seem to be needed?
Thanks for the support...

Richard








reply via email to

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