helpAutoconf - Support: sr #110612, Re-exec of $as_myself chooses...


sr #110612: Re-exec of $as_myself chooses wrong configure script from PATH

Submitter:  Michael Orlitzky <mjo>
Submitted:  Sat 19 Feb 2022 01:07:39 AM UTC
Category:  None Priority:  5 - Normal
Severity:  2 - Minor Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Sat 19 Feb 2022 01:07:39 AM UTC, original submission:  

(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.

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


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?

Michael Orlitzky <mjo>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mjo (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    No changes have been made to this item

    Back to the top

    Powered by Savane 3.9