Reputation: 337
I wanted to compile WebRTC for an Android project. Therefore, I followed the steps at https://medium.com/@silvestr1994/webrtc-on-android-part-1-building-b6982aad4b49 . Every step was fine until I came to the Compiling step (Step-4):
gn gen out/Debug --args='target_os="android" target_cpu="arm"'
When I put this into the commandline, then it outputs the following error:
ac3l1k@ac3l1k-C:~/Desktop/PROJECT/WebRTC-code/src$ gn gen out/Debug --args='target_os="android" target_cpu="arm"'
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: /home/ac3l1k/Desktop/PROJECT/WebRTC-code/src/out/Debug/
Command: python /home/ac3l1k/Desktop/PROJECT/WebRTC-code/src/build/config/linux/pkg-config.py -s /home/ac3l1k/Desktop/PROJECT/WebRTC-code/src/build/linux/debian_sid_amd64-sysroot -a x64 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
Returned 1.
stderr:
Traceback (most recent call last):
File "/home/ac3l1k/Desktop/PROJECT/WebRTC-code/src/build/config/linux/pkg-config.py", line 248, in <module>
sys.exit(main())
File "/home/ac3l1k/Desktop/PROJECT/WebRTC-code/src/build/config/linux/pkg-config.py", line 143, in main
prefix = GetPkgConfigPrefixToStrip(options, args)
File "/home/ac3l1k/Desktop/PROJECT/WebRTC-code/src/build/config/linux/pkg-config.py", line 82, in GetPkgConfigPrefixToStrip
"--variable=prefix"] + args, env=os.environ)
File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
See //build/config/linux/BUILD.gn:89:3: whence it was called.
pkg_config("glib") {
^-------------------
See //build/config/compiler/BUILD.gn:218:18: which caused the file to be included.
configs += [ "//build/config/linux:compiler" ]
^------------------------------
Can anybody help ?
Note: I am using Linux Ubuntu 18.04
Upvotes: 1
Views: 682
Reputation: 11
just lack of pkg-config when calling pkg_config("glib").
sudo apt install pkg-config
Upvotes: 1