Bug 181024 - Build fails with GTK-Doc 1.27
Summary: Build fails with GTK-Doc 1.27
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: All Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-20 02:27 PST by Jan Alexander Steffens (heftig)
Modified: 2017-12-20 17:35 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.36 KB, patch)
2017-12-20 02:27 PST, Jan Alexander Steffens (heftig)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Alexander Steffens (heftig) 2017-12-20 02:27:11 PST
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.
Comment 1 Michael Catanzaro 2017-12-20 08:22:57 PST
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.
Comment 2 Jan Alexander Steffens (heftig) 2017-12-20 10:52:00 PST
(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?
Comment 3 Michael Catanzaro 2017-12-20 17:35:34 PST
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.