Created attachment 329906 [details] Patch Since 1.27, gtkdoc-scangobj no longer uses a shell to run the scanner. Because of this, the RUN variable is no longer simply prepended to a scanner command string. Instead, it is split using Python shlex and prepended to the command list. This means the RUN string must start with a valid command. Currently, the build fails because it attempts to execute LD_LIBRARY_PATH=... as a command. The attached patch fixes the build by prepending "env" to act as the command. In addition, it also explicitly uses python2 for the generate-gtkdoc tool, as required on Arch Linux, but this can be elided if unwelcome.
This is fixed by r224458; I'll add it to our 2.18 backports list. I hope you spent less time fixing this than I did! (In reply to Jan Alexander Steffens (heftig) from comment #0) > The attached patch fixes the build by prepending "env" to act as the > command. In addition, it also explicitly uses python2 for the > generate-gtkdoc tool, as required on Arch Linux, but this can be elided if > unwelcome. Unfortunately there's not much point in changing this, since we cannot use that shebang in cross-platform python scripts, because there is no python2 symlink on macOS. The real solution is to make all the scripts compatible with python3.
(In reply to Michael Catanzaro from comment #1) > The real solution is to make all the scripts compatible > with python3. Would running generate-gtkdoc with PYTHON_EXECUTABLE be a start? Are the rest of the scripts already compatible?
There's no point in doing something special just for generate-gtkdoc. Some patches have landed recently to make some of our python scripts more compatible with python3, but it's still python2-only for the most part. There are hundreds (thousands?) of python scripts that would need updated for python3; you probably don't want to take on this task. The only easy solution is to change the shebang on all the scripts to #!/usr/bin/python2.7, which does exist on macOS, and hope that the Python developers keep their promise that python2.8 will never become a thing.