Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Missing header files when trying to build Skia

904 views
Skip to first unread message

Fudge

unread,
Oct 8, 2019, 10:42:23โ€ฏAM10/8/19
to skia-discuss

Mike Klein

unread,
Oct 8, 2019, 10:47:44โ€ฏAM10/8/19
to skia-discuss
If you don't have libpng (png.h) or zlib (zlib.h) you'll want to set skia_use_libpng = false and skia_use_zlib = false in out/Static/args.gn by running `gn args out/Static`.ย  You should probably also keep in mind you're doing a developer, debug build.

Most users of Skia should setย is_official_build=true, and most developers should leave it to itsย falseย default.

This mode configures Skia in a way thatโ€™s suitable to ship: an optimized build with no debug symbols, dynamically linked against its third-party dependencies using the ordinary library search path.

In contrast, the developer-oriented default is an unoptimized build with full debug symbols and all third-party dependencies built from source and embedded into libskia. This is how we do all our manual and automated testing.

Skia offers several features that make use of third-party libraries, like libpng, libwebp, or libjpeg-turbo to decode images, or ICU and sftnly to subset fonts. All these third-party dependencies are optional and can be controlled by a GN argument that looks something likeย skia_use_fooย for appropriateย foo.

Ifย skia_use_fooย is enabled, enablingย skia_use_system_fooย will build and link Skia against the headers and libaries found on the system paths.ย is_official_build=trueย enables allย skia_use_system_fooย by default. You can useย extra_cflagsย andย extra_ldflagsย to add include or library paths if needed.



On Tue, Oct 8, 2019 at 9:42 AM Fudge <natandes...@gmail.com> wrote:
--
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/fd8caf49-141e-4560-8df1-d3df2f0d7321%40googlegroups.com.

Fudge

unread,
Oct 8, 2019, 10:57:01โ€ฏAM10/8/19
to skia-discuss
Oh! by "Most users of Skia should setย is_official_build=true," I had assumed I was a user and should set the property to true.ย 
It seems to be building properly now. Thank you so much!

ื‘ืชืืจื™ืš ื™ื•ื ืฉืœื™ืฉื™, 8 ื‘ืื•ืงื˜ื•ื‘ืจ 2019 ื‘ืฉืขื” 17:42:23 UTC+3, ืžืืช Fudge:

Mike Klein

unread,
Oct 8, 2019, 10:58:03โ€ฏAM10/8/19
to skia-discuss
You are, and you probably should?

--
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.

Fudge

unread,
Oct 8, 2019, 11:00:59โ€ฏAM10/8/19
to skia-discuss
But doesn'tย ย running `gn args out/Static` set it to false?
ื‘ืชืืจื™ืš ื™ื•ื ืฉืœื™ืฉื™, 8 ื‘ืื•ืงื˜ื•ื‘ืจ 2019 ื‘ืฉืขื” 17:58:03 UTC+3, ืžืืช Mike Klein:
You are, and you probably should?

On Tue, Oct 8, 2019 at 9:57 AM Fudge <natandes...@gmail.com> wrote:
Oh! by "Most users of Skia should setย is_official_build=true," I had assumed I was a user and should set the property to true.ย 
It seems to be building properly now. Thank you so much!

ื‘ืชืืจื™ืš ื™ื•ื ืฉืœื™ืฉื™, 8 ื‘ืื•ืงื˜ื•ื‘ืจ 2019 ื‘ืฉืขื” 17:42:23 UTC+3, ืžืืช Fudge:

--
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-d...@googlegroups.com.

Mike Klein

unread,
Oct 8, 2019, 11:16:20โ€ฏAM10/8/19
to skia-discuss
is_official_build is false by default.ย  You can see all your settings by running `gn args <dir> --list` to double check you have it set the way you want.

When is_official_build set to false, is_debug defaults to true, so you'll get massive binaries filled with debug symbols, little to no compiler optimization.ย  And all the various skia_use_some_library flags default to settings we like for testing, with most of skia_use_system_some_library set to false for our own convenience of being able to build these from source at a particular consistent version we like for testing.

When is_official_build is set to true, is_debug defaults to false, so you'll get smaller faster binaries.ย  And we still set all the skia_use_some_library flags based mostly on what makes sense for your target platform, but the skia_use_system_some_library flags will all start as true to build against your system versions of those libraries instead of building from source.ย  You can set skia_use_system_some_library = false to go back to building it from source, or skia_use_some_library = false to skip the whole feature.

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/52d3d058-9de5-45d7-aaa7-160ba51a6801%40googlegroups.com.

Fudge

unread,
Oct 8, 2019, 1:12:32โ€ฏPM10/8/19
to skia-discuss
Oh, I understand now (I think). Thank you!

ื‘ืชืืจื™ืš ื™ื•ื ืฉืœื™ืฉื™, 8 ื‘ืื•ืงื˜ื•ื‘ืจ 2019 ื‘ืฉืขื” 18:16:20 UTC+3, ืžืืช Mike Klein:

Fudge

unread,
Oct 8, 2019, 1:32:14โ€ฏPM10/8/19
to skia-discuss
I seem to be missing a lot of libraries (ilibpng, zlib ,libjpeg ,harfbuzz, libwebp,expat), hopefully that won't cause problems down the line.ย 

ื‘ืชืืจื™ืš ื™ื•ื ืฉืœื™ืฉื™, 8 ื‘ืื•ืงื˜ื•ื‘ืจ 2019 ื‘ืฉืขื” 20:12:32 UTC+3, ืžืืช Fudge:

Mike Klein

unread,
Oct 8, 2019, 1:33:50โ€ฏPM10/8/19
to skia-discuss
Yeah, it's fairly uncommon to have any of that on Windows.

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/ced4aab7-fce6-42fa-a628-5a7543f19de3%40googlegroups.com.

Sal

unread,
Aug 7, 2020, 5:24:30โ€ฏPM8/7/20
to skia-discuss
So we can do a dev build withย is_official_build=false.ย But what do we do when we need to distribute out application for Windows users. How do we build withย is_official_build=true for generating dll for distribution to users if these libraries are not available on Windows?

Mike Klein

unread,
Aug 7, 2020, 5:29:44โ€ฏPM8/7/20
to skia-discuss
There are settings like 'skia_use_libpng=false' that you can use to turn off Skia's dependency on missing libraries, or you can build and ship those libraries along with Skia of course.

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/0161d4d6-126e-472a-a7b3-8e0537db3a59o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages