ungast / skiakit Goto Github PK
View Code? Open in Web Editor NEWSwift Bindings to the Skia 2D graphics Library
License: Other
Swift Bindings to the Skia 2D graphics Library
License: Other
Hi @UnGast!
Thanks for wrapping Skia into an easy to use package.
I'm trying to build it using for simulator or iOS device:
Hello. After downloading the pre-built library all linkage errors went away except one:
error: link command failed with exit code 1 (use -v to see invocation)
/home/rd/src/self/timeline/.build/x86_64-unknown-linux-gnu/debug/SkiaKit.build/SkiaCApiVersion.swift.o:SkiaCApiVersion.swift.o:function $s7SkiaKit0A11CApiVersionC09getBinaryD0s5Int32VyFZ: error: undefined reference to 'sk_get_binary_c_api_version'
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
If I comment it, it does build and run successfully.
Your SkiaKit library does not seem to include an arm64 version of the skia library, so I attempted to build it on my own.
Looks like it doesn't work on my machine, when trying to compile (on arm64). To me, it doesn't seem like that the error shown below has anything to do with the arm architecture, but rather comes from a misconfigured build. Could you maybe give some more information on how you managed to build your skia binary?
This is how I attempted to build the skia library:
Running this:
bin/gn gen out/release \
--args='is_debug=false
is_official_build=true
skia_use_system_expat=false
skia_use_system_icu=false
skia_use_system_libjpeg_turbo=false
skia_use_system_libpng=false
skia_use_system_libwebp=false
skia_use_system_zlib=false
skia_use_sfntly=false
skia_use_freetype=true
skia_use_harfbuzz=false
skia_pdf_subset_harfbuzz=false
skia_use_system_freetype2=false
skia_use_system_harfbuzz=false
target_cpu="arm64"
extra_cflags=["-DHAVE_GETRANDOM", "-DHAVE_XLOCALE_H"]
extra_cflags_cc=["-frtti"]'
already gives me the following warning message:
WARNING at the command-line "--args":14:38: Build argument has no effect.
skia_use_system_harfbuzz=false
^----
The variable "skia_use_system_harfbuzz" was set as a build argument
but never appeared in a declare_args() block in any buildfile.
To view all possible args, run "gn args --list <out_dir>"
The build continued as if that argument was unspecified.
Done. Made 56 targets from 39 files in 817ms
Trying to compile everything with ninja -C out/release
gives the following output:
ninja: Entering directory `out/release'
[1/1184] compile ../../third_party/externals/harfbuzz/src/hb-subset-cff1.cc
FAILED: obj/third_party/externals/harfbuzz/src/libHarfBuzzSharp.hb-subset-cff1.o
c++ -MD -MF obj/third_party/externals/harfbuzz/src/libHarfBuzzSharp.hb-subset-cff1.o.d -DHAVE_FT_GET_VAR_BLEND_COORDINATES -DHAVE_FT_SET_VAR_BLEND_COORDINATES -DHAVE_GETPAGESIZE -DHAVE_INTEL_ATOMIC_PRIMITIVES -DHAVE_MMAP -DHAVE_MPROTECT -DHAVE_NEWLOCALE -DHAVE_PTHREAD -DHAVE_STRTOD_L -DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H -DNDEBUG -fno-threadsafe-statics -fPIC -fstrict-aliasing -fvisibility=hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -O3 -fdata-sections -ffunction-sections -Wno-unused-parameter -DHAVE_GETRANDOM -DHAVE_XLOCALE_H -std=c++17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -frtti -c ../../third_party/externals/harfbuzz/src/hb-subset-cff1.cc -o obj/third_party/externals/harfbuzz/src/libHarfBuzzSharp.hb-subset-cff1.o
../../third_party/externals/harfbuzz/src/hb-subset-cff1.cc:472:33: error: variable 'supp_size' set but not used [-Werror,-Wunused-but-set-variable]
unsigned int size0, size1, supp_size;
^
1 error generated.
[10/1184] compile ../../src/gpu/GrLegacyDirectContext.cpp
ninja: build stopped: subcommand failed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.