$ gn gen --args='os="chromeos"' out_gn_chromeos/Debug
ERROR at //build/config/linux/pkg_config.gni:66:17: Script returned non-zero exit code.
pkgresult = exec_script(pkg_config_script, args, "value")
^----------
Current dir: /home/tfarina/chromium/src/out_gn_chromeos/Debug/
Command: python /home/tfarina/chromium/src/build/config/linux/pkg-config.py harfbuzz
Returned 1 and printed out:
Could not run pkg-config.
stderr:
Package harfbuzz was not found in the pkg-config search path.
Perhaps you should add the directory containing `harfbuzz.pc'
to the PKG_CONFIG_PATH environment variable
No package 'harfbuzz' found
See //third_party/harfbuzz-ng/BUILD.gn:44:3: whence it was called.
pkg_config("harfbuzz_pkgconfig") {
^---------------------------------
The solution for me is to add use_system_harfbuzz=false to --args list.
--