Bug 173939 - REGRESSION (r218616, r225179): Cannot build WebCore for macOS 10.12 with macOS 10.13 SDK (missing _CTFontCreatePhysicalFontForCharactersWithLanguage)
Summary: REGRESSION (r218616, r225179): Cannot build WebCore for macOS 10.12 with macO...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2017-06-28 14:43 PDT by Daniel Bates
Modified: 2018-01-23 09:58 PST (History)
9 users (show)

See Also:


Attachments
Patch (3.23 KB, patch)
2017-06-28 14:43 PDT, Daniel Bates
mitz: review-
Details | Formatted Diff | Diff
Patch (4.13 KB, patch)
2017-06-28 16:23 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (5.06 KB, patch)
2017-06-28 17:06 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews114 for mac-elcapitan (2.21 MB, application/zip)
2017-06-28 18:18 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews102 for mac-elcapitan (1.82 MB, application/zip)
2017-06-28 20:01 PDT, Build Bot
no flags Details
Patch (4.67 KB, patch)
2017-07-05 10:51 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews115 for mac-elcapitan (2.29 MB, application/zip)
2017-07-05 12:19 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-elcapitan (1.81 MB, application/zip)
2017-07-05 13:41 PDT, Build Bot
no flags Details
Patch (3.32 KB, patch)
2017-07-05 17:14 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (3.47 KB, patch)
2017-07-05 21:13 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (4.06 KB, patch)
2017-07-07 16:04 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (5.18 KB, patch)
2017-07-07 16:25 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2017-06-28 14:43:04 PDT
The SPI CTFontCreatePhysicalFontForCharactersWithLanguage(), used in the patch for bug #173300, was removed from the macOS 10.13 and iOS 11 SDKs. When targeting macOS 10.12/iOS 10 we should not compile code that invokes CTFontCreatePhysicalFontForCharactersWithLanguage(). Otherwise, WebCore will fail to link as the symbol for CTFontCreatePhysicalFontForCharactersWithLanguage() does not exist in binaries included in the macOS 10.13 and iOS 11 SDKs.
Comment 1 Daniel Bates 2017-06-28 14:43:59 PDT
Created attachment 314057 [details]
Patch
Comment 2 mitz 2017-06-28 14:53:39 PDT
Comment on attachment 314057 [details]
Patch

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

It’s incorrect to have the code call a different function at runtime depending on what SDK was used at build time.

A correct fix for this bug would be to provide a declaration of the 10.12-era SPI, properly annotated for availability, when using the 10.13-era or later SDKs.

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1263
> +#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED <= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED <= 100000))

<= doesn’t make sense. Did you mean < 101300 and < 110000, respectively?

> Source/WebCore/platform/spi/cocoa/CoreTextSPI.h:132
> +#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED <= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED <= 100000)

Ditto.
Comment 3 mitz 2017-06-28 14:54:52 PDT
(In reply to mitz from comment #2)
> A correct fix for this bug would be to provide a declaration of the
> 10.12-era SPI, properly annotated for availability, when using the 10.13-era
> or later SDKs.

There are examples of this in AVKitSPI.h.
Comment 4 Daniel Bates 2017-06-28 14:56:05 PDT
Comment on attachment 314057 [details]
Patch

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

>> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1263
>> +#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED <= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED <= 100000))
> 
> <= doesn’t make sense. Did you mean < 101300 and < 110000, respectively?

Yes.

>> Source/WebCore/platform/spi/cocoa/CoreTextSPI.h:132
>> +#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED <= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED <= 100000)
> 
> Ditto.

Yes, I meant < 101300 and < 11000,
Comment 5 Daniel Bates 2017-06-28 16:23:52 PDT
Created attachment 314064 [details]
Patch
Comment 6 Build Bot 2017-06-28 16:26:18 PDT Comment hidden (obsolete)
Comment 7 Myles C. Maxfield 2017-06-28 16:32:16 PDT
We can also ask CoreText to put the symbol back.
Comment 8 mitz 2017-06-28 16:43:10 PDT
Comment on attachment 314064 [details]
Patch

I think the CoreTextSPI.h side of this patch is all that’s needed.
Comment 9 Daniel Bates 2017-06-28 17:00:21 PDT
(In reply to mitz from comment #8)
> Comment on attachment 314064 [details]
> Patch
> 
> I think the CoreTextSPI.h side of this patch is all that’s needed.

With only the CoreTextSPI.h change I get the following linker error:

[[
Undefined symbols for architecture x86_64:

  "_CTFontCreatePhysicalFontForCharactersWithLanguage", referenced from:

      WebCore::lookupFallbackFont(__CTFont const*, WebCore::FontSelectionValue, WTF::AtomicString const&, unsigned short const*, unsigned int) in FontCacheCoreText.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)
]]
Comment 10 Daniel Bates 2017-06-28 17:01:42 PDT
We likely need to take the approach as in Listing 3-3 in SDK Compatibility Guide: <https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-SW1>.
Comment 11 Daniel Bates 2017-06-28 17:06:46 PDT
Created attachment 314072 [details]
Patch
Comment 12 Build Bot 2017-06-28 17:07:41 PDT Comment hidden (obsolete)
Comment 13 Build Bot 2017-06-28 18:18:48 PDT Comment hidden (obsolete)
Comment 14 Build Bot 2017-06-28 18:18:50 PDT Comment hidden (obsolete)
Comment 15 mitz 2017-06-28 19:10:58 PDT
Comment on attachment 314072 [details]
Patch

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

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1260
> +#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000))

As a rule, we shouldn’t be using different functions at runtime based on what SDK was used at build time.

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1261
> +    if (&CTFontCreatePhysicalFontForCharactersWithLanguage != nullptr)

I’m not sure what this is supposed to do or under what circumstances this code would build successfully, then load successfully at runtime, but still need to do this check, but if there are such circumstances, then this is not a valid way to null-check a function pointer. See <wtf/darwin/WeakLinking.h>.
Comment 16 Build Bot 2017-06-28 20:01:55 PDT Comment hidden (obsolete)
Comment 17 Build Bot 2017-06-28 20:01:56 PDT Comment hidden (obsolete)
Comment 18 Daniel Bates 2017-06-28 21:13:05 PDT
(In reply to mitz from comment #15)
> Comment on attachment 314072 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=314072&action=review
> 
> > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1260
> > +#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000))
> 
> As a rule, we shouldn’t be using different functions at runtime based on
> what SDK was used at build time.
> 

How do you propose we fix this bug given comment #9?

> > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1261
> > +    if (&CTFontCreatePhysicalFontForCharactersWithLanguage != nullptr)
> 
> I’m not sure what this is supposed to do or under what circumstances this
> code would build successfully, then load successfully at runtime, but still
> need to do this check, but if there are such circumstances, then this is not
> a valid way to null-check a function pointer. See <wtf/darwin/WeakLinking.h>.

I was just mimicking the approach of Listing 3-3 in SDK Compatibility Guide: <https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-SW1> as well as respecting the note about explicit comparison to nullptr in section "Using Weakly Linked Methods, Functions, and Symbols" in the same guide <https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-SW4>. I take it that the advice in this guide is not applicable or out-of-date?
Comment 19 mitz 2017-06-28 21:17:18 PDT
(In reply to Daniel Bates from comment #18)
> (In reply to mitz from comment #15)
> > Comment on attachment 314072 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=314072&action=review
> > 
> > > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1260
> > > +#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000))
> > 
> > As a rule, we shouldn’t be using different functions at runtime based on
> > what SDK was used at build time.
> > 
> 
> How do you propose we fix this bug given comment #9?

I don’t have a proposal yet.

> > > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1261
> > > +    if (&CTFontCreatePhysicalFontForCharactersWithLanguage != nullptr)
> > 
> > I’m not sure what this is supposed to do or under what circumstances this
> > code would build successfully, then load successfully at runtime, but still
> > need to do this check, but if there are such circumstances, then this is not
> > a valid way to null-check a function pointer. See <wtf/darwin/WeakLinking.h>.
> 
> I was just mimicking the approach of Listing 3-3 in SDK Compatibility Guide:
> <https://developer.apple.com/library/content/documentation/DeveloperTools/
> Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-
> SW1> as well as respecting the note about explicit comparison to nullptr in
> section "Using Weakly Linked Methods, Functions, and Symbols" in the same
> guide
> <https://developer.apple.com/library/content/documentation/DeveloperTools/
> Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-
> SW4>. I take it that the advice in this guide is not applicable or
> out-of-date?

Correct, the advice may have been applicable to the developer tools available at the time the guide was published, but it is not applicable to the compilers that are currently in use.
Comment 20 mitz 2017-06-28 22:30:43 PDT
(In reply to mitz from comment #19)
> (In reply to Daniel Bates from comment #18)
> > (In reply to mitz from comment #15)
> > > Comment on attachment 314072 [details]
> > > Patch
> > > 
> > > View in context:
> > > https://bugs.webkit.org/attachment.cgi?id=314072&action=review
> > > 
> > > > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1260
> > > > +#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000))
> > > 
> > > As a rule, we shouldn’t be using different functions at runtime based on
> > > what SDK was used at build time.
> > > 
> > 
> > How do you propose we fix this bug given comment #9?
> 
> I don’t have a proposal yet.

One option is, iff building for macOS 10.12 with the macOS 10.13 SDK (when building WebKit for iOS, we don’t support targeting an older version than the SDK), to add -Wl,-U,_CTFontCreatePhysicalFontForCharactersWithLanguage to WebCore’s OTHER_LDFLAGS. I think that this is acceptable, because trunk WebCore builds targeting macOS 10.12 are not meant to be included in the dyld shared cache.

I believe that another option involves creating and using a .tbd file for Core Text that exports the missing symbols and reexports the real Core Text from the SDK. I’ve experimented with this technique in the past, but haven’t tried to apply it to this case.
Comment 21 Daniel Bates 2017-06-28 23:44:06 PDT
(In reply to Myles C. Maxfield from comment #7)
> We can also ask CoreText to put the symbol back.

I did not mean to ignore your comment. Your "SPIs are forever" (*) ;) solution would fix this bug. I do not know if such a request would be entertained (we could try) or set a good precedent.

(*) Does not need to be forever. At least one release.
Comment 22 Myles C. Maxfield 2017-06-29 09:45:28 PDT
Or we could soft link.

Whichever option you two come up with is fine with me.
Comment 23 Daniel Bates 2017-06-29 10:55:56 PDT
(In reply to mitz from comment #20)
> (In reply to mitz from comment #19)
> > (In reply to Daniel Bates from comment #18)
> > > (In reply to mitz from comment #15)
> > > > Comment on attachment 314072 [details]
> > > > Patch
> > > > 
> > > > View in context:
> > > > https://bugs.webkit.org/attachment.cgi?id=314072&action=review
> > > > 
> > > > > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1260
> > > > > +#if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000))
> > > > 
> > > > As a rule, we shouldn’t be using different functions at runtime based on
> > > > what SDK was used at build time.
> > > > 
> > > 
> > > How do you propose we fix this bug given comment #9?
> > 
> > I don’t have a proposal yet.
> 
> One option is, iff building for macOS 10.12 with the macOS 10.13 SDK (when
> building WebKit for iOS, we don’t support targeting an older version than
> the SDK), to add -Wl,-U,_CTFontCreatePhysicalFontForCharactersWithLanguage
> to WebCore’s OTHER_LDFLAGS. I think that this is acceptable, because trunk
> WebCore builds targeting macOS 10.12 are not meant to be included in the
> dyld shared cache.
> 

Can you please elaborate on your last sentence. Does your last sentence imply that if we add to OTHER_LDFLAGS we will not crash with a dyld error when trying to invoke CTFontCreatePhysicalFontForCharactersWithLanguage() on macOS 10.13 using a WebCore built targeting macOS 10.12?

> I believe that another option involves creating and using a .tbd file for
> Core Text that exports the missing symbols and reexports the real Core Text
> from the SDK. I’ve experimented with this technique in the past, but haven’t
> tried to apply it to this case.

Would this technique prevent the crash mentioned above?
Comment 24 mitz 2017-06-29 10:58:54 PDT
(In reply to Daniel Bates from comment #23)
> Can you please elaborate on your last sentence. Does your last sentence
> imply that if we add to OTHER_LDFLAGS we will not crash with a dyld error
> when trying to invoke CTFontCreatePhysicalFontForCharactersWithLanguage() on
> macOS 10.13 using a WebCore built targeting macOS 10.12?

No. Using a WebKit build targeting one macOS version on a different macOS version is not supported.

> > I believe that another option involves creating and using a .tbd file for
> > Core Text that exports the missing symbols and reexports the real Core Text
> > from the SDK. I’ve experimented with this technique in the past, but haven’t
> > tried to apply it to this case.
> 
> Would this technique prevent the crash mentioned above?

No.
Comment 25 Myles C. Maxfield 2017-07-03 10:51:44 PDT
Another option is we could ask CoreText to put a #define in their headers which represents the presence of this symbol. Then we could test for it.
Comment 26 Daniel Bates 2017-07-05 10:51:48 PDT
Created attachment 314618 [details]
Patch

Use soft-link approach suggested by Myles Maxfield.
Comment 27 mitz 2017-07-05 10:53:52 PDT
(In reply to Daniel Bates from comment #26)
> Created attachment 314618 [details]
> Patch
> 
> Use soft-link approach suggested by Myles Maxfield.

What’s the advantage of this approach over letting the linker resolve this without writing additional code?
Comment 28 Build Bot 2017-07-05 10:54:22 PDT Comment hidden (obsolete)
Comment 29 Build Bot 2017-07-05 12:19:49 PDT Comment hidden (obsolete)
Comment 30 Build Bot 2017-07-05 12:19:50 PDT Comment hidden (obsolete)
Comment 31 Build Bot 2017-07-05 13:41:38 PDT Comment hidden (obsolete)
Comment 32 Build Bot 2017-07-05 13:41:39 PDT Comment hidden (obsolete)
Comment 33 Myles C. Maxfield 2017-07-05 17:14:12 PDT
Created attachment 314671 [details]
Patch
Comment 34 Myles C. Maxfield 2017-07-05 21:13:21 PDT
Created attachment 314693 [details]
Patch
Comment 35 mitz 2017-07-05 21:19:36 PDT
Comment on attachment 314693 [details]
Patch

What’s the advantage of this approach over letting the linker resolve this without writing additional code?
Comment 36 Daniel Bates 2017-07-07 16:04:09 PDT
Created attachment 314888 [details]
Patch
Comment 37 Build Bot 2017-07-07 16:06:06 PDT Comment hidden (obsolete)
Comment 38 Myles C. Maxfield 2017-07-07 16:14:04 PDT
I'll let Mitz review this.
Comment 39 Daniel Bates 2017-07-07 16:25:56 PDT
Created attachment 314896 [details]
Patch
Comment 40 Build Bot 2017-07-07 16:26:50 PDT Comment hidden (obsolete)
Comment 41 Daniel Bates 2017-07-10 09:21:45 PDT
Comment on attachment 314896 [details]
Patch

Clearing flags on attachment: 314896

Committed r219294: <http://trac.webkit.org/changeset/219294>
Comment 42 Daniel Bates 2017-07-10 09:21:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 43 Basuke Suzuki 2017-12-11 13:44:12 PST
Ld /Users/ysuzuki/neko/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore normal x86_64
    cd /Users/ysuzuki/neko/Source/WebCore
    export MACOSX_DEPLOYMENT_TARGET=10.12
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/ysuzuki/neko/WebKitBuild/Release -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks -F/Users/ysuzuki/neko/WebKitBuild/Release -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/PrivateFrameworks -filelist /Users/ysuzuki/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/WebCore.LinkFileList -unexported_symbols_list Configurations/WebCore.unexp -install_name /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore -mmacosx-version-min=10.12 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ysuzuki/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/WebCore_lto.o -stdlib=libc++ -fobjc-link-runtime -Wl,-not_for_dyld_shared_cache -lsqlite3 -lobjc -lANGLE -framework CoreAudio -framework Metal -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load /Users/ysuzuki/neko/WebKitBuild/Release/libPAL.a -sub_library libobjc -umbrella WebKit -framework ApplicationServices -framework AudioUnit -framework Carbon -framework Cocoa -framework DataDetectorsCore -framework IOSurface -framework OpenGL -framework SystemConfiguration -framework VideoToolbox -framework CoreMedia -weak-lwebrtc -framework Accelerate -framework AudioToolbox -framework IOKit -framework JavaScriptCore -licucore -lobjc /Users/ysuzuki/neko/WebKitBuild/Release/libPAL.a -lxml2 -lz -framework QuartzCore -framework Security -single_module -compatibility_version 1 -current_version 605.1.17 -Xlinker -dependency_info -Xlinker /Users/ysuzuki/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/WebCore_dependency_info.dat -o /Users/ysuzuki/neko/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore
Undefined symbols for architecture x86_64:
  "_CTFontCreatePhysicalFontForCharactersWithLanguage", referenced from:
      WebCore::FontCache::systemFallbackForCharacters(WebCore::FontDescription const&, WebCore::Font const*, bool, unsigned short const*, unsigned int) in UnifiedSource354.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **
Comment 44 Basuke Suzuki 2017-12-11 13:44:46 PST
It seems broken again on Sierra.
Comment 45 Daniel Bates 2017-12-11 14:57:02 PST
(In reply to Basuke Suzuki from comment #43)
> Ld
> /Users/ysuzuki/neko/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore
> normal x86_64
>     cd /Users/ysuzuki/neko/Source/WebCore
>     export MACOSX_DEPLOYMENT_TARGET=10.12
>    
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.
> xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
> Developer/SDKs/MacOSX10.13.sdk -L/Users/ysuzuki/neko/WebKitBuild/Release
> -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
> Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/WebKit.framework/
> Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks
> -F/Users/ysuzuki/neko/WebKitBuild/Release
> -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
> Developer/SDKs/MacOSX10.13.sdk/System/Library/PrivateFrameworks -filelist
> /Users/ysuzuki/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-
> normal/x86_64/WebCore.LinkFileList -unexported_symbols_list
> Configurations/WebCore.unexp -install_name
> /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.
> framework/Versions/A/WebCore -mmacosx-version-min=10.12 -dead_strip -Xlinker
> -object_path_lto -Xlinker
> /Users/ysuzuki/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-
> normal/x86_64/WebCore_lto.o -stdlib=libc++ -fobjc-link-runtime
> -Wl,-not_for_dyld_shared_cache -lsqlite3 -lobjc -lANGLE -framework CoreAudio
> -framework Metal -allowable_client WebCoreTestSupport -allowable_client
> WebKitLegacy -force_load /Users/ysuzuki/neko/WebKitBuild/Release/libPAL.a
> -sub_library libobjc -umbrella WebKit -framework ApplicationServices
> -framework AudioUnit -framework Carbon -framework Cocoa -framework
> DataDetectorsCore -framework IOSurface -framework OpenGL -framework
> SystemConfiguration -framework VideoToolbox -framework CoreMedia
> -weak-lwebrtc -framework Accelerate -framework AudioToolbox -framework IOKit
> -framework JavaScriptCore -licucore -lobjc
> /Users/ysuzuki/neko/WebKitBuild/Release/libPAL.a -lxml2 -lz -framework
> QuartzCore -framework Security -single_module -compatibility_version 1
> -current_version 605.1.17 -Xlinker -dependency_info -Xlinker
> /Users/ysuzuki/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-
> normal/x86_64/WebCore_dependency_info.dat -o
> /Users/ysuzuki/neko/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore
> Undefined symbols for architecture x86_64:
>   "_CTFontCreatePhysicalFontForCharactersWithLanguage", referenced from:
>      
> WebCore::FontCache::systemFallbackForCharacters(WebCore::FontDescription
> const&, WebCore::Font const*, bool, unsigned short const*, unsigned int) in
> UnifiedSource354.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> 
> ** BUILD FAILED **

(In reply to Basuke Suzuki from comment #44)
> It seems broken again on Sierra.

This build failure was caused by changeset r225179, <https://trac.webkit.org/changeset/225179/> (bug #180011). Committed fix in <https://trac.webkit.org/changeset/225757/>.
Comment 46 Radar WebKit Bug Importer 2017-12-11 14:58:27 PST
<rdar://problem/35979297>
Comment 47 Ross Kirsling 2018-01-22 17:20:25 PST
Broken yet again on Sierra?

Ld /Users/RKirsling/Documents/GitHub/neko/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore normal x86_64
    cd /Users/RKirsling/Documents/GitHub/neko/Source/WebCore
    export MACOSX_DEPLOYMENT_TARGET=10.12
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/RKirsling/Documents/GitHub/neko/WebKitBuild/Release -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks -F/Users/RKirsling/Documents/GitHub/neko/WebKitBuild/Release -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/PrivateFrameworks -filelist /Users/RKirsling/Documents/GitHub/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/WebCore.LinkFileList -unexported_symbols_list Configurations/WebCore.unexp -install_name /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore -mmacosx-version-min=10.12 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/RKirsling/Documents/GitHub/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/WebCore_lto.o -stdlib=libc++ -fobjc-link-runtime -Wl,-not_for_dyld_shared_cache -lsqlite3 -lobjc -lANGLE -framework CoreAudio -framework Metal -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load /Users/RKirsling/Documents/GitHub/neko/WebKitBuild/Release/libPAL.a -sub_library libobjc -umbrella WebKit -framework ApplicationServices -framework AudioUnit -framework Carbon -framework Cocoa -framework DataDetectorsCore -framework IOSurface -framework OpenGL -framework SystemConfiguration -framework VideoToolbox -framework CoreMedia -weak-lwebrtc -framework Accelerate -framework AudioToolbox -framework IOKit -framework JavaScriptCore -licucore -lobjc /Users/RKirsling/Documents/GitHub/neko/WebKitBuild/Release/libPAL.a -lxml2 -lz -framework QuartzCore -framework Security -single_module -compatibility_version 1 -current_version 606.1.3 -Xlinker -dependency_info -Xlinker /Users/RKirsling/Documents/GitHub/neko/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/WebCore_dependency_info.dat -o /Users/RKirsling/Documents/GitHub/neko/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore
Undefined symbols for architecture x86_64:
  "_CTFontCreatePhysicalFontForCharactersWithLanguage", referenced from:
      WebCore::FontCache::systemFallbackForCharacters(WebCore::FontDescription const&, WebCore::Font const*, bool, unsigned short const*, unsigned int) in UnifiedSource361.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 48 mitz 2018-01-22 17:28:41 PST
(In reply to Ross Kirsling from comment #47)
> Broken yet again on Sierra?

Sorry, looks like <https://trac.webkit.org/r227156> broke it. It should be easy to fix.
Comment 49 mitz 2018-01-22 17:37:36 PST
Should be fix with <https://trac.webkit.org/r227376>.
Comment 50 Alexey Proskuryakov 2018-01-22 23:11:52 PST
Do we even still care to support cross-compiling in this manner? Is there a need?
Comment 51 Ross Kirsling 2018-01-23 08:40:07 PST
The intention isn't to cross-compile but simply to have the build succeed on Sierra.

Unfortunately, our IT department continues to disallow upgrading to High Sierra for the time being.
Comment 52 Alexey Proskuryakov 2018-01-23 09:58:36 PST
Indeed, it's valid to expect that WebKit builds with the latest shipping Xcode, so I guess we need to keep caring. But practically speaking, it may be easiest to downgrade to Xcode 8, as that includes a matching SDK for macOS Sierra.