From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Shann Newsgroups: gmane.lisp.guile.user Subject: Re: statically linking in srfi modules Date: Sat, 09 Feb 2013 17:57:08 +0000 Message-ID: <1360432628.2172.497.camel@debian-box.lan> References: <1360315456.2172.131.camel@debian-box.lan> <1360315553.2172.132.camel@debian-box.lan> <87sj5711wu.fsf@pobox.com> <1360345958.2172.181.camel@debian-box.lan> <874nhm7aed.fsf@tines.lan> <87zjze5udn.fsf@tines.lan> <1360412014.2172.231.camel@debian-box.lan> <87a9rd5xqa.fsf@tines.lan> <874nhl5wqc.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1360433221 25589 80.91.229.3 (9 Feb 2013 18:07:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Feb 2013 18:07:01 +0000 (UTC) Cc: Andy Wingo , guile-user@gnu.org To: Mark H Weaver Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Feb 09 19:07:22 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U4Epd-00008B-8y for guile-user@m.gmane.org; Sat, 09 Feb 2013 19:07:21 +0100 Original-Received: from localhost ([::1]:45758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4EpJ-0004ka-NE for guile-user@m.gmane.org; Sat, 09 Feb 2013 13:07:01 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4EpF-0004kR-Aj for guile-user@gnu.org; Sat, 09 Feb 2013 13:06:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4EpA-0005KJ-Si for guile-user@gnu.org; Sat, 09 Feb 2013 13:06:57 -0500 Original-Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]:58388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4EpA-0005Jt-MJ for guile-user@gnu.org; Sat, 09 Feb 2013 13:06:52 -0500 Original-Received: by mail-we0-f180.google.com with SMTP id k14so3773329wer.39 for ; Sat, 09 Feb 2013 10:06:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-proxyuser-ip:subject:from:to:cc:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding:x-gm-message-state; bh=TzhU0M+zJ5UhMmsYCxlC2+Mt7MnsYBL3XVgKdmrfk5U=; b=nYmk6g/S/S3QgjzUyfrEuT9yHvC1q73CSwFlhH+qwzDWP6xsyhCCadvqb63EATpMlf 5DKs+YT4SYhCFRMm/39D28g1eagFn563P3ZKstaXu6GBj+mZpypPExyL6+SvZqOkGxkv +HKLV8fbbLGp+bqRfv/Avje3A14Na/TJeaKk/77aFgq+L1qDSynNZo6/kfqcP5Rb6bYk vg+aPl07RZ32VS43Utv8nMbULqCYDGKPJ3DCp+wngTTunFYJK2+/qcbhcPeTRAN4WfnJ 2+RnlhfSNeU2UZFMuibAxcIXLf50EKZP4c1ynxouyxGunwnuZ4UY5iKeYQ7tP8gQhW43 ochw== X-Received: by 10.194.60.195 with SMTP id j3mr15826472wjr.33.1360432851049; Sat, 09 Feb 2013 10:00:51 -0800 (PST) Original-Received: from (know-mailgateway-3.server.virginmedia.net. [62.254.26.105]) by mx.google.com with ESMTPS id ec3sm20647440wib.1.2013.02.09.10.00.48 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sat, 09 Feb 2013 10:00:49 -0800 (PST) Original-Received: from source ([146.90.136.35]) by smtp.virginmedia.com with SMTP; Sat, 09 Feb 2013 18:00:49 +0000 (GMT) X-ProxyUser-IP: 146.90.136.35 In-Reply-To: <874nhl5wqc.fsf@tines.lan> X-Mailer: Evolution 2.30.3 X-Gm-Message-State: ALoCoQnhTd4Pge1IDdPuY64t1WfVJvh0X/I73yoBkl79mwasI/nuk4U5NLlZF+g9KoSaFI3cmJFl X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::234 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10068 Archived-At: On Sat, 2013-02-09 at 10:32 -0500, Mark H Weaver wrote: > Richard Shann 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