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 13:21:30 +0000 Message-ID: <1360329690.2172.152.camel@debian-box.lan> References: <1360315456.2172.131.camel@debian-box.lan> <1360315553.2172.132.camel@debian-box.lan> <87sj5711wu.fsf@pobox.com> <1360328521.2172.146.camel@debian-box.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 1360330289 7393 80.91.229.3 (8 Feb 2013 13:31:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2013 13:31:29 +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 14:31:49 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 1U3o3Q-0001h5-6U for guile-user@m.gmane.org; Fri, 08 Feb 2013 14:31:48 +0100 Original-Received: from localhost ([::1]:60459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3o37-00011Q-5C for guile-user@m.gmane.org; Fri, 08 Feb 2013 08:31:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3o31-00010g-Po for guile-user@gnu.org; Fri, 08 Feb 2013 08:31:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3o30-0007BJ-Dy for guile-user@gnu.org; Fri, 08 Feb 2013 08:31:23 -0500 Original-Received: from mail-wi0-f174.google.com ([209.85.212.174]:35583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3o30-0007B5-85 for guile-user@gnu.org; Fri, 08 Feb 2013 08:31:22 -0500 Original-Received: by mail-wi0-f174.google.com with SMTP id hi8so849512wib.1 for ; Fri, 08 Feb 2013 05:31: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=TyESbfQFE4nfoHoKi1/sUmy4KAOMuOyrleuyHo0SNqo=; b=RqhowvonHNKtxUVS13fm+pEcsK/KTgjmGuMeZn9MpGj5//KoRV+k5hEc/pEJypIH3W acCdlRpcDg5UpY5COCcPSQT83jw90spQAi2T5ygD+BftFjlGSQE05fRVadW277syAUbD oaLUuVbYEMnDPKi4vcgVMKjpzZBlnQUD4SoeJzEocLYSOs3wNVuNRz98DaG/y3hh0BOu SO1c95aN88F5xurADy8AgQmAp9eT9+10uEuZ/pYOY0VeAWD3G2hgqYDPAXvKWEH8JBUe yypuz2PRNxd6rTCddevDzu8dOibXqn2BZ9bSjNNrpIGmU4RZ7TYCvTlo3tBtiVT3G2bu beFg== X-Received: by 10.194.174.196 with SMTP id bu4mr9681495wjc.35.1360329910275; Fri, 08 Feb 2013 05:25:10 -0800 (PST) Original-Received: from (know-mailgateway-1.server.virginmedia.net. [62.254.26.97]) by mx.google.com with ESMTPS id fx5sm15489487wib.11.2013.02.08.05.25.08 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 08 Feb 2013 05:25:09 -0800 (PST) Original-Received: from source ([146.90.136.35]) by smtp.virginmedia.com with SMTP; Fri, 08 Feb 2013 13:25:09 +0000 (GMT) X-ProxyUser-IP: 146.90.136.35 In-Reply-To: <1360328521.2172.146.camel@debian-box.lan> X-Mailer: Evolution 2.30.3 X-Gm-Message-State: ALoCoQn0BfGQSE6Szcdxmy5ZeL+ReQz72EZz6Ni5Rkj8aosl+Hwe/Ufx2BHi8vpSYcpCGs2PVr+R X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.212.174 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:10047 Archived-At: On Fri, 2013-02-08 at 13:02 +0000, Richard Shann wrote: > Hmm, I can't find scm_c_register_extension in the guile reference index, > and though including libguile.h finds the function I get the error > message scm_init_srfi_1 undeclared... > Hunting around for this symbol I see the header srfi-1.h with it > declared but > #include "guile/srfi/srfi-1.h" > gives a heap of errors... Oh, sorry, that was daft, I needed to include libguile before that header. Now it won't link ... so we will need to find the right library name to link to... Richard > > It looks like this module is the only one doing the dynamic loading > thing, judging by grepping for extension in the files, but is there a > way of knowing? > > Thanks in advance, > > 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. > > > > > Oh - sorry, I should have mentioned, we are still on guile 1.8 (perhaps > > > for no good reason?), if that affects the answer. > > > > Same answer. Guile 2.0 is much faster if that matters to you :) > > > > Andy >