The Cocoa headers under Source/WTF/wtf/spi/cocoa are required to build WebKitGTK on macOS, but they are missing from the released tarballs. It will also be convenient to package all headers under Source/WTF/wtf/spi.
That can't be right because the spi is the Apple public API. That should not be required for building WebKitGTK, which has a different public API. I'm afraid that you'll have to untangle whatever dependencies are involved here: no WebKit developers work on WebKitGTK for macOS, so it's up to the people who try to build and use it to figure out how to keep it working. Sorry....
You can find the manifest used to build the tarballs in Tools/gtk/manifest.txt.in. Notice that all cocoa/ and even mac/ directories are excluded from the tarball. Should be somehow possible to continue to do that.
Yeah, but Source/WTF/wtf/spi/darwin/ is included somehow...
I think we do want to include darwin/ directories because those are required to build on macOS. We should probably add spi/ to the list of directories to exclude, though.
(In reply to Michael Catanzaro from comment #4) > I think we do want to include darwin/ directories because those are required > to build on macOS. We should probably add spi/ to the list of directories to > exclude, though. (BTW, I'm just guessing about this. You're more familiar with macOS than I am. But I am fairly sure we don't want anything under spi/ to be built.)
I found that in the files Source/WTF/wtf/WTFConfig.cpp (Bug #222086) Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp (Bug #235720) Cocoa headers are included with an #if OS(DARWIN) instead of #if PLATFORM(COCOA), and that seems problematic.
(In reply to echassiers.09-regards from comment #6) > I found that in the files > > Source/WTF/wtf/WTFConfig.cpp (Bug #222086) > Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp (Bug #235720) > > Cocoa headers are included with an #if OS(DARWIN) instead of #if > PLATFORM(COCOA), and that seems problematic. And these are effectively the only files that need to be fixed. Tested on my own machine.
If you have a fix that works, want to try submitting a pull request?
(In reply to Michael Catanzaro from comment #8) > If you have a fix that works, want to try submitting a pull request? I have a patch in my GitHub repo that fixes WTF errors when building WebKitGTK, which might seem too immature since I'm not aware of the Contributing Code. https://github.com/wegank/nur-packages/blob/6f9b8a3e25157be742df286f93c3f0a3648cc4eb/pkgs/development/libraries/webkitgtk/fix-wtf-errors-on-darwin.patch
That actually looks good to me. Seems you've disentangled things nicely. If you aren't comfortable with submitting your own pull request on GitHub, I can submit it for you.
(In reply to Michael Catanzaro from comment #10) > That actually looks good to me. Seems you've disentangled things nicely. > > If you aren't comfortable with submitting your own pull request on GitHub, I > can submit it for you. Oh, I'd really appreciate it if you could do me a favour.
Pull request: https://github.com/WebKit/WebKit/pull/3246
(In reply to Michael Catanzaro from comment #1) > That can't be right because the spi is the Apple public API. That should not > be required for building WebKitGTK, which has a different public API. It turns out this was an altogether different SPI. Confusing. Whatever. :) I guess "SPI" is just a different way of saying "API".
Committed 253367@main (6bb3f1342f34): <https://commits.webkit.org/253367@main> Reviewed commits have been landed. Closing PR #3246 and removing active labels.