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: Fri, 08 Feb 2013 17:52:38 +0000 Message-ID: <1360345958.2172.181.camel@debian-box.lan> References: <1360315456.2172.131.camel@debian-box.lan> <1360315553.2172.132.camel@debian-box.lan> <87sj5711wu.fsf@pobox.com> 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 1360346378 20676 80.91.229.3 (8 Feb 2013 17:59:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2013 17:59:38 +0000 (UTC) Cc: guile-user@gnu.org To: Andy Wingo Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Feb 08 18:59:58 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 1U3sEr-0001Iu-TP for guile-user@m.gmane.org; Fri, 08 Feb 2013 18:59:54 +0100 Original-Received: from localhost ([::1]:45522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3sEY-0004eP-JL for guile-user@m.gmane.org; Fri, 08 Feb 2013 12:59:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3sCf-0004LL-W9 for guile-user@gnu.org; Fri, 08 Feb 2013 12:59:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3sBS-0000pV-Vd for guile-user@gnu.org; Fri, 08 Feb 2013 12:57:37 -0500 Original-Received: from mail-wi0-f177.google.com ([209.85.212.177]:35376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3sBS-0000pL-Ot for guile-user@gnu.org; Fri, 08 Feb 2013 12:56:22 -0500 Original-Received: by mail-wi0-f177.google.com with SMTP id hm14so1166153wib.10 for ; Fri, 08 Feb 2013 09:56:21 -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=8saQV86ENTYYSRmjOzntnAGyxnI1iMb4rj93IXBf5f0=; b=CKnWBvjmKzfpWcbTJ3fMiwZY1rcP4qKRFRlBMyIl3eylyLno9ju2Di/RqygBuTcaWG bMr45XY1oqF4ackn8sXSpfWvIpWLVQJYxMMWqYnwRJV6fmMaoO7+2EADBCYPmv7dzpO2 n/koQFvTBTZ5GecKEq2A9uhRyMyEnasgcXOJNbjvYP6TQnDBtoZBKS8N255KWDaHqMJ4 HdFY5QunIcJY/bcJMR0HpN4YZYxY3L6mjWL37m6G2OrHC+4x8mrv8kcxjpjHFdLWP7oM icWVTLgqlVkGbfR8an7uaULcWJciXXMltzxvXIpsH6iYNxV4SbTtThcX9wCSJhW3EErp /S5g== X-Received: by 10.180.108.3 with SMTP id hg3mr4114029wib.33.1360346181348; Fri, 08 Feb 2013 09:56:21 -0800 (PST) Original-Received: from (know-mailgateway-2.server.virginmedia.net. [62.254.26.101]) by mx.google.com with ESMTPS id t7sm8881120wiy.2.2013.02.08.09.56.17 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 08 Feb 2013 09:56:19 -0800 (PST) Original-Received: from source ([146.90.136.35]) by smtp.virginmedia.com with SMTP; Fri, 08 Feb 2013 17:56:19 +0000 (GMT) X-ProxyUser-IP: 146.90.136.35 In-Reply-To: <87sj5711wu.fsf@pobox.com> X-Mailer: Evolution 2.30.3 X-Gm-Message-State: ALoCoQkfiIW/Z1jwpc+XX9GXH9OkeJC1jV6Auitn4viRJM1xW24uSxhPfwTkYfqwUBiXuIP1ecCH X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.212.177 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:10051 Archived-At: I succeeded in linking Denemo with the call scm_c_register_extension ("libguile-srfi-srfi-1-v-3", "scm_init_srfi_1", scm_init_srfi_1, NULL); inserted right at the beginning of inner_main (the value passed to scm_boot_guile, that is), but disappointingly I still get the error message when srfi-1 tries to dynamically load I found some documentation on this call at http://mulliken.chem.hope.edu/cgi-bin/info2www.cgi?(guile)Extensions and it indicated the first argument could be NULL, which would reduce the danger of a typo in that string causing trouble, but alas with NULL the same error message occurs. I have checked that scm_init_srfi_1 is a genuinely non-null pointer, so I don't quite know where to go next. I have gdb running on the windows box (again, thanks to the mxe cross-compilation project), but perhaps someone can spare me tracking through the libguile-srfi-srfi-1-v-3.a code? Richard On Fri, 2013-02-08 at 12:27 +0100, Andy Wingo wrote: > On Fri 08 Feb 2013 10:25, Richard Shann > writes: > > > On Fri, 2013-02-08 at 09:24 +0000, Richard Shann wrote: > >> Is it possible to statically link in the srfi modules? > >> (load-extension "libguile-srfi-srfi-1-v-3" "scm_init_srfi_1") > >> fails. > > You can link it in I think, but then you will need to call > > scm_c_register_extension ("libguile-srfi-srfi-1-v-3", > "scm_init_srfi_1", > scm_init_srfi_1, NULL) > > somewhere in your C code. > >