Closed Bug 929686 Opened 12 years ago Closed 11 years ago

OS X 10.9 build error: dom/system/mac/CoreLocationLocationProvider.mm:152:62: error: use of undeclared identifier 'kCWInterfaceStateRunning'

Categories

(Core :: DOM: Core & HTML, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: gps, Assigned: smichaud)

References

Details

Attachments

(1 file)

Just got this build error when attempting to build m-c tip on OS X 10.9 Mavericks. mozconfig is extremely vanilla. CoreLocationLocationProvider.o /usr/bin/clang++ -o CoreLocationLocationProvider.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -DNO_NSPR_10_SUPPORT -DOS_POSIX=1 -DOS_MACOSX=1 -I/Users/gps/src/firefox/dom/src/geolocation -I/Users/gps/src/firefox/ipc/chromium/src -I/Users/gps/src/firefox/ipc/glue -I../../../ipc/ipdl/_ipdlheaders -I/Users/gps/src/firefox/dom/system/mac -I. -I../../../dist/include -I/Users/gps/src/firefox/obj-firefox.noindex/dist/include/nspr -I/Users/gps/src/firefox/obj-firefox.noindex/dist/include/nss -fPIC -Qunused-arguments -DMOZILLA_CLIENT -include ../../../mozilla-config.h -MD -MP -MF .deps/CoreLocationLocationProvider.o.pp -Qunused-arguments -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags -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 -fobjc-exceptions /Users/gps/src/firefox/dom/system/mac/CoreLocationLocationProvider.mm /Users/gps/src/firefox/dom/system/mac/CoreLocationLocationProvider.mm:152:33: warning: instance method '-interfaceState' not found (return type defaults to 'id') [-Wobjc-method-access] if ([[[CWI_class interface] interfaceState] intValue] == kCWInterfaceStateRunning) { ^~~~~~~~~~~~~~ /Users/gps/src/firefox/dom/system/mac/CoreLocationLocationProvider.mm:152:62: error: use of undeclared identifier 'kCWInterfaceStateRunning' if ([[[CWI_class interface] interfaceState] intValue] == kCWInterfaceStateRunning) { ^ 1 warning and 1 error generated. make[3]: *** [CoreLocationLocationProvider.o] Error 1 make[2]: *** [dom/system/mac/compile] Error 2 make[1]: *** [compile] Error 2 make: *** [default] Error 2
Blocks: 928217
I'll take care of this, probably in the next few days.
Assignee: nobody → smichaud
By the way, which Mavericks are you running? The GM (build 13A598), the "free update" (aka the "release", build 13A602) or one of the DPs? If you're running the "free update", did you update from some other version of OS X? If so which one?
I'm running the GM (13A598). I upgraded from every single DP, I think. Before that, I'm pretty sure this machine was running 10.8. I can try to reinstall the release build from scratch if you think it will make a difference.
I haven't yet tried to build a post-bug-928217 tree on 10.9 either -- any version. I'll do that when I get to this bug (sometime in the next few days). But it's very puzzling that some identifiers (not deprecated, as far as I know) have (apparently) gotten de-defined on 10.9 (or in the SDK that you're using). I'll know more once I've done some work here.
I was able to work around this by building with the OS X 10.8 SDK (which conveniently ships as part of Xcode 5 alongside the 10.9 SDK). ac_add_options --with-macos-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
I'm seeing this on the 'free upgrade' as well. My UX builds use the 10.6 SDK (because that caused some issues on the builds we ship, so I had to use that to reproduce). UX tracks m-c, and was fine. Looks like anything earlier than the 10.9 SDK works, then.
(In reply to Steven Michaud from comment #4) > I haven't yet tried to build a post-bug-928217 tree on 10.9 either -- any > version. I'll do that when I get to this bug (sometime in the next few > days). > > But it's very puzzling that some identifiers (not deprecated, as far as I > know) have (apparently) gotten de-defined on 10.9 (or in the SDK that you're > using). > > I'll know more once I've done some work here. https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_9/CoreWLAN.html :-(
> :-( Yes, indeed. Looks like Apple got rid of a bunch of stuff from the CoreWLAN header files on 10.9 without ever deprecating any of it. And though the underlying functionality may still be there (class-dump still shows the [CWInterface interfaceState] method), it's probably best not to rely on it on 10.9 and up. I don't have time right now to do the research required to look for alternatives. So as a stopgap I'll post a patch that ifdefs out the code that uses the "missing" symbols when compiled on 10.9 (with the 10.9 SDK), and which disables that code when run on 10.9 (and up). This will in effect disable CoreLocation geolocation in these circumstances.
Attachment #822026 - Flags: review?(spohl.mozilla.bugs)
Attachment #822026 - Flags: review?(spohl.mozilla.bugs) → review+
Comment on attachment 822026 [details] [diff] [review] Stopgap patch to fix build problems Landed on mozilla-inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/d5fa4120ce92
Whiteboard: [leave-open]
This code has changed and this bug is no longer relevant
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
> This code has changed and this bug is no longer relevant Please provide references to the change(s) -- such as one or more bug numbers.
Flags: needinfo?(gkeeley)
I am looking at this code for the first time, and this code is gone. Leave this ni to me, and I'll check the history and find the change, as I am trying to find the time anyway to fix up this code. Otherwise if the author if this change is cc'd on the bug, please put in this information, or if you know offhand who made the change, please switch the ni.
Flags: needinfo?(gkeeley)
and responding cleared the ni, setting it back so I don't forget
Flags: needinfo?(gkeeley)
The code containing this patch got removed as a followup to bug 928217 -- see bug 928217 comment #10 and following. I reviewed the patch, but had completely forgotten about it :-(
Flags: needinfo?(gkeeley)
WORKSFORME seems more accurate.
Resolution: INVALID → WORKSFORME
Whiteboard: [leave-open]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: