LearningC
LearningC

Reputation: 3162

error while setting up chromium

i am getting following error while setting up chromium from source code.
when i run gn gen out/Default

 gn gen out/Default
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
    pkgresult = exec_script(pkg_config_script, args, "value")
                ^----------
Current dir: /opt/apps/chromium/chromium_src/src/out/Default/
Command: python -- /opt/apps/chromium/chromium_src/src/build/config/linux/pkg-config.py -s /opt/apps/chromium/chromium_src/src/build/linux/debian_stretch_amd64-sysroot -a x64 nss -v -lssl3
Returned 1.
stderr:

Traceback (most recent call last):
  File "/opt/apps/chromium/chromium_src/src/build/config/linux/pkg-config.py", line 232, in <module>
    sys.exit(main())
  File "/opt/apps/chromium/chromium_src/src/build/config/linux/pkg-config.py", line 139, in main
    prefix = GetPkgConfigPrefixToStrip(options, args)
  File "/opt/apps/chromium/chromium_src/src/build/config/linux/pkg-config.py", line 80, in GetPkgConfigPrefixToStrip
    "--variable=prefix"] + args, env=os.environ)
  File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

See //third_party/nss/BUILD.gn:15:3: whence it was called.
  pkg_config("system_nss_no_ssl_config") {
  ^---------------------------------------
See //crypto/BUILD.gn:221:25: which caused the file to be included.
    public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ].

I am not able to make out how to fix this.
i followed https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md
also referred these
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-dev/360e3QsLH-8
https://groups.google.com/a/chromium.org/forum/#!msg/chromium-os-dev/nM7Af-sJP_I/YoqXPgZ0BQAJ
Not able to get much details.
These discussions refer to PKG_CONFIG_LIBDIR but its not clear where to set this value or use it exactly.
Any inputs on what i may be missing ?

Upvotes: 4

Views: 4064

Answers (2)

Asanka
Asanka

Reputation: 618

I had the same issue, and I also tried with sudo apt-get update && sudo apt-get install pkg-config as mentioned by @Rajan Palani and many other git issues comments. But in my case

sudo apt install libpango1.0-dev
sudo apt install libcogl-pango-dev
sudo apt install libjpeg-dev

above commands helps me out to solve the issue

source: https://programmer.group/how_to_build_chromium_project_for_linux.html

Upvotes: 0

Rajan Palani
Rajan Palani

Reputation: 61

I had the same issue resolved it by installing this packages

sudo apt-get update && sudo apt-get install pkg-config

Upvotes: 6

Related Questions