[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #110612] Re-exec of $as_myself chooses wrong configure script from P
From: |
Michael Orlitzky |
Subject: |
[sr #110612] Re-exec of $as_myself chooses wrong configure script from PATH |
Date: |
Fri, 18 Feb 2022 20:07:40 -0500 (EST) |
URL:
<https://savannah.gnu.org/support/?110612>
Summary: Re-exec of $as_myself chooses wrong configure script
from PATH
Project: Autoconf
Submitted by: mjo
Submitted on: Sat 19 Feb 2022 01:07:39 AM UTC
Category: None
Priority: 5 - Normal
Severity: 2 - Minor
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Details:
(This is copy/pasted in its entirety from an old bug- mailing list post of
mine)
In the configure scripts that I'm generating, I see the following
variable assignment:
# Find who we are. Look in the path if we contain no directory
# separator.
as_myself=...
Later, this may be used to re-exec the configure script with a better shell,
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
But, consider the following scenario:
* I have some other "configure" in my $PATH.
* I have a shell that doesn't support LINENO.
* I execute ./configure for some package by running "sh configure".
What happens in that case is that the "as_myself" computation fails to
find a directory separator in "configure", and instead searches my path
for a usable "configure". It finds one, but not the one I wanted to run!
Now I have
as_myself=/path/to/some/other/configure/script
and then since my shell doesn't support LINENO, I wind up running
$CONFIG_SHELL ... /path/to/some/other/configure/script
In other words, I re-exec the wrong script entirely. This can be worked
around by running "sh ./configure" instead of "sh configure", but leads
to a great deal of head-scratching.
Is this something that can (should?) be fixed?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?110612>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [sr #110612] Re-exec of $as_myself chooses wrong configure script from PATH,
Michael Orlitzky <=