Bug 24274

Summary: [Qt] WebKit Qt build fails on Mac with Qt 4.4.2
Product: WebKit Reporter: Erik L. Bunce <elbunce>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: elbunce, hausmann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Fixed the Qt 4.4 Mac build with netscape plugins enabled.
none
Fixed the Qt 4.4 Mac build with netscape plugins enabled. hausmann: review+

Description Erik L. Bunce 2009-03-01 13:23:47 PST
WebKit Qt build fails on Mac with Qt 4.4.2 built with:
$ ./WebKitTools/Scripts/build-webkit --qt  --debug 

The first failure is: 
../../../WebCore/platform/text/mac/StringImplMac.mm -o tmp/StringImplMac.o
../../../WebCore/platform/mac/FoundationExtras.h: In function ‘objc_object* HardRetain(objc_object*)’:
../../../WebCore/platform/mac/FoundationExtras.h:35: error: ‘CFRetain’ was not declared in this scope
../../../WebCore/platform/mac/FoundationExtras.h: In function ‘void HardRelease(objc_object*)’:
../../../WebCore/platform/mac/FoundationExtras.h:41: error: ‘CFRelease’ was not declared in this scope
../../../WebCore/platform/mac/FoundationExtras.h: In function ‘objc_object* HardRetainWithNSRelease(objc_object*)’:
../../../WebCore/platform/mac/FoundationExtras.h:57: warning: no ‘-release’ method found
../../../WebCore/platform/mac/FoundationExtras.h:57: warning: (Messages without a matching method signature
../../../WebCore/platform/mac/FoundationExtras.h:57: warning: will be assumed to return ‘id’ and accept
../../../WebCore/platform/mac/FoundationExtras.h:57: warning: ‘...’ as arguments.)
../../../WebCore/platform/mac/FoundationExtras.h: At global scope:
../../../WebCore/platform/mac/FoundationExtras.h:66: error: ‘HardAutorelease’ declared as an ‘inline’ variable
../../../WebCore/platform/mac/FoundationExtras.h:66: error: ‘CFTypeRef’ was not declared in this scope
../../../WebCore/platform/mac/FoundationExtras.h:67: error: expected ‘,’ or ‘;’ before ‘{’ token
../../../WebCore/platform/text/mac/StringImplMac.mm: In member function ‘WebCore::StringImpl::operator NSString*()’:
../../../WebCore/platform/text/mac/StringImplMac.mm:30: error: ‘HardAutorelease’ cannot be used as a function
make[1]: *** [tmp/StringImplMac.o] Error 1

This was caused by the migration by the Mac port to use FoundationExtras.h (which didn't include the <Foundation/Foundation.h> header).

After fixing that problem we get:
../../../WebCore/plugins/mac/PluginViewMac.cpp:
../../../WebCore/plugins/mac/PluginViewMac.cpp:72: error: ‘JSC::JSValue’ has not been declared
../../../WebCore/plugins/mac/PluginViewMac.cpp:79: error: ‘OSWindowRef’ does not name a type
make[1]: *** [tmp/PluginViewMac.o] Error 1

The JSC::JSValue error is caused by the in-progress migration through the new JSC::JSValuePtr rework.

The second is caused by the typedef being different between Qt 4.4.x (WindowPtr) and Qt 4.5 (OSWindowRef).
Comment 1 Erik L. Bunce 2009-03-01 13:26:00 PST
Created attachment 28146 [details]
Fixed the Qt 4.4 Mac build with netscape plugins enabled.
Comment 2 Erik L. Bunce 2009-03-01 13:28:24 PST
This was against svn r41344.
Comment 3 Erik L. Bunce 2009-03-26 18:31:35 PDT
Created attachment 28997 [details]
Fixed the Qt 4.4 Mac build with netscape plugins enabled.

WebCore/platform/mac/FoundationExtras.h was fixed by svn r41939.

Fixes the remaining Qt 4.4 issue.
Fixes the general compilation issue caused by the JSC::JSValuePtr transition.
Comment 4 Simon Hausmann 2009-03-27 05:47:30 PDT
Comment on attachment 28997 [details]
Fixed the Qt 4.4 Mac build with netscape plugins enabled.

Thanks
Comment 5 Simon Hausmann 2009-03-27 05:47:43 PDT
Landed in r42033