Trying to compile Firefox on Lion, after working around bug 659817 (with a local backout) and bug 655339 (with bug 655339 comment 21). > The following command failed to execute properly: > g++-4.2 -o nsDragService.o -c -fvisibility=hidden -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT=1 -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES -DSTATIC_EXPORTABLE_JS_API -DOSTYPE="Darwin11.0.0" -DOSARCH=Darwin -DNO_X11 -I/Users/jruderman/mozilla-central/widget/src/cocoa/../xpwidgets -I/Users/jruderman/mozilla-central/widget/src/cocoa -I. -I../../../dist/include -I../../../dist/include/nsprpub -I/Users/jruderman/mozilla-central/obj-ff-dbg-64/dist/include/nspr -I/Users/jruderman/mozilla-central/obj-ff-dbg-64/dist/include/nss -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -fno-strict-aliasing -fno-common -fshort-wchar -pthread -DNO_X11 -pipe -DDEBUG -D_DEBUG -DTRACING -g -DMOZILLA_CLIENT -include ../../../mozilla-config.h -MD -MF .deps/nsDragService.pp -fobjc-exceptions /Users/jruderman/mozilla-central/widget/src/cocoa/nsDragService.mm > > In file included from ../../../dist/include/nsCoord.h:41, > from ../../../dist/include/nsRect.h:43, > from /Users/jruderman/mozilla-central/widget/src/cocoa/../xpwidgets/nsBaseWidget.h:40, > from /Users/jruderman/mozilla-central/widget/src/cocoa/nsCocoaWindow.h:47, > from /Users/jruderman/mozilla-central/widget/src/cocoa/nsCocoaWindow.mm:40: > ../../../dist/include/nscore.h:261:1: warning: "NS_DEPRECATED" redefined > > In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8, > from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12, > from /Users/jruderman/mozilla-central/widget/src/cocoa/nsCocoaWindow.h:45, > from /Users/jruderman/mozilla-central/widget/src/cocoa/nsCocoaWindow.mm:40: > /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:165:1: warning: this is the location of the previous definition Our NS_DEPRECATED was added in bug 414063. Apple's NS_DEPRECATED is being added in Mac OS X 10.7.
I suspect this bug only happens if you either use the 10.7 SDK or don't specify an SDK (which would make the build use currently installed system files). In any case, I'm not able to reproduce it when I use the 10.6 SDK ("ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk"), doing either a 32-bit or a 64-bit build. Currently we default (on the trunk) to using the 10.5 SDK to do 32-bit builds, and the 10.6 SDK to do 64-bit builds -- the 32-bit binaries need to support OS X 10.5 and up, and the 64-bit binaries need to support OS X 10.6 and up. XCode 4.1 for OS X 10.7 doesn't have a 10.5 SDK. So it'll be a while before we can use it to do any kind of official build (even nightlies). And it'll be even longer before we can use the 10.7 SDK on OS X 10.7. We'll need to deal with this bug eventually, but it can't be considered a blocker.
Just confirming that this patch works well for me. I was able to build against the 10.7 SDK without NS_DEPRECATED problems.
Attached patch has neither author name nor commit message - Jesse, could you add those before putting this up as checkin-needed? :) https://developer.mozilla.org/en/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3f
Created attachment 537866 [details] [diff] [review] patch v2