编译WebRTC arm Linux库

2019-07-12 19:11发布

环境

1. 编译机 ubuntu14.04 2. WebRTC版本 m56 android分支

安装依赖(科学上网)

编译WebRTC for Linux可以使用WebRTC for android的代码. 在WebRTC的编译脚本中已经预留了对交叉编译的支持,只需要执行 ./build/linux/sysroot_scripts/install-sysroot.py --arch=arm 安装依赖需要编译机能够科学上网

编译arm linux库

指定编译目标系统和cpu架构 1. gn gen 'target_os="linux" target_cpu="arm"' 2. ninja -C out/default

可能出现的报错

File "../../build/toolchain/gcc_ar_wrapper.py", line 66, in sys.exit(main()) File "../../build/toolchain/gcc_ar_wrapper.py", line 62, in main return subprocess.call(wrapper_utils.CommandToRun(command)) File "/usr/lib/python2.7/subprocess.py", line 522, in call return Popen(*popenargs, **kwargs).wait() 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 这是由于没有指明交叉编译工具链的路径导致的,编译要求安装arm-linux-gnueabihf-系列的工具链 安装编译器: ubuntu 14.04: apt-get install gcc-arm-linux-gnueabihf 重新执行ninja -C out/default

参考到的资料

感谢! 1. http://blog.csdn.net/lichen18848950451/article/details/73928023?locationNum=5&fps=1 2. https://stackoverflow.com/questions/38637212/cross-compile-webrtc-for-arm