当前位置:网站首页>华为鲲鹏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库也加了这个参数
边栏推荐
- Tencent and NetEase have taken action one after another. What is the metaverse that is so popular that it is out of the circle?
- EL表达式
- CSDN大礼包--高校圆桌派大礼包
- 库函数的模拟实现-C语言
- C语言数组的深度分析
- Tensorflow/Pytorch安装(Anaconda环境下,无版本冲突,亲测有效)
- strlen 转义字符
- Copy Siege Lion's Annual "Battle" | Review 2020
- LeetCode_Nov_3rd_Week
- [开发杂项][VS Code]remote-ssd retry failed
猜你喜欢

位段-C语言

Question 1000: Input two integers a and b, calculate the sum of a+b, this question is multiple sets of test data

LeetCode_Nov_4th_Week

Golang environment variable settings (2)--GOMODULE & GOPROXY

LeetCode_Nov_5th_Week

2020-03-27

LeetCode_Dec_2nd_Week

枚举和联合(自定义类型)-C语言

Golang环境变量设置(二)--GOMODULE&GOPROXY

MNIST Handwritten Digit Recognition - Image Analysis Method for Binary Classification
随机推荐
抽象类、内部类和接口
Completely remove MySQL tutorial
[Development miscellaneous][Debug]debug into kernel
LeetCode_Dec_2nd_Week
C语言无符号整型运算
Rules.make-适合在编辑模式下看
tmux概念和使用
IEEE802.X protocol suite
[Copy Siege Lion Log] Flying Pulp Academy Intensive Learning 7-Day Punch Camp-Study Notes
FAREWARE ADDRESS
"A minute" Copy siege lion log 】 【 run MindSpore LeNet model
树和二叉树
Code to celebrate the Dragon Boat Festival - Zongzi, your heart
枚举和联合(自定义类型)-C语言
Vmmem 进程(WSL2)消耗内存巨大
LeetCode_Dec_1st_Week
file permission management ugo
MNIST Handwritten Digit Recognition - Building a Perceptron from Zero for Two-Classification
SFTP的用法
MNIST handwritten digit recognition - based on Mindspore to quickly build a perceptron to achieve ten categories