WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 214043
Building with the macOS Big Sur public SDK fails
https://bugs.webkit.org/show_bug.cgi?id=214043
Summary
Building with the macOS Big Sur public SDK fails
Rob Buis
Reported
2020-07-07 07:22:02 PDT
Building with the public SDK fails (Xcode 11.5 and Big Sur), there are multiple problems.
Attachments
Patch
(13.25 KB, patch)
2020-07-07 09:46 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(4.03 KB, patch)
2020-07-11 08:40 PDT
,
Rob Buis
ap
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Rob Buis
Comment 1
2020-07-07 09:46:34 PDT
Created
attachment 403702
[details]
Patch
Rob Buis
Comment 2
2020-07-07 09:53:59 PDT
Actually it seems Xcode 11.5 is not supposed to work on Big Sur, at least the command line tools refuse to install. However the build problems with Xcode 12 are very similar. I am not very familiar with this code and how to cleanly fix it, so this is a rough patch but it unblocks me locally. Some points: - I do not know how Source/WTF/wtf/PlatformHave.h could test for public sdk. - Setting _allowsHTTP3 seems problematic because it is marked readonly. How could that ever work? - the typedef enum seems a problem for clang although it seems valid C++ to me. Any hints appreciated! :)
Alexey Proskuryakov
Comment 3
2020-07-07 10:10:59 PDT
We should make every attempt to not guard functionality on USE(APPLE_INTERNAL_SDK), because we want the open source build to be real, and to work the same as what Apple ships as much as possible. I think that it would be easiest for someone at Apple to fix the build. Do you need it soon?
Saagar Jha
Comment 4
2020-07-07 10:11:46 PDT
I'm using the Xcode 12 SDK and seeing issues as well. The first one I ran into is a missing AXSIsolatedTreeMode, which I suspect is defined in the internal SDK and hiding the build failure:
https://bugs.webkit.org/show_bug.cgi?id=208691#c19
. I tried working around this by patching out ENABLE(ACCESSIBILITY_ISOLATED_TREE) code and ran into this, which I fixed:
https://bugs.webkit.org/show_bug.cgi?id=213911
. So now I'm up to WebCore, which fails because it's missing ANGLE headers. It seems to me like the "Copy Headers" phase from the ANGLE static library target should be doing this, but it doesn't show up in the build log at all so this might be some sort of dependency tracking failure in the build system.
Darin Adler
Comment 5
2020-07-07 10:11:54 PDT
Comment on
attachment 403702
[details]
Patch These changes don’t seem right. We want to require the internal SDK only if absolutely necessary. We need to go slower, one item at a time. And also, as you said, need to try with a supported Xcode/SDK combination.
Rob Buis
Comment 6
2020-07-07 10:19:59 PDT
Right, do not take this patch too seriously, it is just something quick I did to build and do my normal development (I only put serious patches for review). At least it should show where the problems are. As usual quicker is better, but I am not completely blocked. It is just an extra hassle when developing, and also it is not so nice to work on this stuff for me because touching some of these files (like PlatformHave.h) cause huge rebuilds on my poor 2015 mbp...
Rob Buis
Comment 7
2020-07-07 10:21:40 PDT
(In reply to Saagar Jha from
comment #4
)
> I'm using the Xcode 12 SDK and seeing issues as well. The first one I ran > into is a missing AXSIsolatedTreeMode, which I suspect is defined in the > internal SDK and hiding the build failure: >
https://bugs.webkit.org/show_bug.cgi?id=208691#c19
. I tried working around > this by patching out ENABLE(ACCESSIBILITY_ISOLATED_TREE) code and ran into > this, which I fixed:
https://bugs.webkit.org/show_bug.cgi?id=213911
. So now > I'm up to WebCore, which fails because it's missing ANGLE headers. It seems > to me like the "Copy Headers" phase from the ANGLE static library target > should be doing this, but it doesn't show up in the build log at all so this > might be some sort of dependency tracking failure in the build system.
We are in the same boat, although I run into AXSIsolatedTreeMode problem but not ANGLE problem it seems.
Saagar Jha
Comment 8
2020-07-07 10:25:11 PDT
I hit that one only after patching out that feature. But the fact that you didn't see it in Xcode 11.5 lends credence to the fact that it's an Xcode-related change, and I wasn't just missing something stupid when I was looking at why that part was failing :P I've also just found out that second beta has dropped, so I'll install that and see if that resolves any issues.
Rob Buis
Comment 9
2020-07-07 10:30:57 PDT
(In reply to Alexey Proskuryakov from
comment #3
)
> I think that it would be easiest for someone at Apple to fix the build. Do > you need it soon?
I agree that it would be easiest for someone at Apple to fix the build, as I said on my 2015 mbp working on this is no fun and I am not so familiar with the internal/public SDK. For me this is mid-priority as I have non WebKit projects I can work on.
Rob Buis
Comment 10
2020-07-07 10:34:23 PDT
(In reply to Saagar Jha from
comment #8
)
> I've also just found out that second beta has dropped, so I'll install that > and see if that resolves any issues.
Argh, 30 minutes after I grabbed 12A6159 :) Thanks for the heads up, I'll also try it.
Alexey Proskuryakov
Comment 11
2020-07-07 11:28:17 PDT
I don't expect the second beta to change anything in this regard.
Saagar Jha
Comment 12
2020-07-07 15:01:25 PDT
As you guessed, installing the new Xcode beta does not help :(
Rob Buis
Comment 13
2020-07-11 08:40:16 PDT
Created
attachment 404053
[details]
Patch
Darin Adler
Comment 14
2020-07-11 12:10:52 PDT
Comment on
attachment 404053
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=404053&action=review
> Source/WebKit/ChangeLog:9 > + The preconnect ping feature does not build using the Xcode 11.5 public > + SDK, so add a check for APPLE_INTERNAL_SDK.
Could you tell me more about why it does not build using the public SDK? We should be very reluctant to put things behind USE(APPLE_INTERNAL_SDK).
Alexey Proskuryakov
Comment 15
2020-07-11 14:31:27 PDT
Comment on
attachment 404053
[details]
Patch This CFNetwork functionality is not present in current macOS 11 seed versions, so it's more than an SDK issue. I don't think that we should wait for it to become available, so disabling it completely seems unavoidable. But we need to also compile out code in TestWebKitAPI. I can think of two approaches. 1. Disable HAVE_PRECONNECT_PING in PlatformHave.h for public SDK for now. This would need to reference a bug to re-enable it. 2. Use runtime respondsToSelector checks (TestWebKitAPI part could be somewhat tricky).
Alexey Proskuryakov
Comment 16
2020-07-11 14:33:10 PDT
> Actually it seems Xcode 11.5 is not supposed to work on Big Sur, at least the command line tools refuse to install.
Removed Xcode 11.5 from the title.
Rob Buis
Comment 17
2020-07-12 07:20:16 PDT
(In reply to Darin Adler from
comment #14
)
> Comment on
attachment 404053
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=404053&action=review
> > > Source/WebKit/ChangeLog:9 > > + The preconnect ping feature does not build using the Xcode 11.5 public > > + SDK, so add a check for APPLE_INTERNAL_SDK. > > Could you tell me more about why it does not build using the public SDK? We > should be very reluctant to put things behind USE(APPLE_INTERNAL_SDK).
FWIW build error is: In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource198.cpp:5: In file included from ./loader/CookieJar.cpp:35: In file included from Source/WebCore/platform/network/NetworkStorageSession.h:42: PAL/pal/spi/cf/CFNetworkSPI.h:71:1: error: expected unqualified-id @interface _NSHTTPConnectionInfo : NSObject ^ PAL/pal/spi/cf/CFNetworkSPI.h:73:1: error: expected unqualified-id @property (readonly) BOOL isValid; ^ PAL/pal/spi/cf/CFNetworkSPI.h:74:1: error: expected unqualified-id @end ^ PAL/pal/spi/cf/CFNetworkSPI.h:78:1: error: expected unqualified-id @end ^
Darin Adler
Comment 18
2020-07-12 10:10:39 PDT
Comment on
attachment 404053
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=404053&action=review
>>> Source/WebKit/ChangeLog:9 >>> + SDK, so add a check for APPLE_INTERNAL_SDK. >> >> Could you tell me more about why it does not build using the public SDK? We should be very reluctant to put things behind USE(APPLE_INTERNAL_SDK). > > FWIW build error is: > In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource198.cpp:5: > In file included from ./loader/CookieJar.cpp:35: > In file included from Source/WebCore/platform/network/NetworkStorageSession.h:42: > PAL/pal/spi/cf/CFNetworkSPI.h:71:1: error: expected unqualified-id > @interface _NSHTTPConnectionInfo : NSObject > ^ > PAL/pal/spi/cf/CFNetworkSPI.h:73:1: error: expected unqualified-id > @property (readonly) BOOL isValid; > ^ > PAL/pal/spi/cf/CFNetworkSPI.h:74:1: error: expected unqualified-id > @end > ^ > PAL/pal/spi/cf/CFNetworkSPI.h:78:1: error: expected unqualified-id > @end > ^
That error above is about Objective-C declarations in a header that’s included by a non-Objective-C source file. The fix for that one error is to put the declarations inside an #ifdef __OBJC__ or defined(__OBJC__) block. Note, for example, NSURLSessionTask below.
Rob Buis
Comment 19
2020-07-12 14:15:43 PDT
(In reply to Darin Adler from
comment #18
)
> > That error above is about Objective-C declarations in a header that’s > included by a non-Objective-C source file. The fix for that one error is to > put the declarations inside an #ifdef __OBJC__ or defined(__OBJC__) block. > Note, for example, NSURLSessionTask below.
Thanks, I moved that fix to
https://bugs.webkit.org/show_bug.cgi?id=214238
.
Saagar Jha
Comment 20
2020-07-13 17:37:39 PDT
Couple new issues just cropped up on 11.0 having to do with HAVE(LARGE_CONTROL_SIZE) (corresponding availability macro defined anywhere) and HAVE(ALTERNATE_ICONS) (defined correctly and enabled on my system, but causes the use of what looks like undeclared SPI +[NSImage _imageWithSystemSymbolName:]). I'll try declaring the appropriate things, seeing if that helps, and sending in a patch if so.
Darin Adler
Comment 21
2020-07-13 17:44:50 PDT
When new versions come out there are always a ton of things like this, and we know they exist for Big Sur, and the new versions of iOS, watchOS and tvOS. People at Apple typically fix these during the summer while the operating systems make their way from beta to GM. In this case, Jonathan Bedard said (in another bug), "Aakash started work on [macOS Big Sur 2 weeks ago, but I think tvOS and watchOS EWS were a higher priority. Someone from [the Apple WebKit team] will get [the macOS Big Sur build] working in the next 2 weeks."
Saagar Jha
Comment 22
2020-07-13 17:54:13 PDT
(I appreciate the update, but am a bit unsure if that was meant to be purely informational or a polite way of saying "we know about the issue, we're working on fixing it, please stop bothering us with updates and don't send in patches"…)
Darin Adler
Comment 23
2020-07-13 17:56:35 PDT
I don’t mind if some non-Apple contributors send patches, but there’s a good chance they won’t be correct, and I hope the process is not too frustrating. I also don’t think this can all be completed by someone outside Apple. And I wanted to point out that we plan to handle it this year the way we have every other year.
Saagar Jha
Comment 24
2020-07-14 20:23:40 PDT
Fair enough :) I've created
https://bugs.webkit.org/show_bug.cgi?id=214338
with a patch that has a slight chance of having useful things in it. That, coupled with disabling ENABLE_ACCESSIBILITY_ISOLATED_TREE and HAVE_INCREMENTAL_PDF_APIS (which still use SPI that I didn't want to bother guessing the values of) got me a successful build for Intel, though I haven't tried running it yet. On Apple silicon I get through most of the build but the linker fails, so I still need to figure out what is going on there.
Rob Buis
Comment 25
2020-07-15 00:13:05 PDT
(In reply to Saagar Jha from
comment #24
)
> Fair enough :) I've created
https://bugs.webkit.org/show_bug.cgi?id=214338
> with a patch that has a slight chance of having useful things in it. That, > coupled with disabling ENABLE_ACCESSIBILITY_ISOLATED_TREE and > HAVE_INCREMENTAL_PDF_APIS (which still use SPI that I didn't want to bother > guessing the values of) got me a successful build for Intel, though I > haven't tried running it yet. On Apple silicon I get through most of the > build but the linker fails, so I still need to figure out what is going on > there.
It seems we are doing similar work, see the bugs linked to this one :) I think it is not needed to disable ENABLE_ACCESSIBILITY_ISOLATED_TREE, see
https://bugs.webkit.org/show_bug.cgi?id=214237
. Quite possibly the HAVE_INCREMENTAL_PDF_APIS issue is one that only Apple employees can fix.
Jonathan Bedard
Comment 26
2020-07-15 22:26:11 PDT
Linked this up to
https://bugs.webkit.org/show_bug.cgi?id=214396
, which should be enough to get WebKit to build for Big Sur with the Seed 1 SDK.
Rob Buis
Comment 27
2020-07-16 03:32:48 PDT
(In reply to Jonathan Bedard from
comment #26
)
> Linked this up to
https://bugs.webkit.org/show_bug.cgi?id=214396
, which > should be enough to get WebKit to build for Big Sur with the Seed 1 SDK.
That fixes my build, thanks! I will close this bug therefore.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug