NEW 157574
webkit is not usable on OS X 10.10 and older due to CF_AVAILABLE usage
https://bugs.webkit.org/show_bug.cgi?id=157574
Summary webkit is not usable on OS X 10.10 and older due to CF_AVAILABLE usage
Jeremy Huddleston Sequoia
Reported 2016-05-11 11:39:50 PDT
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
Alexey Proskuryakov
Comment 1 2016-05-11 12:17:35 PDT
WebKit trunk supports 10.10 (Yosemite) and above. On 10.10, only Xcode 7 is supported, which includes 10.11 SDK.
Jeremy Huddleston Sequoia
Comment 2 2016-05-11 13:56:47 PDT
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
Comment 3 2016-05-11 16:57:10 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.