Bug 242552 - [macOS Ventura] Support building open source WebKit
Summary: [macOS Ventura] Support building open source WebKit
Status: RESOLVED DUPLICATE of bug 242429
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 241341
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-08 22:20 PDT by Patrick Angle
Modified: 2022-07-09 11:45 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Angle 2022-07-08 22:20:02 PDT
macOS Ventura Beta 3 (22A5295h) /w Xcode 14 beta 3 (14A5270f) with top-of-tree checkout.

Using either `make` or `build-webkit` I'm getting the errors like this when trying to build:
```
In file included from /Users/patrickangle/Developer/WebKit/Source/WebCore/PAL/pal/cocoa/VisionKitCoreSoftLink.mm:30:
/Users/patrickangle/Developer/WebKit/WebKitBuild/Release/usr/local/include/pal/spi/cocoa/VisionKitCoreSPI.h:160:40: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
```

If I NS_ASSUME_NONNULL_BEGIN all the things, I then fail with:
```
In file included from /Users/patrickangle/Developer/WebKit/Source/WebCore/PAL/pal/cocoa/VisionKitCoreSoftLink.mm:30:
/Users/patrickangle/Developer/WebKit/WebKitBuild/Release/usr/local/include/pal/spi/cocoa/VisionKitCoreSPI.h:171:12: error: cannot find interface declaration for 'VKCImageAnalysis'; did you mean 'VKImageAnalysis'?
@interface VKCImageAnalysis (Staging_93280734)
/Users/patrickangle/Developer/WebKit/WebKitBuild/Release/usr/local/include/pal/spi/cocoa/VisionKitCoreSPI.h:87:12: note: 'VKImageAnalysis' declared here
@interface VKImageAnalysis : NSObject <NSSecureCoding>
/Users/patrickangle/Developer/WebKit/Source/WebCore/PAL/pal/cocoa/VisionKitCoreSoftLink.mm:42:72: error: declaration of 'vk_cgImageRemoveBackground' has a different language linkage
SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, VisionKitCore, vk_cgImageRemoveBackground, void, (CGImageRef image, BOOL crop, VKCGImageRemoveBackgroundCompletion completion), (image, crop, completion), PAL_EXPORT)
In file included from /Users/patrickangle/Developer/WebKit/Source/WebCore/PAL/pal/cocoa/VisionKitCoreSoftLink.mm:30:
/Users/patrickangle/Developer/WebKit/WebKitBuild/Release/usr/local/include/pal/spi/cocoa/VisionKitCoreSPI.h:192:13: note: previous declaration is here
extern void vk_cgImageRemoveBackground(CGImageRef, BOOL cropToFit, VKCGImageRemoveBackgroundCompletion);
/Users/patrickangle/Developer/WebKit/Source/WebCore/PAL/pal/cocoa/VisionKitCoreSoftLink.mm:43:72: error: declaration of 'vk_cgImageRemoveBackgroundWithDownsizing' has a different language linkage
SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, VisionKitCore, vk_cgImageRemoveBackgroundWithDownsizing, void, (CGImageRef image, BOOL canDownsize, BOOL cropToFit, void(^completion)(CGImageRef, NSError *)), (image, canDownsize, cropToFit, completion), PAL_EXPORT)
In file included from /Users/patrickangle/Developer/WebKit/Source/WebCore/PAL/pal/cocoa/VisionKitCoreSoftLink.mm:30:
/Users/patrickangle/Developer/WebKit/WebKitBuild/Release/usr/local/include/pal/spi/cocoa/VisionKitCoreSPI.h:193:13: note: previous declaration is here
extern void vk_cgImageRemoveBackgroundWithDownsizing(CGImageRef, BOOL canDownsize, BOOL cropToFit, void(^completion)(CGImageRef, NSError *));
```
Comment 1 Patrick Angle 2022-07-08 22:21:57 PDT
I tried taking a stab at fixing this, but even if just my blanket use of NS_ASSUME_NONNULL_BEGIN had fixed the build someone more familiar with these APIs would probably have had to actually help get the nullable annotations to be accurate.
Comment 2 Radar WebKit Bug Importer 2022-07-08 22:22:59 PDT
<rdar://problem/96715188>
Comment 3 Alexey Proskuryakov 2022-07-09 11:45:04 PDT

*** This bug has been marked as a duplicate of bug 242429 ***