can't compile skia on mac for ios

465 views
Skip to first unread message

Moty Zaslavski

unread,
Sep 5, 2022, 3:14:27 PM9/5/22
to skia-discuss
Hi there,
I try to compile a skia app for ios from the Xcode.
Font related issues seemingly related to the linking stage are shown:

Undefined symbol: _CTFontGetUnderlineThickness


Undefined symbol: _CTFontGetUnderlinePosition


Undefined symbol: _CGAffineTransformConcat


Undefined symbol: _CGPathApply


Undefined symbol: _CTFontGetAdvancesForGlyphs


Undefined symbol: _CGRectApplyAffineTransform


Undefined symbol: _CTFontCreatePathForGlyph


Undefined symbol: _CGPathIsEmpty


Undefined symbol: _CGColorCreate


Undefined symbol: _CGContextSetAllowsFontSubpixelQuantization


Undefined symbol: _CGContextSetShouldSubpixelPositionFonts


Undefined symbol: _CGContextSetTextMatrix


Undefined symbol: _CGAffineTransformInvert


Undefined symbol: _CGBitmapContextCreate


Undefined symbol: _CGContextSetShouldAntialias


Undefined symbol: _CGContextSetTextDrawingMode


Undefined symbol: _CGContextSetGrayFillColor


Undefined symbol: _CTFontDrawGlyphs


Undefined symbol: _kCTFontVariationAxisMinimumValueKey


Undefined symbol: _kCTFontFormatAttribute


Undefined symbol: _CTFontCopyFullName


Undefined symbol: _CTFontCopyFamilyName


Undefined symbol: _CTFontCopyTable


Undefined symbol: _CTFontCopyVariationAxes


Undefined symbol: _CGFontCopyTableForTag


Undefined symbol: _kCTFontFamilyNameAttribute


Undefined symbol: _CTFontCopyGraphicsFont


Undefined symbol: _kCTFontVariationAxisIdentifierKey


Undefined symbol: _CTFontGetAscent


Undefined symbol: _CTFontGetGlyphsForCharacters


Undefined symbol: _CTFontGetGlyphCount


Undefined symbol: _CTFontGetCapHeight


Undefined symbol: _CTFontCopyAvailableTables


Undefined symbol: _CTFontCopyFontDescriptor


Undefined symbol: _CTFontCopyAttribute


Undefined symbol: _CTFontGetBoundingRectsForGlyphs


Undefined symbol: _CTFontCopyLocalizedName


Undefined symbol: _CTFontGetSymbolicTraits


Undefined symbol: _CTFontCopyCharacterSet


Undefined symbol: _CTFontGetXHeight


Undefined symbol: SkMetalDeviceToGrContext(id<MTLDevice>, id<MTLCommandQueue>)


Undefined symbol: _CGAffineTransformMakeScale


Undefined symbol: _CTFontCreateCopyWithSymbolicTraits


Undefined symbol: _kCTFontSymbolicTrait


Undefined symbol: _kCTFontWidthTrait


Undefined symbol: _kCTFontTraitsAttribute


Undefined symbol: _CGContextSetShouldSubpixelQuantizeFonts


Undefined symbol: _CTFontManagerCreateFontDescriptorFromData


Undefined symbol: _CTFontDescriptorCreateMatchingFontDescriptors


Undefined symbol: _kCTFontWeightTrait


Undefined symbol: _kCTFontSlantTrait


Undefined symbol: _CGContextSetShouldSmoothFonts


Undefined symbol: _CGFontGetUnitsPerEm


Undefined symbol: _CTFontGetLeading


Undefined symbol: _CTFontCopyPostScriptName


Undefined symbol: _CTFontGetSlantAngle


Undefined symbol: _CTFontDescriptorCreateWithAttributes


Undefined symbol: SkMtkViewToSurface(MTKView*, GrRecordingContext*)


Undefined symbol: _CTFontGetBoundingBox


Undefined symbol: _CTFontDescriptorCopyAttribute


Undefined symbol: _kCTFontVariationAxisDefaultValueKey


Undefined symbol: _kCTFontStyleNameAttribute


Undefined symbol: _kCTFontVariationAttribute


Undefined symbol: _CTFontGetDescent


Undefined symbol: _CTFontGetUnitsPerEm


Undefined symbol: _CTFontCreateCopyWithAttributes


Undefined symbol: SkMtkViewConfigForSkia(MTKView*)


Undefined symbol: _CGContextSetAllowsFontSubpixelPositioning


Undefined symbol: _CTFontCreateWithFontDescriptor


Undefined symbol: _CTFontCreateForString


Undefined symbol: _kCTFontFamilyNameKey


Undefined symbol: _CTFontCollectionCreateMatchingFontDescriptors


Undefined symbol: _CGContextSetFillColorWithColor


Undefined symbol: _CTFontCopyVariation


Undefined symbol: _kCTFontVariationAxisMaximumValueKey


Undefined symbol: _CTFontGetSize


Undefined symbol: _CGColorSpaceCreateDeviceRGB


Undefined symbol: _CTFontCollectionCreateFromAvailableFonts


Undefined symbol: GrContextRelease::operator()(GrDirectContext*)


Will be happy to any help))
Thanks 

Clark Kent

unread,
Sep 5, 2022, 4:39:19 PM9/5/22
to skia-discuss
you need to link to CoreFoundation, CoreGraphics, and CoreText

Moty Zaslavski

unread,
Sep 6, 2022, 3:52:58 AM9/6/22
to skia-discuss
Thank you very much!
Do you mean to add them here?)
Screen Shot 2022-09-06 at 10.50.11.png

Moty Zaslavski

unread,
Sep 6, 2022, 4:27:21 AM9/6/22
to skia-discuss
Hi again,
Thank you for your suggestion, adding of the said libraries has resolved the linking issues!
However the application get stuck with a black screen and the following messages are shown:


2022-09-06 11:01:42.417070+0300 skiaTest[11668:1071082] GrMtlCommandBuffer: WARNING: Creating MTLCommandBuffer while in background.

2022-09-06 11:01:42.423975+0300 skiaTest[11668:1071082] [SceneConfiguration] Info.plist configuration "(no name)" for UIWindowSceneSessionRoleApplication contained UISceneDelegateClassName key, but could not load class with name "SceneDelegate".

2022-09-06 11:01:42.425867+0300 skiaTest[11668:1071082] [Storyboard] Unknown class ViewController in Interface Builder file.

2022-09-06 11:01:42.426144+0300 skiaTest[11668:1071082] [WindowScene] There is no scene delegate set. A scene delegate class must be specified to use a main storyboard file.


Any suggestions?)
Thanks...

Clark Kent

unread,
Sep 6, 2022, 4:35:13 AM9/6/22
to skia-discuss
not sure about that

Moty Zaslavski

unread,
Sep 6, 2022, 7:45:23 PM9/6/22
to skia-discuss
Hi again)
First and foremost it does work! Thank you!
However, I've got very strange issue:
first time when I run on the IOS device everything goes smoothly, second time and each consecutive time, the Xcode gets stuck 
I keep receiving the following message:
Screen Shot 2022-09-07 at 2.34.19.png

So, I changed the scheme to catch the issue as follows:


Screen Shot 2022-09-07 at 2.35.28.png

So I keep receiving the following messages:

==9596==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x00010581a100 at pc 0x0001004292e8 bp 0x00016f9dbc50 sp 0x00016f9dbc48

WRITE of size 8 at 0x00010581a100 thread T0

    #0 0x1004292e4 in sk_cfp<void const*>::sk_cfp()+0x88 (/private/var/containers/Bundle/Application/CA9EA294-DC30-4795-835B-39B73D78D03A/BasicTexturing.app/BasicTexturing:arm64+0x1000092e4)

    #1 0x100429248 in sk_cfp<void const*>::sk_cfp()+0x50 (/private/var/containers/Bundle/Application/CA9EA294-DC30-4795-835B-39B73D78D03A/BasicTexturing.app/BasicTexturing:arm64+0x100009248)

    #2 0x1004291e4 in GrMtlTextureInfo::GrMtlTextureInfo()+0x50

Screen Shot 2022-09-07 at 2.43.12.png

Any help will be greatly appreciated!

Thanks


Jim Van Verth

unread,
Sep 7, 2022, 9:49:19 AM9/7/22
to skia-d...@googlegroups.com
Hard to say without knowing what "AAPLRenderer initWithMetalKitView:" or "skiarenderer initWithDevice:queue:" are doing.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/4bad1bf0-7942-45b9-81c6-e2e86df01f7bn%40googlegroups.com.


--

Jim Van Verth | Software Engineer | jvan...@google.com | 919-210-7664

Trancy chu

unread,
Mar 10, 2023, 8:17:21 AM3/10/23
to skia-discuss

Hi, I had linked to CoreFoundation, CoreGraphics, and CoreText, but this error exist yet. error as follow:

Undefined symbols for architecture arm64:

  "GrContextRelease::operator()(GrDirectContext*)", referenced from:

      std::__1::unique_ptr<GrDirectContext, GrContextRelease>::reset(GrDirectContext*) in ViewController.o


Any help is greatly appreciated!

Reply all
Reply to author
Forward
0 new messages