Can't build with OSX 10.14 SDK with --enable-warnings-as-errors
Categories
(Core :: Widget: Cocoa, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox-esr68 | --- | wontfix |
firefox68 | --- | unaffected |
firefox69 | --- | wontfix |
firefox70 | --- | fixed |
People
(Reporter: mccr8, Assigned: glandium)
References
(Blocks 2 open bugs, Regression)
Details
(Keywords: regression)
Attachments
(5 files, 1 obsolete file)
I can no longer build on OSX 10.13.6.
I get this error message (plus a number of similar ones):
0:21.03 /Users/amccreight/mc/widget/cocoa/nsCocoaUtils.mm:1174:19: error: 'AVAuthorizationStatusNotDetermined' is only available on macOS 10.14 or newer [-Werror,-Wunguarded-availability-new]
0:21.03 (int)AVAuthorizationStatusNotDetermined);
0:21.03 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I was able to build on this machine the last time I pulled, which was last week at some point. I'm not sure what has regressed. nsCocoaUtils.mm doesn't seem to have changed recently.
This particular chunk of code is guarded by
#if defined(MAC_OS_X_VERSION_10_14)
so I'm not sure why it is trying to compile it. I'm not sure where this is supposed to be defined.
Comment 1•5 years ago
|
||
You might try building with the 10.11 SDK: https://bugzilla.mozilla.org/show_bug.cgi?id=1522931#c27
Comment 2•5 years ago
|
||
This is bug 1494851.
Reporter | ||
Comment 3•5 years ago
|
||
If the #if defined(MAC_OS_X_VERSION_10_14) guards actually broke, there's likely going to be more than needs to be fixed than one API call. I guess we'll see.
Reporter | ||
Comment 4•5 years ago
|
||
I'll start bisecting this. My good changeset is from July 3, and my bad changeset is from July 5, so hopefully it won't take long.
Reporter | ||
Comment 5•5 years ago
|
||
I haven't gotten this quite bisected yet, but bug 1560044 is in the range and looks related. (Bug 1558924 is in the range and also mentions OSX, but I can't see how the patch would affect anything like this.)
Reporter | ||
Comment 6•5 years ago
|
||
I'm going to undupe this. As far as I can tell, this is a new regression, where one of the symptoms of the regression is bug 1494851, so I'll mark it depending on that.
Anyways, my bisection points the blame to bug 1560044. My basic approach to bisection was to do mach build, let that run for awhile, then do mach build widget/
Glandium, can you take a look at this? Thanks.
Reporter | ||
Comment 7•5 years ago
|
||
Reporter | ||
Comment 8•5 years ago
|
||
Reporter | ||
Comment 9•5 years ago
|
||
Assignee | ||
Comment 10•5 years ago
|
||
So, the problem is with the code:
#if defined(MAC_OS_X_VERSION_10_14)
MAC_OS_X_VERSION_10_x
is not meant to be used this way. The SDK for version 10.x defines it, but the SDK can be used to target older versions, which is what happens when you use that version of the SDK on an older version of the OS.
Assignee | ||
Comment 11•5 years ago
|
||
At quick glance it looks like this is the only place misusing MAC_OS_X_VERSION_10_x
Assignee | ||
Comment 12•5 years ago
|
||
Assignee | ||
Comment 13•5 years ago
|
||
Note there are other uses of MAC_OS_X_VERSION_MAX_ALLOWED
that should probably be replaced with MAC_OS_X_VERSION_MIN_REQUIRED
, but I'll leave that to Stephen or Haik to fix.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Comment 14•5 years ago
|
||
See code review feedback in phabricator.
Assignee | ||
Comment 15•5 years ago
|
||
While there, transform the MOZ_ASSERTs into static_asserts, so that
discrepancies are caught at build time rather than runtime.
Note that I also tried to replace nsCocoaFeatures::OnMojaveOrLater with
@available, but that failed to link on older SDKs because of missing
___isOSVersionAtLeast symbol.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Thanks for taking this on and improving the asserts. It looks like your patch addresses the problem on bug 1494851 and we can now close it as a dupe of this bug.
Assignee | ||
Comment 17•5 years ago
|
||
There is less incentive to keep things building with older versions of
clang for OSX builds, and we're going to require an objective-C feature
that was added in clang 5.
Comment 18•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 19•5 years ago
|
||
The priority flag is not set for this bug.
:spohl, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Comment 20•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5f82bce8aa27
https://hg.mozilla.org/mozilla-central/rev/991aad183871
Comment 21•5 years ago
|
||
Is this something we wanted to backport to Beta and ESR68 to make life easier for developers?
Assignee | ||
Comment 22•5 years ago
|
||
People building with --enable-warnings-as-errors are asking for problems. Even more so when building esr68, which is likely to fail because of new warnings in newer versions of the rust compiler. So I'd say meh.
Updated•5 years ago
|
Comment 23•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #22)
People building with --enable-warnings-as-errors are asking for problems. Even more so when building esr68, which is likely to fail because of new warnings in newer versions of the rust compiler. So I'd say meh.
I mean, building without it is also asking for problems because then your patches get backed out on infra because they cause warnings which are treated as errors there, soooo...
Assignee | ||
Comment 24•5 years ago
|
||
If you're really worried about warnings, you should at least do a try push with builds only, on all platforms. Because your local build with --enable-warnings-as-errors still has the possibility of making warnings on other platforms invisible to you.
Comment 25•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #24)
If you're really worried about warnings, you should at least do a try push with builds only, on all platforms. Because your local build with --enable-warnings-as-errors still has the possibility of making warnings on other platforms invisible to you.
Sure, but the possibility is much smaller, esp. now that we use clang everywhere, and because I effectively never write C++ code that (a) runs on multiple platforms and (b) has per-platform codepaths. So I run with --enable-warnings-as-errors locally in order to catch bustage before I push to try, as pushing to try takes much longer...
Comment 27•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #22)
People building with --enable-warnings-as-errors are asking for problems. Even more so when building esr68, which is likely to fail because of new warnings in newer versions of the rust compiler. So I'd say meh.
FYI, when building release or beta, one should use rustup override
to select the right rust version for the version of the tree being built.
Updated•3 years ago
|
Description
•