Yes. ARM Linux is not too different from ARM Android, which is where Skia is used the most.
I have built a Skia for ARM Linux with a cross-compiler before. The hard part was making sure we had all of the dependencies we needed.
What system are you targeting? If it is a full distribution like Raspbian, it should be easier.
This morning, I plugged in my Raspberry Pi 2B (with Raspbian OS) and did the following:
sudo apt-get install -y build-essential ninja-build libfontconfig-dev libglu1-mesa-dev
# make sure you have at least two gigs of storage
git clone 'https://chromium.googlesdu -shource.com/chromium/tools/depot_tools.git'
export PATH="${PWD}/depot_tools:${PATH}"
git clone 'https://skia.googlesource.com/skia'
cd skia
GYP_GENERATORS=ninja GYP_DEFINES="skia_arch_type=arm" bin/sync-and-gyp
/usr/bin/ninja -C out/Debug dm
# go get some coffee then some lunch.
out/Debug/dm --gpu 0
I haven't got Ganesh to work yet.
--
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 post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
gn gen out/Static --args='is_official_build=true target_os="linux" target_cpu="arm" ar="/home/vagrant/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ar" cc="/home/vagrant/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++" cxx="/home/vagrant/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++"'
arm-linux-gnueabihf-g++: error: unrecognized command line option '-momit-leaf-frame-pointer'; did you mean '-fomit-frame-pointer'?
I'm taking the day off today, but I'll take a look at this tomorrow morning.
--
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
FAILED: obj/src/ports/fontmgr_android.SkFontMgr_android.o c++ -MMD -MF obj/src/ports/fontmgr_android.SkFontMgr_android.o.d -DNDEBUG -DSK_SAMPLES_FOR_X -DSK_GAMMA_APPLY_TO_A8 -DSK_INTERNAL -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSKIA_IMPLEMENTATION=1 -DXML_STATIC -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/gpu -I../../include/gpu/gl -I../../include/images -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/xml -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/effects/gradients -I../../src/fonts -I../../src/gpu -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../third_party/etc1 -I../../third_party/gif -I../../third_party/ktx -I../../third_party/externals/expat/lib -I/usr/include/freetype2 -fstrict-aliasing -fPIC -fvisibility=hidden -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -O3 -momit-leaf-frame-pointer -std=c++11 -fno-threadsafe-statics -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Wnon-virtual-dtor -c ../../src/ports/SkFontMgr_android.cpp -o obj/src/ports/fontmgr_android.SkFontMgr_android.oIn file included from ../../src/ports/SkFontMgr_android.cpp:13:0:../../src/ports/SkFontHost_FreeType_common.h:20:22: fatal error: ft2build.h: No such file or directory #include <ft2build.h> ^compilation terminated.[43/1162] compile ../../src/ports/SkFontConfigInterface_direct_factory.cppFAILED: obj/src/ports/fontmgr_fontconfig.SkFontConfigInterface_direct_factory.o c++ -MMD -MF obj/src/ports/fontmgr_fontconfig.SkFontConfigInterface_direct_factory.o.d -DNDEBUG -DSK_SAMPLES_FOR_X -DSK_GAMMA_APPLY_TO_A8 -DSK_INTERNAL -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 -DSKIA_IMPLEMENTATION=1 -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/gpu -I../../include/gpu/gl -I../../include/images -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/xml -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/effects/gradients -I../../src/fonts -I../../src/gpu -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../third_party/etc1 -I../../third_party/gif -I../../third_party/ktx -I/usr/include/freetype2 -fstrict-aliasing -fPIC -fvisibility=hidden -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -O3 -momit-leaf-frame-pointer -std=c++11 -fno-threadsafe-statics -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Wnon-virtual-dtor -c ../../src/ports/SkFontConfigInterface_direct_factory.cpp -o obj/src/ports/fontmgr_fontconfig.SkFontConfigInterface_direct_factory.oIn file included from ../../src/ports/SkFontConfigInterface_direct_factory.cpp:8:0:../../src/ports/SkFontConfigInterface_direct.h:12:35: fatal error: fontconfig/fontconfig.h: No such file or directory #include <fontconfig/fontconfig.h> ^compilation terminated.To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
--
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 post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
--
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.
cd ~/src/skia
gn gen out/pi
cat <<-EOF > out/pi/args.gn
target_cpu = "arm"
cc = "clang"
cxx = "clang++"
skia_enable_gpu = false
skia_use_libjpeg_turbo = false
extra_cflags = [
"-target", "armv7a-linux",
"-mfloat-abi=hard",
"-mfpu=neon",
"--sysroot=${HOME}/PiRoot",
"-I${HOME}/PiRoot/usr/include/c++/4.9",
"-I${HOME}/PiRoot/usr/include/arm-linux-gnueabihf",
"-I${HOME}/PiRoot/usr/include/arm-linux-gnueabihf/c++/4.9",
]
EOF
ninja -C out/pi skia
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
Yeah, I probably was using the wrong headers. You can use `dpkg-query -L libfreetype-dev` to find out what directory they were installed in.
I'll take a look at getting dm and nanobench compiling.
terminate called after throwing an instance of 'std::bad_function_call' what(): bad_function_callGrGLContext* glContext = GrGLContext::Create(glInterface.get(), options);(gdb) p glInterface$7 = {fPtr = 0x7d8918}ERROR:LEX/PARSE-2 (vertex shader, line 11) Undefined identifier../../src/gpu/gl/builders/GrGLProgramBuilder.cpp:207: fatal error: "Error linking program"
#version 100
precision highp float;uniform highp vec4 urtAdjustment_Stage0;attribute highp vec2 inPosition;attribute mediump vec4 inColor;varying mediump vec4 vinColor_Stage0;void main() { vinColor_Stage0 = inColor; vec2 pos2 = inPosition; gl_Position = vec4(pos2.x * urtAdjustment_Stage0.x + urtAdjustment_Stage0.y, pos2.y * urtAdjustment_Stage0.z + urtAdjustment_Stage0.w, 11.00000000000002, -nan.0);}