[32/1158] compile ../../src/ports/SkFontMgr_android_parser.cpp
FAILED: obj/src/ports/fontmgr_android.SkFontMgr_android_parser.o
/Users/pavdey/Library/Android/sdk/ndk/22.0.7026061/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang++ -MD -MF obj/src/ports/fontmgr_android.SkFontMgr_android_parser.o.d -DNDEBUG -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_EXPONENT=1.4 -DSK_GAMMA_CONTRAST=0.0 -DSKIA_IMPLEMENTATION=1 -I../.. -Wno-attributes -fstrict-aliasing -fPIC -fvisibility=hidden --sysroot=/Users/pavdey/Library/Android/sdk/ndk/22.0.7026061/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -O3 -fdata-sections -ffunction-sections -Wno-sign-conversion -Wno-unused-parameter -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -c ../../src/ports/SkFontMgr_android_parser.cpp -o obj/src/ports/fontmgr_android.SkFontMgr_android_parser.o
../../src/ports/SkFontMgr_android_parser.cpp:21:10: fatal error: 'expat.h' file not found
#include <expat.h>
^~~~~~~~~
1 error generated.
When I tried to remove this error by setting font manager libraries to false, I started getting other errors. I could not actually remove all font related libraries because I need to facilitate text effects in my application.
But if I execute >> bin/gn gen out/Release19 --args='is_official_build=false is_component_build=true is_debug=false ndk="/Users/myName/Library/Android/sdk/ndk/22.0.7026061" target_cpu="arm64" ' I don't see any build error. After this I enable/disable different third party library to reduce skia lib size. lib size is now ~30 mb but I want to make it <10mb. I think this will be more effective and appropriate when is_official_build=true.
Is there anything I can do to fix this? Also, any other suggestion to reduce library size will be extremely helpful.
Thanks
Pavel