[Webkit-unassigned] [Bug 152720] New: JavaScriptCore fails to build on older versions of OS X due to CF_AVAILABLE usage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 4 17:31:45 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=152720

            Bug ID: 152720
           Summary: JavaScriptCore fails to build on older versions of OS
                    X due to CF_AVAILABLE usage
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jeremyhu at apple.com

Building webkit-gtk 2.11.2 on the MacPorts Mavericks buildbot failed due CF_AVAILABLE macro usage.  These macros should only be used by the OS X system frameworks and not local builds.  

/opt/local/var/macports/build/_opt_mports_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.2/Source/JavaScriptCore/API/JSContextRef.h:144:71: error: expected '=' after '__NSi_10_10'
JS_EXPORT JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx) CF_AVAILABLE(10_10, 8_0);
                                                                      ^
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:95:81: note: expanded from macro 'CF_AVAILABLE'
#define CF_AVAILABLE(_mac, _ios) __attribute__((availability(macosx,__NSi_##_mac)))
                                                                                ^
---

Elsewhere, I see these warnings, which seem to attempt to do that:

/opt/local/var/macports/build/_opt_mports_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.2/Source/JavaScriptCore/API/WebKitAvailability.h:68:9: warning: 'CF_AVAILABLE' macro redefined
#define CF_AVAILABLE(_mac, _ios)
        ^
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:95:9: note: previous definition is here
#define CF_AVAILABLE(_mac, _ios) __attribute__((availability(macosx,__NSi_##_mac)))
        ^

---

Thus, it looks like WebKitAvailability.h needs to be included in JSContextRef.h before that CF_AVAILABLE usage.

Also, please add an #undef before the #define in WebKitAvailability.h to silence that warning.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160105/542b8fd4/attachment.html>


More information about the webkit-unassigned mailing list