[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] do not augment environment

From: Bruce Korb
Subject: Re: [PATCH] do not augment environment
Date: Mon, 01 Oct 2012 11:27:52 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0

On 10/01/12 09:59, Mark H Weaver wrote:
> On 10/01/2012 10:39 AM, Bruce Korb wrote:
>> On 09/30/12 19:38, Mark H Weaver wrote:
>>> In the current code, SCM_LIB_DIR and SCM_EXTENSIONS_DIR are only
>>> added to the library search path when GUILE_SYSTEM_EXTENSIONS_PATH
>>> is not set.  Your patch mishandles this, because it _always_ acts
>>> as if SCM_LIB_DIR and SCM_EXTENSIONS_DIR have been added to the search path.
>> Always inserting "GUILE_SYSTEM_EXTENSIONS_PATH=" into the environment
>> is a better fix than erasing LD_LIBRARY_PATH, but I hadn't read and
>> digested the source.  Thanks for the pointer.
> Are you deploying this fix in widely-used software, or just within your 
> private environment?  If the latter, that's fine, and you can disregard the 
> rest of this message.
> If the former, then we need to be careful.  By setting 
> GUILE_SYSTEM_EXTENSIONS_PATH="", you will break Guile programs that need to 
> load extensions, not just within your own program, but within any 
> subprocesses that might be unrelated to your project.
> Also, our internal hack of setting GUILE_SYSTEM_EXTENSIONS="" during the 
> Guile build is not documented as far as I know, and might change in the 
> future.  It's actually a bad hack, for the same reasons given above. For 
> example, if 'gcc' started using Guile, then setting 
> GUILE_SYSTEM_EXTENSIONS="" within the Guile build could break gcc.
> I admit that we created this mess by deploying a bad hack, but let's try to 
> avoid getting ourselves into an even bigger mess by deploying more bad hacks 
> that lock us into preserving our current hacks.
> Before I spend any more time thinking about this, can you please answer my 
> question above?

autogen is used within GCC for constructing the top level's and
for cobbling together all the hackery required to fix up broken include files.
There are another dozen or so lesser known projects that use it for
building out Java Beans infrastructure and similar repetitive tasks.
The most common use is likely option processing, but that use would surely
never bump into problems with GUILE_SYSTEM_EXTENSIONS_PATH.
(NTP and GNU TLS are two well known users of the option stuff.)
I control all the associated templates and they do not use any "subprograms"
implemented in Scheme/Guile.

In general, I've found my clients to be reluctant users of scheme
and it is actually more a barrier to use rather than a facilitator of use.
In other words, I suspect, but do not know, that there would be little issue.

WRT my problem, I have several choices that I would activate only when
the problematical versions of Guile are detected (2.0.1 thru 2.0.?? - what ??):

1. putenv("LD_LIBRARY_PATH=");
3. putenv("GUILE_SYSTEM_EXTENSIONS_PATH=/dev/null");
4. any other suggestions?

I think #3 would likely be safest for my environment, but I would certainly 
like your opinion.

Thank you!

Regards, Bruce

P.S. To be clear:
I would not bind you into keeping the null extensions hack.  I would stop
using it upon detecting a Guile version that does not hack LD_LIBRARY_PATH.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]