WebRTC技术建设的手臂 [英] WebRTC building for arm

查看:1420
本文介绍了WebRTC技术建设的手臂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立WebRTC技术为我的小机ARM926EJ-S处理器。
结果
我安装depot_tools后,我并以下步骤:结果

  gclient配置HTTP://webrtc.google$c$c.com/svn/trunk
gclient同步--force
CD干线
忍者-C出/调试

所有工作正常,我可以运行一些二进制文件,我编译后得到的。结果
现在,我想编译我的胳膊机。我下面的:结果

 室射频出来
出口GYP_CROSSCOMPILE = 1
出口GYP_DEFINES =TARGET_ARCH =手臂arm_float_abi =硬
出口CC = /路径/要/我的/ GCC
出口CXX = /路径/要/我的/ G ++
出口AR = /路径/要/我的/ AR
出口CC_host = GCC
出口CXX_host = G ++
gclient runhooks --force

不过一切顺利......结果
但是,当我尝试使用命令编译:

 忍者-C输出/调试

我得到了很多的错误,如:

  CC OBJ /铬/ src目录/ third_par ... P / SRTP /密码/密码/ libsrtp.aes_cbc.o
失败:/opt/virt2real-sdk/$c$csourcery/arm-2013.05/bin/arm-none-linux-gnueabi-gcc -MMD -MF OBJ /铬/ src目录/ THIRD_PARTY / libsrtp / SRTP /密码/密码/ libsrtp .aes_cbc.od -DHAVE_STDLIB_H -DHAVE_STRING_H -DV8_DE preCATION_WARNINGS -D_FILE_OFFSET_BITS = 64 -DHAVE_INT16_T -DHAVE_INT32_T -DHAVE_INT8_T -DHAVE_UINT16_T -DHAVE_UINT32_T -DHAVE_UINT64_T -DHAVE_UINT8_T -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DINLINE =直列-DCPU_CISC -DCHROMIUM_BUILD -DCR_CLANG_REVISION = 214024 -DTOOLKIT_VIEWS = 1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA = 1 -DUSE_ASH = 1 -DUSE_PANGO = 1 -DUSE_CAIRO = 1 -DUSE_GLIB = 1 -DUSE_DEFAULT_RENDER_THEME = 1 -DUSE_LIBJPEG_TURBO = 1 -DUSE_X11 = 1 -DUSE_CLIPBOARD_AURAX11 = 1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_ pre_SYNC_BACKUP -DUSE_XI2_MT = 2 -DENABLE_REMOTING = 1 -DENABLE_WEBRTC = 1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DENABLE_EGLIMAGE = 1 -DENABLE_TASK_MANAGER = 1 -DENABLE_EXTENSIONS = 1 -DENABLE_PLUGINS = 1 -DENABLE_SESSION_SERVICE = 1 -DENABLE_THEMES = 1 -DENABLE_AUTOFILL_DIALOG = 1 -DENABLE_BACKGROUND = 1 -DENABLE_GOOGLE_NOW = 1 -DCLD_VERSION = 2 -DCLD2_DATA_SOURCE =静态-DENABLE_FULL_PRINTING = 1 -DENABLE_PRINTING = 1 -DENABLE_SPELLCHECK = 1 -DENABLE_CAPTIVE_PORTAL_DETECTION = 1 -DENABLE_APP_LIST = 1 -DENABLE_SETTINGS_APP = 1 -DENABLE_MANAGED_USERS = 1 -DENABLE_MDNS = 1 -DENABLE_SERVICE_DISCOVERY = 1 -DUSE_NSS = 1 -DDYNAMIC_ANNOTATIONS_ENABLED = 1 -DWTF_USE_DYNAMIC_ANNOTATIONS = 1 -D_DEBUG -D_GLIBCXX_DEBUG = 1 -I ../../铬/ src目录/ THIRD_PARTY / libsrtp /配置-I ../../铬/ src目录/ THIRD_PARTY / libsrtp / SRTP /包括-I ../../铬/ src目录/ THIRD_PARTY / libsrtp / SRTP /密码/包括-Igen -fstack保护器--param = SSP缓冲区大小= 4 -Werror -pthread -fno-异常-fno严格走样-Wno未使用的参数-Wno缺失场-初始化-fvisibility =隐藏-pipe -fPIC -Wno保留用户定义的字面-Xclang -load -Xclang /home/footniko/my/webrtcnative/trunk/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-插件-Xclang发现,坏结构-fcolor诊断-Wheader-卫生-Wno-CHAR-标-Wno-不必要的内部声明-Wno覆盖开关默认-Wstring转换-Wno- C ++ 11变窄-Wno-DE precated注册-Wno格式-Wno未使用的,结果-target臂Linux的gnueabihf -march =的ARMv7-A -no集成,为-mtune = generic-的ARMv7-A -mfpu =霓虹灯-mfloat-ABI =硬-mthumb --sysroot = /家庭/ footniko /我的/ webrtcnative /主干/ ARM-SYSROOT -O0 -g -funwind桌-Wno-未定义 - 布尔转换 - WNO-同义反复,不确定的,比较-c ../../chromium/src/third_party/libsrtp/srtp/crypto/cipher/aes_cbc.c -o OBJ /铬/ src目录/ THIRD_PARTY / libsrtp / SRTP /密码/密码/ libsrtp.aes_cbc.o
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-Xclang
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-Xclang
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-Xclang
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-add-插件
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-Xclang
臂无-Linux的gnueabi-GCC:错误:找到-坏结构:没有这样的文件或目录
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-fcolor诊断
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-Wheader,卫生
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-Wstring转换
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项-target
臂无-Linux的gnueabi-GCC:错误:臂Linux的gnueabihf:没有这样的文件或目录
臂无-Linux的gnueabi-GCC:错误:无法识别的命令行选项 - 没有集成,为


解决方案

我也有这个问题,但它是因为编译器选择(CC,CXX等)相关的出口。事实上,这会让你错误的,因为-Xclang不被GCC认可。

下面是我曾经尝试编译的方法。然而,似乎WebRTC技术中继线快速移动,它是没有更多的工作这最后的日子。你需要说你要定位到Android(和Linux)为此,你需要android_tools:是关系到你的问题,并9dan的建议的最大的变化。但现在,它不是来自WebRTC技术牵强,你应该从铬之一。

下面是安装过程的概要。

系统要求:

preFER至少30GB的虚拟驱动器空间和8GbRAM在虚拟化Lubuntu14.04 64:

  _Lubuntu快速虚拟化,它是基于Ubuntu自安装脚本依赖于Ubuntu的软件包名称这是必要时使用
既然喜欢install-build-deps.sh脚本期望64bit系统并安装特定的32位库_64bit是必要的
_30Gb至少是因为标准(非交叉编译)WebRTC技术至少需要万兆,但将所有交叉编译东西时,驱动器空间爆炸!
_8GbRAM要能够编译和链接的一切

然后,从该主机,这里是安装过程:

基本preliminary设置...假设没有后面讨论变量已出口

首先安装必要的软件包,以便能够获取数据,并用java玩:

  //确保所有必需的车厂准备
sudo的附加的apt-库的deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)主宇宙多元宇宙限制
取前//安装最基本的软件包
命令和apt-get安装的OpenJDK 7-jdk的混帐颠覆

初始WebRTC中获取

创建一个目录来获取和去

 的mkdir WebRTC技术
CD WebRTC技术
混帐克隆https://chromium.googlesource.com/chromium/tool​​s/depot_tools.git
出口PATH =< depot_tools的制造&gt位置;$ PATH//例如:export PATH = /家庭/测试/ WebRTC技术/ depot_tools:$ PATH
出口JAVA_HOME =< Java SE 6中的位置 - JDK> //例如:export JAVA_HOME = / usr / lib目录/ JVM / Java的7-的OpenJDK,AMD64 /
gclient配置HTTP://webrtc.google$c$c.com/svn/trunk
gclient同步--force

请注意0:有时失败说GCC,pkg配置等也没有发现。这通常发生在一个新的安装,其中大量的包丢失。
幸运的是脚本应该已经被下载:

 干线/内置/ install-build-deps.sh

运行它来安装所有需要的软件包,然后重新运行

  gclient同步--force

添加所有必要的Andr​​oid SDK中与放大器; NDK所需要的目标ARM系统

 回声TARGET_OS = ['机器人','UNIX']>> .gclient
gclient同步
CD干线
来源./build/android/envsetup.sh
出口GYP_DEFINES =$ GYP_DEFINES OS =机器人
gclient runhooks

注1:在Android工具是没有更直接可用WebRTC技术。它建议使用铬之一。
那么,在WebRTC中的文件夹或另一个(例如,原来的位置:后备箱/ THIRD_PARTY /).

  CD myTargetDirectory //例如CD主干/ THIRD_PARTY /
混帐克隆https://chromium.googlesource.com/android_tools

在android_tools是牵强附会,配置项目才能看到它。编辑:

 干线/铬/ src目录/ THIRD_PARTY / openmax_dl / DL / dl.gyp

和加入的变量部分以下行的文件的开头添加所需的变量android_ndk_root:

 'android_ndk_root':'< WebRTCfolder> /主干/ THIRD_PARTY / android_tools / NDK /',
例如,'android_ndk_root':'/家庭/测试/ WebRTC技术/主干/ THIRD_PARTY / android_tools / NDK /',

您也可以导出ANDROID_NDK_ROOT在你的.bashrc

 出口ANDROID_NDK_ROOT =< WebRTCfolder> /主干/ THIRD_PARTY / android_tools / NDK /
例如出口ANDROID_NDK_ROOT = /家庭/测试/ WebRTC技术/主干/ THIRD_PARTY / android_tools / NDK /

prepare交叉编译基于armv7a平台

  //安装所有需要的软件包
CD干线
./build/install-build-deps.sh --arm
./build/install-build-deps-android.sh

/ * =>不同的实验后,我用了上面的命令,但我想它是不是从一个非常干净的安装绝对必要的。 Anycase,如果做了,命令./build/install-build-deps.sh --arm之后应以用来交换一些交叉编译软件包
(主要是为了保持G ++ - ARM-Linux的gnueabihf并安装GCC-ARM的Linux的gnueabihf)
* /

  ./编译/ Linux的/ install-arm-sysroot.py
出口GYP_CROSSCOMPILE = 1 / * = GT;我用它,但我问自己,如果因为执行以后自动声明它仍然是必要的。* /出口GYP_DEFINES =OS = Linux的TARGET_ARCH =手臂arm_version = 7 arm_use_neon = 1
像arm_fpu =的VFPv3-D16 arm_float_abi = softfp //其他选项为默认设置,其实,即使arm_vervion = 7,use_neon = 1 * /

下面,目标是Linux臂所以这应该是足够的,但如果目标定位机器人,它可能有必要定义以下变量

 出口ANDROID_SDK_VERSION = 19
出口GYP_DEFINES =$ GYP_DEFINES android_sdk_version = 19

注2:下面的出口经常报道的指南和教程。然而,在使用时,他们带来几个问题(无法识别的标志-Xclang等)。他们似乎没有更多的有用的,因为石膏文件自动调整这些设置!对我来说,避开它们是让汇编作品,配置和开始的唯一途径。

 出口CC =臂Linux的gnueabihf-GCC
出口CXX =臂Linux的gnueabihf-G ++
出口AR =臂Linux的gnueabihf-AR
出口CC_host = GCC
出口CXX_host = G ++

最后,移动到最后编译步骤之前配置系统

  CD ..
gclient runhooks --force
 CD主干/

潜在的错误1,解决了

第一次出现以下错误:
=>石膏:铬/ src目录/ THIRD_PARTY / openmax_dl / DL / dl.gyp未定义的变量android_ndk_root
=>回来previous节,你肯定忘了在enlighted文件中定义android_ndk_root变量:
android_ndk_root':'/主干/ THIRD_PARTY / android_tools / NDK /',
* /

潜在的错误2,解决了

努力的目标主干/建设/ Linux的/ pkg配置 - 包装时,会出现一个相对链接的问题,你可以得到类似这样:
从石膏文件更新项目...
/ bin / sh的:../../../build/linux/pkg-config-wrapper:没有这样的文件或目录
石膏:呼吁../../../build/linux/pkg-config-wrapper/媒体/工作区/ lib中/ WebRTC技术/主干/臂SYSROOT,手臂--libs只-L - -libs只-其他NSS'返回退出状态127,而躯干/ all.gyp装载依赖尝试加载主干/ all.gyp
错误:命令/ usr / bin中/ Python的主干/建设/ gyp_chromium --depth =箧笥/ all.gyp -Dextra_gyp_flag = 0 /媒体/工作区/ lib目录返回非零退出状态,1 / WebRTC技术
=>如果你想解决这个问题有此错误的所有文件,查找错误的文件有:

 的grep -Ir --exclude = \\ *。{C,H}../../../build/linux/pkg-config-wrapper*

和替换PKG配置行(相关的相对路径部分在每个找到的文件的开头:
'pkg配置':'主干/编译/ Linux的/ pkg配置 - 包装≤(SYSROOT),≤(TARGET_ARCH)

gclient runhooks --force

最后编译步骤

  CD干线
忍者-C出/发行/
忍者-C出/调试如果需要的话/ //

一个想法:sudo易于得到安装gcc-臂Linux的androideabi
你应该针对THIRD_PARTY / android_tools / NDK /平台/ Android的XXX /弓臂的/ usr / include / sys中/

//如果具有铛问题,它可以与该其它附加选项desactivated(重新运行gclien runhooks后)

 出口GYP_DEFINES =$ GYP_DEFINES铛= 0

I want to build webrtc for my small machine with arm926ej-s processor.
After I install depot_tools, I did following steps:

gclient config http://webrtc.googlecode.com/svn/trunk
gclient sync --force
cd trunk
ninja -C out/Debug

All working fine and I can run some binary files, which I get after compiling.
Now, I want to compile for my arm machine. I do following:

rm -rf out
export GYP_CROSSCOMPILE=1
export GYP_DEFINES="target_arch=arm arm_float_abi=hard"
export CC=/path/to/my/gcc
export CXX=/path/to/my/g++
export AR=/path/to/my/ar
export CC_host=gcc 
export CXX_host=g++ 
gclient runhooks --force 

Still all smoothly...
But when I try to compile it with command:

ninja -C out/Debug

I got many errors, like:

CC obj/chromium/src/third_par...p/srtp/crypto/cipher/libsrtp.aes_cbc.o
FAILED: /opt/virt2real-sdk/codesourcery/arm-2013.05/bin/arm-none-linux-gnueabi-gcc -MMD -MF obj/chromium/src/third_party/libsrtp/srtp/crypto/cipher/libsrtp.aes_cbc.o.d -DHAVE_STDLIB_H -DHAVE_STRING_H -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DHAVE_INT16_T -DHAVE_INT32_T -DHAVE_INT8_T -DHAVE_UINT16_T -DHAVE_UINT32_T -DHAVE_UINT64_T -DHAVE_UINT8_T -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DINLINE=inline -DCPU_CISC -DCHROMIUM_BUILD -DCR_CLANG_REVISION=214024 -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DUSE_XI2_MT=2 -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DCLD2_DATA_SOURCE=static -DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_MANAGED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_NSS=1 -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_GLIBCXX_DEBUG=1 -I../../chromium/src/third_party/libsrtp/config -I../../chromium/src/third_party/libsrtp/srtp/include -I../../chromium/src/third_party/libsrtp/srtp/crypto/include -Igen -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /home/footniko/my/webrtcnative/trunk/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-format -Wno-unused-result -target arm-linux-gnueabihf -march=armv7-a -no-integrated-as -mtune=generic-armv7-a -mfpu=neon -mfloat-abi=hard -mthumb --sysroot=/home/footniko/my/webrtcnative/trunk/arm-sysroot -O0 -g -funwind-tables -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare   -c ../../chromium/src/third_party/libsrtp/srtp/crypto/cipher/aes_cbc.c -o obj/chromium/src/third_party/libsrtp/srtp/crypto/cipher/libsrtp.aes_cbc.o
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Xclang'
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Xclang'
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Xclang'
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-add-plugin'
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Xclang'
arm-none-linux-gnueabi-gcc: error: find-bad-constructs: No such file or directory
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-fcolor-diagnostics'
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Wheader-hygiene'
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Wstring-conversion'
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-target'
arm-none-linux-gnueabi-gcc: error: arm-linux-gnueabihf: No such file or directory
arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-no-integrated-as'

解决方案

i also got this problem but it was because of the exports related to compiler choices (CC, CXX, etc.). Indeed this makes you faulty since -Xclang is not recognized by gcc.

Here is a method i used to try to compile. However, it seems that webrtc trunk is moving fast and it is no more working these last days. The biggest change that is related to your problem and the suggestion of 9dan : you need to say that you want to target android (and linux) and for this you need android_tools. But now, it is not fetched from webrtc, you should get the one from chromium.

Here is a summary of the install process.

System requirements:

Prefer a virtualized Lubuntu14.04 64bit on at least 30Gb virtual drive space and 8GbRAM :

_Lubuntu is fast to use when virtualized and it is based on ubuntu which is necessary since installation scripts rely on ubuntu software packages names
_64bit is necessary since scripts like install-build-deps.sh expect 64bit system and install specific 32bit libraries
_30Gb at least because standard (non cross compiling) webrtc requires at least 10Gb but when adding all cross compiling stuff, drive space explodes !
_8GbRAM to be able to compile and link everything

Then, from this host, here is the install process:

basic preliminary setup... supposing that no variables discussed later have already been exported

First install the essential packages to be able to fetch data and play with java :

// ensure all required depot are ready
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
// install most essential packages prior to fetching
sudo apt-get install openjdk-7-jdk git subversion

initial Webrtc fetch

Create a directory to fetch and go

mkdir WebRTC
cd WebRTC
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=<location of depot_tools>:"$PATH" // example : export PATH=/home/testing/WebRTC/depot_tools:"$PATH"
export JAVA_HOME=<location of Java SE 6 - JDK>  // example : export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
gclient config http://webrtc.googlecode.com/svn/trunk 
gclient sync --force

Note 0: sometime it fails saying gcc, pkg-config, etc have not been found. This often occurs on a fresh install where plenty of packages are missing. Fortunately a script should have already been downloaded :

trunk/built/install-build-deps.sh 

Run it to install all required packages and rerun

gclient sync --force

add all necessary android sdk&ndk that are required to target arm systems

echo "target_os = ['android', 'unix']" >> .gclient
gclient sync
cd trunk
source ./build/android/envsetup.sh
export GYP_DEFINES="$GYP_DEFINES OS=android"
gclient runhooks

Note 1: the android tools are no more directly available with webrtc. It is recommended to use the one from chromium. then, in Webrtc folder or another one (example, the original location : trunk/third_party/).

cd myTargetDirectory // example cd trunk/third_party/
git clone https://chromium.googlesource.com/android_tools

Once android_tools are fetched, configure project to see it. Edit :

trunk/chromium/src/third_party/openmax_dl/dl/dl.gyp

and add the required variable android_ndk_root by adding the following line in the 'variables' section at the beginning of the file:

'android_ndk_root':'<WebRTCfolder>/trunk/third_party/android_tools/ndk/',
example   'android_ndk_root':'/home/testing/WebRTC/trunk/third_party/android_tools/ndk/',

you can also export ANDROID_NDK_ROOT in your .bashrc

export ANDROID_NDK_ROOT=<WebRTCfolder>/trunk/third_party/android_tools/ndk/
example export ANDROID_NDK_ROOT=/home/testing/WebRTC/trunk/third_party/android_tools/ndk/

prepare cross compile for armv7a based platform

// install all necessary packages
cd trunk
./build/install-build-deps.sh --arm
./build/install-build-deps-android.sh

/* => after different experiment, i used the above command, but i guess it is not absolutely necessary from a very clean install. Anycase, if done, command "./build/install-build-deps.sh --arm" should be used after in order to exchange some cross compiler packages (mainly in order to keep g++-arm-linux-gnueabihf and gcc-arm-linux-gnueabihf installed) */

./build/linux/install-arm-sysroot.py
export GYP_CROSSCOMPILE=1 /* => i used it but i ask myself if it is still necessary since an automatic declaration is performed later on.*/

export GYP_DEFINES="OS=linux target_arch=arm arm_version=7 arm_use_neon=1"
// other options like  arm_fpu=vfpv3-d16 arm_float_abi=softfp are set by default, actually, even arm_vervion=7 and use_neon=1 */

Here, the target is linux arm so this should be enough but if targetting android, it may be necessary to define the following variables

export ANDROID_SDK_VERSION=19
export GYP_DEFINES="$GYP_DEFINES  android_sdk_version=19"

NOTE 2 : the following exports are often reported on guides and tutorials. However, when used, they bring several problems (unrecognized -Xclang flag, etc.). It seems that they are no more usefull since gyp files automatically adjust those setup ! For me, avoiding them was the only way to get configuration and beginning of compilation work.

export CC=arm-linux-gnueabihf-gcc
export CXX=arm-linux-gnueabihf-g++
export AR=arm-linux-gnueabihf-ar
export CC_host=gcc
export CXX_host=g++

Finally, configure the system before moving to the final compile step

cd ..
gclient runhooks --force
 cd trunk/

Potential error 1 , Solved

The following error appears first : => gyp: Undefined variable android_ndk_root in chromium/src/third_party/openmax_dl/dl/dl.gyp => come back to previous section, you certainly forgot to define android_ndk_root variable in the enlighted file: 'android_ndk_root':'/trunk/third_party/android_tools/ndk/', */

Potential error 2, solved

a relative link problem appears when trying to target trunk/build/linux/pkg-config-wrapper, you can get something similar to this : Updating projects from gyp files... /bin/sh: ../../../build/linux/pkg-config-wrapper: No such file or directory gyp: Call to '../../../build/linux/pkg-config-wrapper "/media/workspace/lib/webrtc/trunk/arm-sysroot" "arm" --libs-only-L --libs-only-other nss' returned exit status 127. while loading dependencies of trunk/all.gyp while trying to load trunk/all.gyp Error: Command /usr/bin/python trunk/build/gyp_chromium --depth=trunk trunk/all.gyp -Dextra_gyp_flag=0 returned non-zero exit status 1 in /media/workspace/lib/webrtc => if you want to solve this problem for all files having this error, look for wrong files with :

grep -Ir --exclude=\*.{c,h} "../../../build/linux/pkg-config-wrapper" *

and replace related relative path portion in pkg config line (at the beginning of each of the found files : 'pkg-config': 'trunk/build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',

gclient runhooks --force

final compile step

cd trunk
ninja -C out/Release/
ninja -C out/Debug/ // if required

an idea : sudo apt-get install gcc-arm-linux-androideabi you should target third_party/android_tools/ndk/platforms/android-XXX/arch-arm/usr/include/sys/

// if having problems with clang, it can be desactivated with this additionnal option (rerun gclien runhooks after)

export GYP_DEFINES="$GYP_DEFINES clang=0"

这篇关于WebRTC技术建设的手臂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆