[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re-exec of $as_myself chooses wrong configure script from PATH
From: |
Michael Orlitzky |
Subject: |
Re: Re-exec of $as_myself chooses wrong configure script from PATH |
Date: |
Thu, 30 May 2019 09:51:45 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/30/19 9:39 AM, Eric Blake wrote:
>
> Executing 'sh configure' should execute whatever 'configure' is first on
> your PATH, which is not ./configure unless '.' is early in your PATH.
Are you sure about this? I wouldn't swear to it, but a quick check of
POSIX suggests that it should run ./configure. Quoting
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html
I see,
command_file
The pathname of a file containing commands. If the pathname contains
one or more <slash> characters, the implementation attempts to read
that file; the file need not be executable. If the pathname does not
contain a <slash> character:
* The implementation shall attempt to read that file from the
current working directory; the file need not be executable.
* If the file is not in the current working directory, the
implementation may perform a search for an executable file using
the value of PATH, as described in Command Search and Execution.
> Are you sure ./configure is even in the loop here to even get a chance
> to compute $as_myself for a potential re-exec?
I'm pretty sure... I've edited ./configure with "set -x" at the top, and
running "sh configure" is outputting the debug info before it re-execs.
>
> Does running 'sh ./configure' fix things for you?
>
Yes.