【问题标题】:Compiling WebRTC has failed编译 WebRTC 失败
【发布时间】:2019-06-26 16:11:07
【问题描述】:

我想为一个 Android 项目编译 WebRTC。因此,我按照https://medium.com/@silvestr1994/webrtc-on-android-part-1-building-b6982aad4b49 的步骤进行操作。 在我进入编译步骤(Step-4)之前,每一步都很好:

gn gen out/Debug --args='target_os="android" target_cpu="arm"'

当我将它放入命令行时,它会输出以下错误:

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" ]
                 ^------------------------------

有人可以帮忙吗?

注意:我使用的是 Linux Ubuntu 18.04

【问题讨论】:

标签: ubuntu compilation webrtc


【解决方案1】:

调用 pkg_config("glib") 时只是缺少 pkg-config。
sudo apt install pkg-config

【讨论】:

    猜你喜欢
    • 2021-04-12
    • 2021-10-07
    • 1970-01-01
    • 2021-06-14
    • 2021-01-29
    • 2018-11-06
    • 1970-01-01
    • 2013-02-01
    • 2016-08-16
    相关资源
    最近更新 更多