Bug 157574
Summary: | webkit is not usable on OS X 10.10 and older due to CF_AVAILABLE usage | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jeremy Huddleston Sequoia <jeremyhu> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ap |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=152720 | ||
Bug Depends on: | |||
Bug Blocks: | 126492 |
Jeremy Huddleston Sequoia
When building projects that make use of WebKit on older OS versions, CF_AVAILABLE() is unable to expand. Furthermore, these availability macros don't really apply to this install. They only apply when installing the system framework.
In file included from /opt/local/include/webkitgtk-4.0/JavaScriptCore/JavaScript.h:31:
In file included from /opt/local/include/webkitgtk-4.0/JavaScriptCore/JSContextRef.h:29:
In file included from /opt/local/include/webkitgtk-4.0/JavaScriptCore/JSObjectRef.h:31:
/opt/local/include/webkitgtk-4.0/JavaScriptCore/JSValueRef.h:139:67: error: expected function body after function declarator
JS_EXPORT bool JSValueIsArray(JSContextRef ctx, JSValueRef value) CF_AVAILABLE(10_11, 9_0);
^
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:54:34: note: expanded from macro 'CF_AVAILABLE'
#define CF_AVAILABLE(_mac, _ios) AVAILABLE_MAC_OS_X_VERSION_##_mac##_AND_LATER
^
<scratch space>:30:1: note: expanded from macro 'AVAILABLE_MAC_OS_X_VERSION_'
AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER
^
In file included from goawebview.c:27:
This was seen on webkit-gtk-2.12.2 on OS X Lion, but the issue applies to Yosemite as well.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
WebKit trunk supports 10.10 (Yosemite) and above. On 10.10, only Xcode 7 is supported, which includes 10.11 SDK.
Jeremy Huddleston Sequoia
Well you might not support it as a firstclass port, but webkit-gtk works fine back as far as Snow Leopard without issue.
However, the current sources do *NOT* work on 10.10 either because the CF_AVAILABLE macros aren't being stripped out, so those are getting marked as weak even though the built WebKit obviously contains them.
In the past, the CF_AVAILABLE macros have been stripped so they don't break non PLATFORM(COCOA) builds. That is not currently happening here.
Jeremy Huddleston Sequoia
The changes in #152720 handle the case for *building* webkit, but I recall that something used to strip these availability macros out of the installed headers. That process is no longer happening.