Build fails with MacOSX 10.10 SDK

RESOLVED FIXED in Firefox 37

Status

()

Toolkit
General
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: mikedeboer, Assigned: cpeterson)

Tracking

unspecified
mozilla37
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox36 affected, firefox37 fixed)

Details

(Whiteboard: [works with 10.9, see comment 1])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

3 years ago
Doing a clobber build on OSX with the latest XCode installed - 6.1.1 (6A2008a) - and the MacOSX 10.10 SDK results in a failure to build with the following error:

 5:18.31 In file included from /Users/mikedeboer/Projects/fx-team/obj-x86_64-apple-darwin14.0.0/toolkit/xre/Unified_mm_toolkit_xre0.mm:2:
 5:18.31 Warning: -Wreceiver-forward-class in /Users/mikedeboer/Projects/fx-team/toolkit/xre/MacApplicationDelegate.mm: receiver 'GeckoNSApplication' is a forward class and corresponding @interface may not exist
 5:18.31 /Users/mikedeboer/Projects/fx-team/toolkit/xre/MacApplicationDelegate.mm:68:4: warning: receiver 'GeckoNSApplication' is a forward class and corresponding @interface may not exist [-Wreceiver-forward-class]
 5:18.31   [GeckoNSApplication sharedApplication];
 5:18.31    ^~~~~~~~~~~~~~~~~~
 5:18.31 /Users/mikedeboer/Projects/fx-team/toolkit/xre/MacApplicationDelegate.mm:57:8: note: forward declaration of class here
 5:18.31 @class GeckoNSApplication;
 5:18.31        ^
 5:18.31 /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:156:1: note: method 'sharedApplication' is used for the forward class
 5:18.31 + (NSApplication *)sharedApplication;
 5:18.31 ^
 5:18.31 In file included from /Users/mikedeboer/Projects/fx-team/obj-x86_64-apple-darwin14.0.0/toolkit/xre/Unified_mm_toolkit_xre0.mm:2:
 5:18.31 Warning: -Wreceiver-forward-class in /Users/mikedeboer/Projects/fx-team/toolkit/xre/MacApplicationDelegate.mm: receiver 'GeckoNSApplication' is a forward class and corresponding @interface may not exist
 5:18.31 /Users/mikedeboer/Projects/fx-team/toolkit/xre/MacApplicationDelegate.mm:83:4: warning: receiver 'GeckoNSApplication' is a forward class and corresponding @interface may not exist [-Wreceiver-forward-class]
 5:18.31   [GeckoNSApplication sharedApplication];
 5:18.31    ^~~~~~~~~~~~~~~~~~
 5:18.31 /Users/mikedeboer/Projects/fx-team/toolkit/xre/MacApplicationDelegate.mm:57:8: note: forward declaration of class here
 5:18.31 @class GeckoNSApplication;
 5:18.31        ^
 5:18.32 /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:156:1: note: method 'sharedApplication' is used for the forward class
 5:18.32 + (NSApplication *)sharedApplication;
 5:18.32 ^
 5:18.32 In file included from /Users/mikedeboer/Projects/fx-team/obj-x86_64-apple-darwin14.0.0/toolkit/xre/Unified_mm_toolkit_xre0.mm:2:
 5:18.32 /Users/mikedeboer/Projects/fx-team/toolkit/xre/MacApplicationDelegate.mm:93:22: error: cannot initialize a parameter of type 'id<NSFileManagerDelegate>' with an lvalue of type 'id<NSApplicationDelegate>'
 5:18.32   [NSApp setDelegate:delegate];
 5:18.32                      ^~~~~~~~
 5:18.32 /System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: note: passing argument to parameter 'delegate' here
 5:18.32 @property (assign) id <NSFileManagerDelegate> delegate NS_AVAILABLE(10_5, 2_0);
 5:18.32                                               ^
 5:18.33    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/casetrn.cpp
 5:18.36    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/titletrn.cpp
 5:18.39    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/tolowtrn.cpp
 5:18.42    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/toupptrn.cpp
 5:18.46    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/anytrans.cpp
 5:18.49    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/name2uni.cpp
 5:18.52    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/uni2name.cpp
 5:18.55    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/nortrans.cpp
 5:18.58    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/quant.cpp
 5:18.61    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/transreg.cpp
 5:18.65    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/brktrans.cpp
 5:18.68    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/regexcmp.cpp
 5:18.71 2 warnings and 1 error generated.
 5:18.71    clang++	 ...  /Users/mikedeboer/Projects/fx-team/intl/icu/source/i18n/rematch.cpp
 5:18.74 In the directory  /Users/mikedeboer/Projects/fx-team/obj-x86_64-apple-darwin14.0.0/toolkit/xre
 5:18.74 The following command failed to execute properly:
 5:18.74 /usr/bin/clang++ -o Unified_mm_toolkit_xre0.o -c -fvisibility=hidden -DOS_POSIX=1 -DOS_MACOSX=1 -DMOZ_APP_NAME="firefox" -DMOZ_APP_BASENAME="Firefox" -DMOZ_APP_VERSION="37.0a1" -DOS_TARGET="Darwin" -DMOZ_WIDGET_TOOLKIT="cocoa" -DMOZ_UPDATER -DTARGET_OS_ABI="Darwin_x86_64-gcc3" -DGRE_MILESTONE=37.0a1 -DAPP_VERSION=37.0a1 -DAPP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384} -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -DTOOLKIT_EM_VERSION="37.0a1" -DGRE_BUILDID=20150107155810 -I/Users/mikedeboer/Projects/fx-team/toolkit/xre -I. -I/Users/mikedeboer/Projects/fx-team/obj-x86_64-apple-darwin14.0.0/ipc/ipdl/_ipdlheaders -I/Users/mikedeboer/Projects/fx-team/ipc/chromium/src -I/Users/mikedeboer/Projects/fx-team/ipc/glue -I/Users/mikedeboer/Projects/fx-team/toolkit/xre/../profile -I/Users/mikedeboer/Projects/fx-team/config -I/Users/mikedeboer/Projects/fx-team/dom/base -I/Users/mikedeboer/Projects/fx-team/dom/ipc -I/Users/mikedeboer/Projects/fx-team/testing/gtest/mozilla -I/Users/mikedeboer/Projects/fx-team/toolkit/crashreporter -I/Users/mikedeboer/Projects/fx-team/xpcom/build -I../../dist/include -I/Users/mikedeboer/Projects/fx-team/obj-x86_64-apple-darwin14.0.0/dist/include/nspr -I/Users/mikedeboer/Projects/fx-team/obj-x86_64-apple-darwin14.0.0/dist/include/nss -fPIC -Qunused-arguments -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/Unified_mm_toolkit_xre0.o.pp -Qunused-arguments -Qunused-arguments -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -DNO_X11 -pipe -DNDEBUG -DTRIMMED -g -O3 -fomit-frame-pointer -DNO_X11 -fobjc-exceptions /Users/mikedeboer/Projects/fx-team/obj-x86_64-apple-darwin14.0.0/toolkit/xre/Unified_mm_toolkit_xre0.mm
 5:18.74 make[5]: *** [Unified_mm_toolkit_xre0.o] Error 1
 5:18.74 make[4]: *** [toolkit/xre/target] Error 2
 5:18.74 make[4]: *** Waiting for unfinished jobs....

This _could_ be due to bug 1117635, which recently landed: https://hg.mozilla.org/integration/fx-team/rev/143ddd8eded9
(Reporter)

Updated

3 years ago
Component: Widget: Cocoa → General
Product: Core → Toolkit
(Reporter)

Comment 1

3 years ago
I can confirm that this work around will yield you a good build:

Add...

ac_add_options --with-macos-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk

... to your .mozconfig and do a clobber build. (`./mach clobber && ./mach build`)
Whiteboard: [works with 10.9, see comment 1]
Created attachment 8545280 [details] [diff] [review]
patch?

Does this fix it?
Created attachment 8545317 [details] [diff] [review]
fix mac sdk 10.10 build failed

depends on Markus' patch. fix the including header error.

Comment 4

3 years ago
Comment on attachment 8545317 [details] [diff] [review]
fix mac sdk 10.10 build failed

This works well!  Can we check this in please ASAP?

Updated

3 years ago
Flags: needinfo?(cpeterson)
(Assignee)

Comment 5

3 years ago
I backed out my busted changeset for now, but I will test mstange and Jerry's patch and get it reviewed later:

https://hg.mozilla.org/integration/mozilla-inbound/rev/a39d8f6fc252
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Flags: needinfo?(cpeterson)
(Assignee)

Comment 6

3 years ago
Created attachment 8545661 [details] [diff] [review]
NSApplicationDelegate.patch

This patch folds my original -Wincompatible-pointer-types fix from bug 1117635 with your and Jerry's combined bustage fix.

Also, by #including "nsAppShell.h" for GeckoNSApplication's declaration, this patch also fixes the last two warnings in toolkit/xre. I will submit a follow-up patch to mark the toolkit/xre directory as FAIL_ON_WARNINGS.

toolkit/xre/MacApplicationDelegate.mm:68:4 [-Wreceiver-forward-class] receiver 'GeckoNSApplication' is a forward class and corresponding @interface may not exist
toolkit/xre/MacApplicationDelegate.mm:83:4 [-Wreceiver-forward-class] receiver 'GeckoNSApplication' is a forward class and corresponding @interface may not exist
Attachment #8545280 - Attachment is obsolete: true
Attachment #8545317 - Attachment is obsolete: true
Attachment #8545661 - Flags: review?(mstange)
Attachment #8545661 - Flags: review?(mstange) → review+
(Reporter)

Comment 8

3 years ago
Landed on m-c with a different bug number.

https://hg.mozilla.org/mozilla-central/rev/493811e4694e
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox36: --- → affected
status-firefox37: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
(Assignee)

Updated

2 years ago
Duplicate of this bug: 666651
You need to log in before you can comment on or make changes to this bug.