From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.user Subject: Re: setting env variable from Guile Date: Sat, 30 Jul 2005 06:47:57 -0700 (PDT) Message-ID: <20050730134757.61034.qmail@web32511.mail.mud.yahoo.com> References: <45e3b282050729083211575301@mail.gmail.com> Reply-To: spikegran@earthlink.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1122731603 6460 80.91.229.2 (30 Jul 2005 13:53:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2005 13:53:23 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jul 30 15:53:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DyrlT-00015V-Sc for guile-user@m.gmane.org; Sat, 30 Jul 2005 15:52:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dyro1-0004M9-OB for guile-user@m.gmane.org; Sat, 30 Jul 2005 09:55:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dyrnq-0004Ki-El for guile-user@gnu.org; Sat, 30 Jul 2005 09:55:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dyrno-0004Jc-2T for guile-user@gnu.org; Sat, 30 Jul 2005 09:55:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dyrnn-0004IW-9I for guile-user@gnu.org; Sat, 30 Jul 2005 09:54:59 -0400 Original-Received: from [68.142.207.221] (helo=web32511.mail.mud.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1Dyrsf-0002EF-Fk for guile-user@gnu.org; Sat, 30 Jul 2005 10:00:01 -0400 Original-Received: (qmail 61036 invoked by uid 60001); 30 Jul 2005 13:47:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=lDMGmao/LFWPESsfvpAaHHXEI23Zld4mT8LooTRFoamRZO8yzOaAETsYrYjOko14igCuUWojBNieteC2rUC9YT4sXRPozV2JZVuVZ8mXe4f1xUO08YRTE59rUebR4l7c1RivwkojnOQstrNjLIuIkm+RCZ1doILxYh3Nh7an6cM= ; Original-Received: from [209.178.128.64] by web32511.mail.mud.yahoo.com via HTTP; Sat, 30 Jul 2005 06:47:57 PDT Original-To: Aurelien Chanudet , "José Roberto B. de A. Monteiro" In-Reply-To: <45e3b282050729083211575301@mail.gmail.com> X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:4664 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:4664 There are four things that should work, but, that I haven't tried out yet. You could call "dynamic-link" with the explicit pathname plus filename to your library. If your app is a pure guile script, you could write a wrapper shell script that exports the environment variable you need and then calls the guile script. If you have a C main(), you could call lt_dladdsearchdir(const char *) from C before dlopening your library. You could wrap the function lt_dladdsearchdir as a Guile function and call it from your script. -- Mike --- Aurelien Chanudet wrote: > Thank you guys for the tip. > > Unfortunately, the environnement variable set in this way doesn't > appear to be visible from the shell guile was launched from. As a > result, the environnement variable does not appear to be visible to > the dynamic link editor. > > On 7/29/05, José Roberto B. de A. Monteiro > wrote: > > On Thu, Jul 28, 2005 at 05:55:59PM +0200, Aurelien Chanudet wrote: > > > Hi all, > > > > > > I have a dynamic library located in a non standard > > > place I'd like to load within guile using > > > "dynamic-link". The dynamic link editor can be told > > > where to look for the library using an environment > > > variable. Is there a way to set up the environnement > > > variable directly _from_ Guile using for instance the > > > "system" primitive ? > > > > Have you ever tried to use Guile primitive function setenv ? > > > > (setenv name value) > > > > > > > > > _______________________________________________ > Guile-user mailing list > Guile-user@gnu.org > http://lists.gnu.org/mailman/listinfo/guile-user > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user