Bug 225850 - [PATCH] fix webkitgtk build on macOS
Summary: [PATCH] fix webkitgtk build on macOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac (Intel) macOS 10.14
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-15 23:15 PDT by Dmitry Kalinkin
Modified: 2021-09-07 07:54 PDT (History)
15 users (show)

See Also:


Attachments
1/4 (5.89 KB, patch)
2021-05-15 23:44 PDT, Dmitry Kalinkin
no flags Details | Formatted Diff | Diff
2/4 (1.61 KB, application/mbox)
2021-05-15 23:44 PDT, Dmitry Kalinkin
no flags Details
2/4 (1.61 KB, patch)
2021-05-15 23:44 PDT, Dmitry Kalinkin
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
3/4 (1.49 KB, patch)
2021-05-15 23:45 PDT, Dmitry Kalinkin
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
4/4 (1.59 KB, patch)
2021-05-15 23:45 PDT, Dmitry Kalinkin
no flags Details | Formatted Diff | Diff
1/4 (4.07 KB, patch)
2021-06-24 15:30 PDT, Dmitry Kalinkin
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Combined patch (6.24 KB, patch)
2021-09-06 04:49 PDT, Dmitry Kalinkin
mcatanzaro: review+
mcatanzaro: commit-queue-
Details | Formatted Diff | Diff
Combined patch (revised) (6.25 KB, patch)
2021-09-06 08:08 PDT, Dmitry Kalinkin
no flags Details | Formatted Diff | Diff
Combined patch (re-revised) (6.21 KB, patch)
2021-09-06 10:03 PDT, Dmitry Kalinkin
no flags Details | Formatted Diff | Diff
Patch (24.68 KB, patch)
2021-09-07 02:21 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (25.20 KB, patch)
2021-09-07 07:15 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kalinkin 2021-05-15 23:15:09 PDT
There are several issues preventing GTK backend from successfully compiling on macOS.
Comment 1 Dmitry Kalinkin 2021-05-15 23:44:12 PDT
Created attachment 428774 [details]
1/4
Comment 2 Dmitry Kalinkin 2021-05-15 23:44:26 PDT
Created attachment 428775 [details]
2/4
Comment 3 Dmitry Kalinkin 2021-05-15 23:44:44 PDT
Created attachment 428776 [details]
2/4
Comment 4 Dmitry Kalinkin 2021-05-15 23:45:04 PDT
Created attachment 428777 [details]
3/4
Comment 5 Dmitry Kalinkin 2021-05-15 23:45:26 PDT
Created attachment 428778 [details]
4/4
Comment 6 Dmitry Kalinkin 2021-06-24 15:30:24 PDT
Created attachment 432216 [details]
1/4
Comment 7 Carlos Alberto Lopez Perez 2021-09-02 20:34:32 PDT
Thanks for the patches.

Can you please rebase them on top of current trunk/main and merge all of them in one single patch? Thanks
Comment 8 Dmitry Kalinkin 2021-09-06 04:49:23 PDT
Created attachment 437405 [details]
Combined patch
Comment 9 Michael Catanzaro 2021-09-06 05:02:04 PDT
Comment on attachment 437405 [details]
Combined patch

View in context: https://bugs.webkit.org/attachment.cgi?id=437405&action=review

It's probably been a long time since somebody got WebKitGTK to build on macOS. Impressive!

Your changes all look fine to me. I'm just going to leave nits about the line spacing.

> Source/WebKit/ChangeLog:8
> +        implementations to allow compiling webkitgtk on macOS.
> +        https://bugs.webkit.org/show_bug.cgi?id=225850

There should be one blank line in the ChangeLog above the URL.

> Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp:50
> +#endif
>  // Although it's available on Darwin, SOCK_SEQPACKET seems to work differently

Leave a blank line here, please.
Comment 10 Dmitry Kalinkin 2021-09-06 08:08:07 PDT
Created attachment 437417 [details]
Combined patch (revised)
Comment 11 Dmitry Kalinkin 2021-09-06 08:18:44 PDT
Carlos, Michael, thank you for your kind feedback. This patch has been tested in nixpkgs [1] and in a homebrew tap [2]. This fix was mostly done for fun, but there appears to be an interest in maintaining the effort from the community of a Nyxt browser users [3][4]. There are additional changes needed to fix webkitgtk on main, but I don't have those fully ready yet. In case I do, I'd rather submit a separate patch. Let me know what's left to do for this one and thanks again for taking time to review this.

[1] https://github.com/NixOS/nixpkgs/pull/123298
[2] https://github.com/incidentist/homebrew-nyxt
[3] https://github.com/NixOS/nixpkgs/pull/126101
[4] https://github.com/atlas-engineer/nyxt/issues/577
Comment 12 Carlos Alberto Lopez Perez 2021-09-06 08:46:51 PDT
Comment on attachment 437417 [details]
Combined patch (revised)

View in context: https://bugs.webkit.org/attachment.cgi?id=437417&action=review

Patch looks fine, but the change-logs have a formatting that don't follow the standard we usually use. See my comments

> Source/WTF/ChangeLog:6
> +        Define HAVE_AUDIT_TOKEN only for Cocoa backend to fix webkitgtk on
> +        macOS.
> +
> +        https://bugs.webkit.org/show_bug.cgi?id=225850

Please, don't wrap the subject lines and don't leave a blank line between the subject and the bug number.
Also, please use the same subject on all the changelog files.

For example use this:

Fix WebKitGTK build on MacOS
https://bugs.webkit.org/show_bug.cgi?id=225850

Reviewed by NOBODY (OOPS!).

Define HAVE_AUDIT_TOKEN only for Cocoa backend to fix webkitgtk on macOS.

[...]

> Source/WebKit/ChangeLog:11
> +        Don't require availability of MSG_NOSIGNAL to fix webkitgtk build on
> +        macOS.
> +
> +        Streamline conditionals for consistency between definitions and
> +        implementations to allow compiling webkitgtk on macOS.
> +
> +        https://bugs.webkit.org/show_bug.cgi?id=225850
> +
> +        Reviewed by NOBODY (OOPS!).

This changelog should kept the same title than the other changelog, and the explanation or the details comes after the "reviewed by" line. For example:


Fix WebKitGTK build on MacOS
https://bugs.webkit.org/show_bug.cgi?id=225850

Reviewed by NOBODY (OOPS!).

Don't require availability of MSG_NOSIGNAL to fix webkitgtk build on macOS.
Streamline conditionals for consistency between definitions and implementations to allow compiling webkitgtk on macOS. 

[...]
Comment 13 Carlos Alberto Lopez Perez 2021-09-06 08:53:08 PDT
Comment on attachment 437405 [details]
Combined patch

View in context: https://bugs.webkit.org/attachment.cgi?id=437405&action=review

>> Source/WebKit/ChangeLog:8
>> +        https://bugs.webkit.org/show_bug.cgi?id=225850
> 
> There should be one blank line in the ChangeLog above the URL.

I think this is incorrect. Above the url it should be the subject and not a blank line.
The formatting of ChangeLog files is:

"""
Subject (same subject for all the changelog entries, and without wrapping long lines)
https://bugs.webkit.org/show_bug.cgi?id=${bugnumber}

Reviewed by NOBODY (OOPS!).

Explanation of what this patch does.

* List of files modified
"""

Check how other changelog entries are written in case of doubt.

The tool Tools/Scripts/prepare-ChangeLog can help to automate this.
You can pass to it the bug number, for example: Tools/Scripts/prepare-ChangeLog -b 225850
Comment 14 Dmitry Kalinkin 2021-09-06 10:03:15 PDT
Created attachment 437423 [details]
Combined patch (re-revised)
Comment 15 Michael Catanzaro 2021-09-06 10:36:42 PDT
(In reply to Carlos Alberto Lopez Perez from comment #13)
> Comment on attachment 437405 [details]
> Combined patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=437405&action=review
> 
> >> Source/WebKit/ChangeLog:8
> >> +        https://bugs.webkit.org/show_bug.cgi?id=225850
> > 
> > There should be one blank line in the ChangeLog above the URL.
> 
> I think this is incorrect. Above the url it should be the subject and not a
> blank line.

Oops, yes. :)
Comment 16 EWS 2021-09-06 11:42:49 PDT
Committed r282061 (241361@main): <https://commits.webkit.org/241361@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 437423 [details].
Comment 17 Radar WebKit Bug Importer 2021-09-06 11:43:17 PDT
<rdar://problem/82797509>
Comment 18 youenn fablet 2021-09-07 02:21:05 PDT
Reopening to attach new patch.
Comment 19 youenn fablet 2021-09-07 02:21:10 PDT
Created attachment 437467 [details]
Patch
Comment 20 Carlos Alberto Lopez Perez 2021-09-07 02:48:23 PDT
(In reply to youenn fablet from comment #19)
> Created attachment 437467 [details]
> Patch

This patch seems for another bug than this one
Comment 21 youenn fablet 2021-09-07 07:15:00 PDT
Reopening to attach new patch.
Comment 22 youenn fablet 2021-09-07 07:15:05 PDT
Created attachment 437497 [details]
Patch
Comment 23 youenn fablet 2021-09-07 07:54:38 PDT
Comment on attachment 437497 [details]
Patch

Wrong bug