New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Apr 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Sign in to add a comment

PFQ builders fail TestSimpleChromeWorkflow with "Could not run pkg-config."

Project Member Reported by, Apr 28 2017 Back to list

Issue description


Relevant output:

20:15:39: INFO: RunCommand: cros --log-level debug --cache-dir /tmp/cbuildbot-tmpKvNXVl/chrome-sdk-cache23pTml/cache chrome-sdk --board arm-generic --cwd /b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src --sdk-path /b/cbuild/repository/buildbot_archive/arm-generic-chromium-pfq/R60-9501.0.0-rc2 --chrome-src /b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src --nogoma -- bash -c '/b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src/buildtools/linux64/gn gen "/b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src/out_arm-generic/Release" --args="$GN_ARGS"' in /b/cbuild/repository
20:15:39: DEBUG: Configured cache_dir to '/tmp/cbuildbot-tmpKvNXVl/chrome-sdk-cache23pTml/cache'
ERROR at //build/config/linux/pkg_config.gni:101:17: Script returned non-zero exit code.
    pkgresult = exec_script(pkg_config_script, args, "value")
Current dir: /b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src/out_arm-generic/Release/
Command: python -- /b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src/build/config/linux/ -p x86_64-pc-linux-gnu-pkg-config nss -v -lssl3
Returned 1.

Could not run pkg-config.

See //third_party/nss/ whence it was called.
  pkg_config("system_nss_no_ssl_config") {
See //crypto/ which caused the file to be included.
    public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ]

20:15:41: ERROR: Traceback (most recent call last):
  File "/b/cbuild/repository/chromite/cbuildbot/stages/", line 628, in Run
  File "/b/cbuild/repository/chromite/cbuildbot/stages/", line 281, in PerformStage
  File "/b/cbuild/repository/chromite/cbuildbot/stages/", line 255, in _BuildChrome
    sdk_cmd.Run(['bash', '-c', gn_gen_cmd])
  File "/b/cbuild/repository/chromite/cbuildbot/", line 2784, in Run
    cros_build_lib.RunCommand(cros_cmd, cwd=self.cwd, **run_args)
  File "/b/cbuild/repository/chromite/lib/", line 625, in RunCommand
    raise RunCommandError(msg, cmd_result)
RunCommandError: return code: 1; command: cros --log-level debug --cache-dir /tmp/cbuildbot-tmpKvNXVl/chrome-sdk-cache23pTml/cache chrome-sdk --board arm-generic --cwd /b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src --sdk-path /b/cbuild/repository/buildbot_archive/arm-generic-chromium-pfq/R60-9501.0.0-rc2 --chrome-src /b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src --nogoma -- bash -c '/b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src/buildtools/linux64/gn gen "/b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src/out_arm-generic/Release" --args="$GN_ARGS"'
cmd=['cros', '--log-level', 'debug', '--cache-dir', '/tmp/cbuildbot-tmpKvNXVl/chrome-sdk-cache23pTml/cache', 'chrome-sdk', '--board', u'arm-generic', '--cwd', '/b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src', '--sdk-path', u'/b/cbuild/repository/buildbot_archive/arm-generic-chromium-pfq/R60-9501.0.0-rc2', '--chrome-src', '/b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src', '--nogoma', '--', 'bash', '-c', u'/b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src/buildtools/linux64/gn gen "/b/cbuild/repository/.cache/distfiles/target-master/chrome-src/src/out_arm-generic/Release" --args="$GN_ARGS"'], cwd=/b/cbuild/repository

This change seems like the smoking gun:

It's possible that the PFQ builders aren't set up correctly?

I'll revert above CL speculatively and see whether it helps.
Project Member

Comment 2 by, Apr 28 2017

The following revision refers to this bug:

commit 00b062e732629c252673b4cba77a9206edf5cbce
Author: Mattias Nissler <>
Date: Fri Apr 28 10:14:39 2017

Revert "chromeos-chrome: add host_pkg_config for cross-compilation"

This reverts commit c27bea7ccb346760ee278b2d42ab3cd6188467c5.

Reason for revert: Likely the culprit for TestSimpleChromeWorkflow breakage in Chrome PFQ builders, see .

Original change's description:
> chromeos-chrome: add host_pkg_config for cross-compilation
> This new build variable ensures that host-only compilation helpers
> aren't incorrectly linked against libraries in the current board
> sysroot.
> BUG=chromium:710841
> TEST=cbuildbot kevin-release
> Change-Id: Ifc667fd55cfaa00e2721c7894684909b6bd08b46
> Reviewed-on:
> Commit-Ready: Richard Townsend <>
> Tested-by: Richard Townsend <>
> Reviewed-by: Mike Frysinger <>
BUG=chromium:710841,  chromium:716399 

Change-Id: If877ffdca42ce697957d7a438e4675a9cf7541ee
Reviewed-by: Mattias Nissler <>
Tested-by: Mattias Nissler <>


This was the right thing to do, I'm not sure why x86_64-pc-linux-gnu-pkg-config might not be available in this environment, or why it passed the commit queue.
Labels: Hotlist-CrOS-Sheriffing
Status: Fixed
The revert fixed the TestSimpleChromeWorkflow step.

Comment 6 by, Apr 28 2017

hrm, simple chrome.  the build pkg-config that is available inside the chroot is not guaranteed to be available outside.  we prob need to update the chromite/cli/cros/ script first to set this new knob, and then reland that chromeos-chrome ebuild change.

Comment 7 by, Apr 28 2017

OK, so I wasn't able to replicate the precise build, but I was able to the error via the cros shell. It seems to relate from the use of $(tc-getBUILD_PKG_CONFIG), which seems to return 'x86_64-pc-linux-gnu-pkg-config', which isn't provided in the arm-generic toolchain inside the cros shell. Patchset #2 of would probably correct this, but it's not a very clean solution.

Comment 8 by, Apr 28 2017

Oops, guess vapier beat me to it. I'll add a follow up task inside
OK, so I still haven't been able to replicate the problem in the simple chrome environment. Would it be possible to get more of the build log so I can assess exactly what it's doing?
FWIW, attached is the full output from the build step. I'm not sure whether it's an actual problem or some build config issue. Do you ensure that pkg-config is installed in the build root?
27.0 KB View Download
we don't ship a pkg-config for your active build system

just update as i mentioned earlier to set the variable and clobber whatever the ebuild has set up
So replicating the build steps as closely as possible and modifying the simple chrome environment a bit to simulate the unreverted ebuild, I think I have managed to come up with a patch for this. All it involves is adding 'gn_args["host_pkg_config"] = "pkg-config"' in cli/cros/ at around line 703. If I can get it signed off internally, I'll be able to push it quite soon.
The current fix is available at I don't quite understand yet the relationship between the ebuild's configuration and simple chrome's environment, but adding it into the the SDK script does seem to override the pkg_config setting in the environment's GN_ARGS.
Project Member

Comment 14 by, May 8 2017

The following revision refers to this bug:

commit 4e87bfa4ee18aa9d1799ea350eea3a0a406470b9
Author: Richard Townsend <>
Date: Mon May 08 19:43:43 2017

Add host_pkg_config for simple chrome builds.

host_pkg_config is used to make sure that compiled_actions targets
find the right libraries/include headers required for compilation on the
host machine for use elsewhere in the build process. It's related with and , which both block 

BUG= chromium:716399 
TEST=Built with simple-chrome environment

Change-Id: I2daaf5d7f89d7f5229946e0f19fe44ece530e714
Commit-Ready: Richard Townsend <>
Tested-by: Richard Townsend <>
Reviewed-by: Mike Frysinger <>


Labels: VerifyIn-61
Status: Archived

Sign in to add a comment