[10.7 SDK] Conflicting definitions of NS_DEPRECATED

RESOLVED FIXED in mozilla7

Status

()

Core
XPCOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Jesse Ruderman, Assigned: Jesse Ruderman)

Tracking

Trunk
mozilla7
x86_64
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

4.21 KB, patch
Jesse Ruderman
: review+
Jesse Ruderman
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
Created attachment 535238 [details] [diff] [review]
rename NS_DEPRECATED to MOZ_DEPRECATED
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.
Severity: blocker → normal
(Assignee)

Updated

6 years ago
Attachment #535238 - Flags: superreview?(benjamin)
Attachment #535238 - Flags: review?(Pidgeot18)
(Assignee)

Updated

6 years ago
Summary: [10.7] Conflicting definitions of NS_DEPRECATED → [10.7 SDK] Conflicting definitions of NS_DEPRECATED
Just confirming that this patch works well for me. I was able to build against the 10.7 SDK without NS_DEPRECATED problems.
Attachment #535238 - Flags: review?(Pidgeot18) → review+
Blocks: 661638
Attachment #535238 - Flags: superreview?(benjamin) → superreview+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed

Updated

6 years ago
Assignee: nobody → jruderman
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
(Assignee)

Comment 5

6 years ago
Created attachment 537866 [details] [diff] [review]
patch v2
Attachment #535238 - Attachment is obsolete: true
Attachment #537866 - Flags: superreview+
Attachment #537866 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/8199563892a3
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
You need to log in before you can comment on or make changes to this bug.