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 ...> 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. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Index: autogen.sh =================================================================== --- autogen.sh (revision 1903210) +++ autogen.sh (working copy) @@ -170,7 +170,7 @@ # and we can state that dev people need Python on their machine. Note # that running gen-make.py requires Python 2.7 or newer. -PYTHON="`./build/find_python.sh`" +PYTHON="`./build/find_python.sh`"; export PYTHON if test -z "$PYTHON"; then echo "Python 2.7 or later is required to run autogen.sh" echo "If you have a suitable Python installed, but not on the"