Bug 153881 - WebKit for iOS Simulator fails to build with public iOS SDK
Summary: WebKit for iOS Simulator fails to build with public iOS SDK
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad iOS 9.3
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
: 153620 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-04 11:52 PST by Daniel Bates
Modified: 2016-02-13 11:01 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.57 KB, patch)
2016-02-04 11:59 PST, Daniel Bates
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***