Linker errors while using libskia.a built by CEF

73 views
Skip to first unread message

Kiara Patani

unread,
May 11, 2023, 11:43:51 AM5/11/23
to skia-discuss
Hi team,

I am trying to link skia built by CEF in its Release mode. CEF builds skia using following build.gn file :- (https://source.chromium.org/chromium/chromium/src/+/main:skia/BUILD.gn)

I want all the source files to be linked with my libskia.a but unfortunately majority of core classes of Skia are missing in it . It would be great if anyone has solution for these linker  errors :-  (there were multiple libraries missing but I am just giving some basic linker error info to debug further )


ld.lld: error: undefined symbol: FT_Get_Color_Glyph_Paint
>>> referenced by SkFontHost_FreeType_common.cpp:1424 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1424)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_start_glyph(SkCanvas*, SkSpan<unsigned int> const&, unsigned int, FT_FaceRec_*, unsigned short, FT_Color_Root_Transform_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))
>>> referenced by SkFontHost_FreeType_common.cpp:1558 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1558)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_start_glyph_bounds(SkMatrix*, SkRect*, FT_FaceRec_*, unsigned short, FT_Color_Root_Transform_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))
>>> referenced by SkFontHost_FreeType.cpp:1219 (../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:1219)
>>>               thinlto-cache/llvmcache-263B7701E6508071B48DFA7EFD7BEDD8F92F1B16:(SkScalerContext_FreeType::generateMetrics(SkGlyph*, SkArenaAlloc*))

ld.lld: error: undefined symbol: FT_Get_Transform
>>> referenced by SkFontHost_FreeType_common.cpp:1388 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1388)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_start_glyph(SkCanvas*, SkSpan<unsigned int> const&, unsigned int, FT_FaceRec_*, unsigned short, FT_Color_Root_Transform_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))
>>> did you mean: FT_Set_Transform
>>> defined in: /usr/lib/x86_64-linux-gnu/libfreetype.so

ld.lld: error: undefined symbol: FT_Get_Color_Glyph_ClipBox
>>> referenced by SkFontHost_FreeType_common.cpp:1393 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1393)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_start_glyph(SkCanvas*, SkSpan<unsigned int> const&, unsigned int, FT_FaceRec_*, unsigned short, FT_Color_Root_Transform_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))
>>> referenced by SkFontHost_FreeType.cpp:1226 (../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:1226)
>>>               thinlto-cache/llvmcache-263B7701E6508071B48DFA7EFD7BEDD8F92F1B16:(SkScalerContext_FreeType::generateMetrics(SkGlyph*, SkArenaAlloc*))

ld.lld: error: undefined symbol: FT_Get_Color_Glyph_Layer
>>> referenced by SkFontHost_FreeType_common.cpp:1606 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1606)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:(SkScalerContext_FreeType_Base::drawCOLRv0Glyph(FT_FaceRec_*, SkGlyph const&, unsigned int, SkSpan<unsigned int>, SkCanvas*))
>>> referenced by SkFontHost_FreeType_common.cpp:1606 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1606)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:(SkScalerContext_FreeType_Base::drawCOLRv0Glyph(FT_FaceRec_*, SkGlyph const&, unsigned int, SkSpan<unsigned int>, SkCanvas*))
>>> referenced by SkFontHost_FreeType.cpp:1265 (../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:1265)
>>>               thinlto-cache/llvmcache-263B7701E6508071B48DFA7EFD7BEDD8F92F1B16:(SkScalerContext_FreeType::generateMetrics(SkGlyph*, SkArenaAlloc*))
>>> referenced 1 more times

ld.lld: error: undefined symbol: FT_Get_Paint
>>> referenced by SkFontHost_FreeType_common.cpp:1260 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1260)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_traverse_paint(SkCanvas*, SkSpan<unsigned int> const&, unsigned int, FT_FaceRec_*, FT_Opaque_Paint_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))
>>> referenced by SkFontHost_FreeType_common.cpp:1284 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1284)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_traverse_paint(SkCanvas*, SkSpan<unsigned int> const&, unsigned int, FT_FaceRec_*, FT_Opaque_Paint_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))
>>> referenced by SkFontHost_FreeType_common.cpp:1463 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1463)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_traverse_paint_bounds(SkMatrix*, SkRect*, FT_FaceRec_*, FT_Opaque_Paint_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))

ld.lld: error: undefined symbol: FT_Get_Paint_Layers
>>> referenced by SkFontHost_FreeType_common.cpp:1269 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1269)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_traverse_paint(SkCanvas*, SkSpan<unsigned int> const&, unsigned int, FT_FaceRec_*, FT_Opaque_Paint_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))
>>> referenced by SkFontHost_FreeType_common.cpp:1474 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:1474)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_traverse_paint_bounds(SkMatrix*, SkRect*, FT_FaceRec_*, FT_Opaque_Paint_, SkTHashSet<FT_Opaque_Paint_, (anonymous namespace)::OpaquePaintHasher>*))

ld.lld: error: undefined symbol: FT_Get_Colorline_Stops
>>> referenced by SkFontHost_FreeType_common.cpp:616 (../../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:616)
>>>               thinlto-cache/llvmcache-1F8E3850199D389906FB7FAB6E65D41D0E1A0940:((anonymous namespace)::colrv1_configure_skpaint(FT_FaceRec_*, SkSpan<unsigned int> const&, unsigned int, FT_COLR_Paint_ const&, SkPaint*)::$_0::operator()(FT_ColorStopIterator_ const&, std::Cr::vector<float, std::Cr::allocator<float>>&, std::Cr::vector<unsigned int, std::Cr::allocator<unsigned int>>&) const)

ld.lld: error: undefined symbol: FT_Palette_Data_Get
>>> referenced by SkFontHost_FreeType.cpp:330 (../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:330)
>>>               thinlto-cache/llvmcache-263B7701E6508071B48DFA7EFD7BEDD8F92F1B16:(SkTypeface_FreeType::FaceRec::setupPalette(SkFontData const&))

ld.lld: error: undefined symbol: FT_Palette_Select
>>> referenced by SkFontHost_FreeType.cpp:344 (../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:344)
>>>               thinlto-cache/llvmcache-263B7701E6508071B48DFA7EFD7BEDD8F92F1B16:(SkTypeface_FreeType::FaceRec::setupPalette(SkFontData const&))

ld.lld: error: undefined symbol: cr_png_set_longjmp_fn
>>> referenced by SkPngCodec.cpp:162 (../../third_party/skia/src/codec/SkPngCodec.cpp:162)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::decodeBounds())
>>> referenced by SkPngCodec.cpp:209 (../../third_party/skia/src/codec/SkPngCodec.cpp:209)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(SkPngCodec::processData())
>>> referenced by SkPngCodec.cpp:1031 (../../third_party/skia/src/codec/SkPngCodec.cpp:1031)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(SkPngCodec::initializeXforms(SkImageInfo const&, SkCodec::Options const&))
>>> referenced 8 more times

ld.lld: error: undefined symbol: cr_png_set_progressive_read_fn
>>> referenced by SkPngCodec.cpp:166 (../../third_party/skia/src/codec/SkPngCodec.cpp:166)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::decodeBounds())
>>> referenced by SkPngCodec.cpp:542 (../../third_party/skia/src/codec/SkPngCodec.cpp:542)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(SkPngNormalDecoder::decodeAllRows(void*, unsigned long, int*))
>>> referenced by SkPngCodec.cpp:570 (../../third_party/skia/src/codec/SkPngCodec.cpp:570)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(SkPngNormalDecoder::setRange(int, int, void*, unsigned long))
>>> referenced 2 more times

ld.lld: error: undefined symbol: cr_png_process_data
>>> referenced by SkPngCodec.cpp:180 (../../third_party/skia/src/codec/SkPngCodec.cpp:180)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::decodeBounds())
>>> referenced by SkPngCodec.cpp:198 (../../third_party/skia/src/codec/SkPngCodec.cpp:198)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::decodeBounds())
>>> referenced by SkPngCodec.cpp:152 (../../third_party/skia/src/codec/SkPngCodec.cpp:152)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::decodeBounds())
>>> referenced 3 more times

ld.lld: error: undefined symbol: cr_png_get_uint_32
>>> referenced by SkPngCodec.cpp:191 (../../third_party/skia/src/codec/SkPngCodec.cpp:191)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::decodeBounds())
>>> referenced by SkPngCodec.cpp:244 (../../third_party/skia/src/codec/SkPngCodec.cpp:244)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(SkPngCodec::processData())

ld.lld: error: undefined symbol: cr_png_get_IHDR
>>> referenced by SkPngCodec.cpp:853 (../../third_party/skia/src/codec/SkPngCodec.cpp:853)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::infoCallback(unsigned long))

ld.lld: error: undefined symbol: cr_png_set_strip_16
>>> referenced by SkPngCodec.cpp:860 (../../third_party/skia/src/codec/SkPngCodec.cpp:860)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::infoCallback(unsigned long))

ld.lld: error: undefined symbol: cr_png_set_interlace_handling
>>> referenced by SkPngCodec.cpp:926 (../../third_party/skia/src/codec/SkPngCodec.cpp:926)
>>>               thinlto-cache/llvmcache-7791D0CE9E6E11ED0DA39B618CC86F3451120BF8:(AutoCleanPng::infoCallback(unsigned long))



Thanks and Regards,
Kiara Patani




aisnote com

unread,
May 12, 2023, 12:56:25 AM5/12/23
to skia-d...@googlegroups.com
suppose you should link freetype.a and libpng also.

--
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/d3a52490-31cb-4dd8-91f8-53472c5ecdcbn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages