Hello,
On 2022/08/03 23:36, Vincent Lefevre wrote:
> When python doesn't exist (as opposed to python3), running autogen.sh
> gives errors
>
> /usr/bin/env: ‘python’: Permission denied
>
> The autogen.sh script itself uses
>
> PYTHON="`./build/find_python.sh`"
>
> for the .py scripts it runs, but this is not sufficient for Python
> scripts run by autoheader/autom4te, such as build/getversion.py.
> A strace shows:
>
> 25 execve("/bin/sh", ["sh", "-c", "$PYTHON build/getversion.py SVN
> subversion/include/svn_version.h"], 0x7ffe47752730 /* 125 vars */ <unfinished
> ...>
> [...]
> 26 execve("build/getversion.py", ["build/getversion.py", "SVN",
> "subversion/include/svn_version.h"], 0x55aad83bcbb8 /* 125 vars */
> <unfinished ...>
It seems caused by esyscmd() in configure.ac.
> while $PYTHON is empty and build/getversion.py starts with
>
> #!/usr/bin/env python
>
> Hence the issue. Adding "export PYTHON" in the autogen.sh script
> as follows
>
> -PYTHON="`./build/find_python.sh`"
> +PYTHON="`./build/find_python.sh`"; export PYTHON
>
> solves the issue. I've attached the corresponding patch.
I think there is no other simple solution for it, so I committed
as r1903245(but move the export command, after checking
$PYTHON is not empty).
Cheers,
--
Yasuhito FUTATSUKI <[email protected]>