Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross Compilation Error #136

Open
theswedishdeveloper opened this issue Mar 6, 2022 · 2 comments
Open

Cross Compilation Error #136

theswedishdeveloper opened this issue Mar 6, 2022 · 2 comments

Comments

@theswedishdeveloper
Copy link

Hey,

I am trying to build the rpi-webrtc-streamer from source but I have encountered issue while trying to build webrtc from souce. I have followed the steps at https://github.com/kclyu/rpi-webrtc-streamer/blob/master/README_building.md but when I am supposed to execute command "gn gen out/arm_build" I can get following error code:


ERROR at //build/config/linux/pkg_config.gni:104:17: Script returned non-zero exit code.
    pkgresult = exec_script(pkg_config_script, args, "value")
                ^----------
Current dir: /root/Workspace/webrtc/src/out/arm_build/
Command: python3 /root/Workspace/webrtc/src/build/config/linux/pkg-config.py -s /opt/rpi_rootfs/rootfs -a arm --system_libdir lib glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
Returned 1.
stderr:

Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
Package gmodule-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gmodule-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gmodule-2.0' found
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.0' found
Traceback (most recent call last):
  File "/root/Workspace/webrtc/src/build/config/linux/pkg-config.py", line 248, in <module>
    sys.exit(main())
  File "/root/Workspace/webrtc/src/build/config/linux/pkg-config.py", line 143, in main
    prefix = GetPkgConfigPrefixToStrip(options, args)
  File "/root/Workspace/webrtc/src/build/config/linux/pkg-config.py", line 81, in GetPkgConfigPrefixToStrip
    prefix = subprocess.check_output([options.pkg_config,
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pkg-config', '--variable=prefix', 'glib-2.0', 'gmodule-2.0', 'gobject-2.0', 'gthread-2.0']' returned non-zero exit status 1.

See //build/config/linux/BUILD.gn:59:3: whence it was called.
  pkg_config("glib") {
  ^-------------------
See //build/config/compiler/BUILD.gn:274:18: which caused the file to be included.
    configs += [ "//build/config/linux:compiler" ]
                 ^------------------------------

Does anyone know how to solve it?

I am using Ubuntu 20.04.4 LTS and are building for Raspberry pi 3 B+.

Thanks in advance!

@kclyu

@theswedishdeveloper
Copy link
Author

theswedishdeveloper commented Mar 7, 2022

I think the problem is caused by incompatible versions, because the "instructions" are outdated. Please can someone who managed cross-compile successfully share with me here, what versions of webrtc you use and what version of raspios to use to create rootfs. Thank you.

@samyzhh
Copy link

samyzhh commented Mar 15, 2022

You can manually add the class library:
find -name gtk+-3.0.pc
./linux/debian_sid_amd64-sysroot/usr/lib/pkgconfig/gtk+-3.0.pc
./linux/debian_sid_i386-sysroot/usr/lib/pkgconfig/gtk+-3.0.pc
export PKG_CONFIG_PATH=/root/Workspace/webrtc/src/build/linux/debian_sid_amd64-sysroot/usr/lib/pkgconfig/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants