Bug 153881

Summary: WebKit for iOS Simulator fails to build with public iOS SDK
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: alexcheng1982, lforschler, lpromero
Priority: P2    
Version: WebKit Nightly Build   
Hardware: iPhone / iPad   
OS: iOS 9.3   
Attachments:
Description Flags
Patch achristensen: review+

Description Daniel Bates 2016-02-04 11:52:32 PST
The build fails to link WebCore with the following errors:

duplicate symbol _kMGQAppleInternalInstallCapability in:
    /Users/dbates/Desktop/WebKit/WebKitBuild/WebCore.build/Debug-iphonesimulator/WebCore.build/Objects-normal/x86_64/Device.o
    /Users/dbates/Desktop/WebKit/WebKitBuild/WebCore.build/Debug-iphonesimulator/WebCore.build/Objects-normal/x86_64/NavigatorBase.o
duplicate symbol _kMGQiPadCapability in:
    /Users/dbates/Desktop/WebKit/WebKitBuild/WebCore.build/Debug-iphonesimulator/WebCore.build/Objects-normal/x86_64/Device.o
    /Users/dbates/Desktop/WebKit/WebKitBuild/WebCore.build/Debug-iphonesimulator/WebCore.build/Objects-normal/x86_64/NavigatorBase.o
...
duplicate symbol _kMGQMainScreenScale in:
    /Users/dbates/Desktop/WebKit/WebKitBuild/WebCore.build/Debug-iphonesimulator/WebCore.build/Objects-normal/x86_64/Device.o
    /Users/dbates/Desktop/WebKit/WebKitBuild/WebCore.build/Debug-iphonesimulator/WebCore.build/Objects-normal/x86_64/UserAgentIOS.o
ld: 24 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

And fails to compile WebKit2 because of redefinition/declaration-mismatch errors with the definitions/declarations in file Source/WebKit2/Platform/spi/ios/UIKitSPI.h.
Comment 1 Daniel Bates 2016-02-04 11:59:04 PST
Created attachment 270679 [details]
Patch
Comment 2 Alex Christensen 2016-02-04 13:15:09 PST
Comment on attachment 270679 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=270679&action=review

> Source/WebKit2/Platform/spi/ios/UIKitSPI.h:236
> +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90200

Shouldn't this have something to do with MAX if we are checking that it is < a number?

> Source/WebKit2/Platform/spi/ios/UIKitSPI.h:292
> +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90100

ditto
Comment 3 Daniel Bates 2016-02-04 13:50:45 PST
(In reply to comment #2)
> Comment on attachment 270679 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=270679&action=review
> 
> > Source/WebKit2/Platform/spi/ios/UIKitSPI.h:236
> > +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90200
> 
> Shouldn't this have something to do with MAX if we are checking that it is <
> a number?

Oops! We should use __IPHONE_OS_VERSION_MAX_ALLOWED, which is the SDK version.

> 
> > Source/WebKit2/Platform/spi/ios/UIKitSPI.h:292
> > +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90100
> 
> ditto

Will change to use __IPHONE_OS_VERSION_MAX_ALLOWED.
Comment 4 Daniel Bates 2016-02-04 13:52:52 PST
Committed r196148: <http://trac.webkit.org/changeset/196148>
Comment 5 Daniel Bates 2016-02-13 11:01:57 PST
*** Bug 153620 has been marked as a duplicate of this bug. ***