autoconf
[Top][All Lists]
Advanced

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

Re-exec of $as_myself chooses wrong configure script from PATH


From: Michael Orlitzky
Subject: Re-exec of $as_myself chooses wrong configure script from PATH
Date: Thu, 30 May 2019 08:33:15 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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 via email to

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