当前位置:网站首页>华为鲲鹏arm服务器下使用webrtc和boost踩坑记--编译篇
华为鲲鹏arm服务器下使用webrtc和boost踩坑记--编译篇
2022-08-04 05:31:00 【睏哥RTC】
一. webrtc编译
由于申请的鲲鹏机器在国内,下载webrtc下不了,只能用日本的一台x86下载和交叉编译
1、安装depot tools
国外:git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
国内:git clone https://source.codeaurora.org/quic/lc/chromium/tools/depot_tools
把depot_tools目录加入PATH:export PATH=`pwd`/depot_tools:"$PATH"
2. 下源码:
fetch --nohooks webrtc
cd src && git checkout -b m59 branch-heads/59 && cd ..
gclient sync
4. 下arm64的编译环境
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
5. 编译
gn gen out/Release-device-arm64 --args='is_debug=false is_component_build=false use_sysroot=false use_custom_libcxx=false treat_warnings_as_errors=false rtc_include_tests=false rtc_use_h264=true proprietary_codecs=true ffmpeg_branding="Chrome" use_openh264=true target_os="linux" target_cpu="arm64"'
ninja -C out/Release-device-arm64
6.合并静态库
在out/Release-device-arm64下编辑 libwebrtc_full.ar 文件,内容为:
CREATE libwebrtc_full.a
ADDLIB obj/third_party/boringssl/libboringssl.a
ADDLIB obj/third_party/protobuf/libprotobuf_full.a
ADDLIB obj/webrtc/libwebrtc.a
ADDLIB obj/webrtc/system_wrappers/libfield_trial_default.a
ADDLIB obj/webrtc/system_wrappers/libmetrics_default.a
ADDLIB obj/webrtc/libwebrtc_common.a
SAVE
END
然后执行: ar -M < libwebrtc_full.ar 生成 libwebrtc_full.a
二、在鲲鹏下编译boost库
./bootstrap.sh --prefix=/usr/local
./b2 -j8 variant=release define=_GLIBCXX_USE_CXX11_ABI=1 stage
添加_GLIBCXX_USE_CXX11_ABI=1是因为webrtc的M66版本内部用的_GLIBCXX_USE_CXX11_ABI=1(因为使用webrtc的程序不加这个就链接不上webrtc),所以给boost库也加了这个参数
边栏推荐
- counting cycle
- 【五一专属】阿里云ECS大测评#五一专属|向所有热爱分享的“技术劳动者”致敬#
- 深度学习理论 —— 初始化、参数调节
- Tensorflow/Pytorch安装(Anaconda环境下,无版本冲突,亲测有效)
- LeetCode_Dec_1st_Week
- LeetCode_Nov_4th_Week
- C语言对文件的操作(完整版)
- 枚举和联合(自定义类型)-C语言
- MNIST Handwritten Digit Recognition - Building a Perceptron from Zero for Two-Classification
- LeetCode_Nov_4th_Week
猜你喜欢
IDEA创建Servlet步骤
Shell脚本执行的三种方式
target has libraries with conflicting names: libcrypto.a and libssl.a.
第三章 标准单元库(下)
LeetCode_Dec_2nd_Week
Pytest common plug-in
LeetCode_Dec_2nd_Week
Completely remove MySQL tutorial
How to get started with MOOSE platform - an example of how to run the official tutorial
安装MySQL的详细步骤
随机推荐
Completely remove MySQL tutorial
CSDN大礼包--高校圆桌派大礼包
(Navigation page) OpenStack-M version - manual construction of two nodes - with video from station B
[日常办公][shell]常用代码段
线程池原理
C语言静态变量static的分析
C语言结构体(必须掌握版)
jdbc:mysql://localhost:3306/student?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8时报错
Cut the hit pro subtitles export of essays
file permission management ugo
常见的一些排序
多线程顺序输出
[CV-Learning] Linear Classifier (SVM Basics)
实现高并发服务器(二)
指针运算相关面试题详解【C语言】
关于DG(域泛化)领域的PCL方法的代码实例
C语言数组的深度分析
No matching function for call to 'RCTBridgeModuleNameForClass'
Detailed steps to install MySQL
LeetCode_22_Apr_2nd_Week