unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: Bruce Korb <bruce.korb@gmail.com>, guile-devel@gnu.org
Subject: Re: [PATCH] Don't augment LD_LIBRARY_PATH (was Re: [PATCH] do not augment environment)
Date: Sun, 07 Oct 2012 23:16:50 +0200	[thread overview]
Message-ID: <87ipamx9rx.fsf@gnu.org> (raw)
In-Reply-To: <87r4pblqv7.fsf@tines.lan> (Mark H. Weaver's message of "Sat, 06 Oct 2012 08:36:12 -0400")

Hi,

Mark H Weaver <mhw@netris.org> skribis:

> I wrote:
>> I've read the message referenced above several times, but I've failed to
>> understand why we cannot use 'lt_dladdsearchdir' to augment the path, as
>> shown in the first code excerpt of that message:
>>
>>   env = getenv ("GUILE_SYSTEM_EXTENSIONS_PATH");
>>
>>   [...]
>>
>>   if (env)
>>     lt_dladdsearchdir (env);
>>   else
>>     {
>>       lt_dladdsearchdir (SCM_LIB_DIR);
>>       lt_dladdsearchdir (SCM_EXTENSIONS_DIR);
>>     }
>
> Actually, I can already see a problem with this.  SCM_LIB_DIR is usually
> (always?) already present in the library search paths before Guile is
> initialized.  It is set to $(libdir) by libguile/Makefile.  Isn't
> $(libdir) where libguile is installed?

In 1.8 and earlier, extensions were installed under $libdir, and it’s
just an obvious convenience to ensure that $libdir is in the search
path.

Note that lt_dladdsearchdir /appends/ its arguments to the search path.

[...]

> With this in mind, I now propose the following:
>
>   env = getenv ("GUILE_SYSTEM_EXTENSIONS_PATH");
>   if (env)
>     lt_dladdsearchdir (env);
>   else
>     lt_dladdsearchdir (SCM_EXTENSIONS_DIR);
>
> and then to run the uninstalled guile, we'd need to set (or augment) one
> of the *_LIBRARY_PATH environment variables to point within the build
> directory, and also set GUILE_SYSTEM_EXTENSIONS_PATH.
>
> What do you think?

First, I think we don’t want to change the behavior at all in 2.0,
because that’s a sure way to surely get reports of angry users.

Other than that, in 2.1 we could consider dropping $libdir like this,
and making sure all extensions get installed in the right place.  That
would probably make sense.

> On a related topic, why is libguilereadline-v-18.* installed in
> SCM_LIB_DIR and not SCM_EXTENSIONS_DIR?

Historical reasons.  We should probably change it in 2.1, and also
remove the “lib” prefix.

WDYT?

Ludo’.



  reply	other threads:[~2012-10-07 21:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21 23:36 [PATCH] do not augment environment Bruce Korb
2012-10-01  1:13 ` Bruce Korb
2012-10-01  2:38 ` Mark H Weaver
2012-10-01 14:24   ` Bruce Korb
2012-10-01 14:39   ` Bruce Korb
2012-10-01 16:59     ` Mark H Weaver
2012-10-01 18:27       ` Bruce Korb
2012-10-03 10:31   ` [PATCH] Don't augment LD_LIBRARY_PATH (was Re: [PATCH] do not augment environment) Mark H Weaver
2012-10-04 20:37     ` Ludovic Courtès
2012-10-06  2:30       ` Mark H Weaver
2012-10-06 12:36         ` Mark H Weaver
2012-10-07 21:16           ` Ludovic Courtès [this message]
2012-10-06 12:42         ` Ludovic Courtès
2012-10-06 14:31           ` Mark H Weaver
2012-10-05  9:43     ` Sjoerd van Leent Privé
2012-10-05 21:58       ` Mark H Weaver
2012-11-27 22:54     ` [PATCH] Fix library search order and don't change LD_LIBRARY_PATH Mark H Weaver
2012-11-27 22:59       ` Ludovic Courtès
2012-11-27 23:23         ` Mark H Weaver
2012-11-27 23:01       ` Bruce Korb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ipamx9rx.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=bruce.korb@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).