Hacker News new | ask | show | jobs
by charcircuit 849 days ago
I was skeptical of your claims about building it so I went ahead and downloaded skia and built it myself. It was simple and on my 4 year old desktop (8 cores) it took under a minute to compile skia after it had downloaded its dependencies. All I did was run 2 commands ./tools/git-sync-deps and bazel build //:skia_public. This was not painful at all.
4 comments

This doesn't reflect my experiences at all. I've never built it with bazel, are you sure it's not using some prebuilt binary?

The official instructions are https://skia.org/docs/user/build/

It looks like they are several years into a migration to bazel and support both a bazel and gn based build. Bazel is usually faster. It's possible the gn based build builds everything in the repo including all tests, but the bazel one is more targeted, building less things

https://skia.org/docs/dev/contrib/bazel/

How long did downloading dependencies take? That's part of the build process.

As a maintainer of a project that includes another popular library from Google, here's why it's difficult to build:

- building requires downloading Googles custom toolchain and build system

- dependencies are huge, so you have lenghty download times even on fast connections

- it usually works if you are using a recent versions of OS and Python, but if you try running the same command in a year or two it might fail because they changed the requirements

- if anything fails you have to dig through multiple levels of abstractions to figure out where it failed and why

- if you want to maintain software for a few years, you'll have to keep fixing the build process because the build will suddenly stop working for unknown reasons once a year or so

>How long did downloading dependencies take?

Around 5 minutes.

>That's part of the build process.

It's dependent on one's internet speed so I didn't think it made much sense to time it. If it took 20 to 30 minutes to download I would have mentioned it.

Using the official instructions, it took 4 minutes to scratch download skia and all its deps and build it with ninja. It only had 1235 build actions ... that's like zero.

If this seems like a big lift, people are going to hate building Chromium.

It depends on what features you have enabled, how slow your internet connection is and obviously hardware/software config. On my 10th gen Intel i5 laptop 8gb ram (on Windows), it takes 15 minutes to build if I don't do anything else, but if I start using Firefox and IDEs, the build times are easily in the 20-25 minutes ballpark.