WebRtc study Note 1 download, compile, webrtcarch in Arch linux

Source: Internet
Author: User
Tags arch linux

WebRtc study Note 1 download, compile, webrtcarch in Arch linux


In the first sentence, I think it is the most important:

Note: the basic work of WebRtc source code compilation is turning over the wall! Make sure that you have Git Svn and other commands in the command line to access google's server. Otherwise, various exceptions may occur.


Refer:

Https://groups.google.com/forum! Forum/discuss-webrtc

And other websites



My environment is ArchLinux X64,


Wall flip method:
1. Various VPN
2. Modify hosts
3. Various proxy servers
...



Used Software Package
Jdk 1.6 (jdk1.7 cannot be compiled), svn, git


Environment variable:
/// Etc/profile


# Java
Export JAVA_HOME =/opt/jdk
Export JRE_HOME =$ {JAVA_HOME}/jre
Export PATH = $ PATH :$ {JAVA_HOME}/bin :$ {JRE_HOME}/bin
Export CLASSPATH =./:$ {JAVA_HOME}/lib :$ {JRE_HOME}/lib


# Android
Export ANDROID_SDK_ROOT =/opt/android-sdk
Export ANDROID_NDK_ROOT =/opt/android-ndk
Export PATH = $ PATH :$ {ANDROID_SDK_ROOT }:$ {ANDROID_SDK_ROOT}/tools :$ {ANDROID_SDK_ROOT}/platform-tools :$ {ANDROID_NDK_ROOT}


# Ant
Export ANT_HOME =/opt/apache-ant
Export PATH = $ PATH: $ {ANT_HOME}/bin
Export SVN_EDITOR = vim


Export classpath =./: $ {JAVA_HOME}/lib/dt. jar: $ {JAVA_HOME}/lib/tools. jar



//////



1 install depot_tools (gclient)


$ Cd/opt
$ Mkdir depot_tools
$ Cd depot_tools
$ Git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Add depot_tools to $ PATH.

Export PATH = $ PATH:/opt/depot_tools, added to/etc/profile, save entering



Download Code
1. Synchronize WebRTC code
1. Create the WebRTC directory
Mkdir WebRTC
Cd WebRTC


2. initialize gclient
Gclient config http://webrtc.googlecode.com/svn/trunk

3. Target System Configuration

Echo "target_ OS = ['android', 'unix ']">. gclient


4. sync code. After an error occurs, run the following line repeatedly until all synchronization is completed ,.
Gclient sync -- force

An error is found during synchronization. Check it carefully and find the error,

I failed to use the firewall and could not directly access the server.



(This is a tough step, including NDK, SDK, and other tools. After I started ,)


NOTE: If Still working on or other information appears for a long time, do not interrupt or close it. It is Still running. If it is interrupted, all previously downloaded items will be deleted, then you have to sync it again.




3) Compile the code


1. Set the compiling environment


1. cd trunk
2. source./build/android/envsetup. sh
3. export GYP_DEFINES = "$ GYP_DEFINES OS = android"


2. Download the packages or tools on which compilation depends (here a lot of things will be downloaded, such as Ant .)


// This compilation dependency package in Ubuntu is directly installed. Ubuntu has become a de facto standard.
// For other Linux systems, check the packages in this file and install them manually.
// Most of my ArchLinux packages have been installed. I have missing the ncurses package and pacman installs it manually.
/// Build/install-build-deps.sh (under the trunk directory)


3. gclient runhooks (download the required build File and other information)


4. Compile (in the trunk directory)


Compile Debug: ninja-C out/Debug

At the beginning, I encountered a compilation error and found that I used jdk 1.7 and changed it to 1.6 for re-compilation.

Ninja-C out/Debug-t clean


Compile the Release version: ninja-C out/Release




Based on the above steps, if the network can normally access the google service, there will generally be no other problems. If there is a problem, don't be afraid, generally, you can find the cause based on the error message. If you look at the error information carefully, you will be able to find the problem. If you do not know about google.


After the compilation is successful, you can see the corresponding demo installation package in the out/Debug or out/Release directory, such as the Debug directory, where there is a AppRTCDemo-debug.apk and WebRTCDemo-debug.apk
The two packages can be installed on the Android device after being signed.




The code of the AppRTCDemo program is trunk/talk/examples/android /.




Note: What is the difference between AppRTCDemo and WebRTCDemo?


WebRTCDemo is just a point-to-point in the LAN. If you know the ip address of the other party, you can call it. If you do not need a server, set the ip address of the other party to startCall.

AppTRCDemo requires servers, which can be LAN or WAN




Libtinfo. so.5 is not found during compilation.


Error while loading shared libraries: libtinfo. so.5: cannot open shared object file: No such file or directory


Libtinfo. so.5 solution is missing
Solution:
Install the ncurses package (ncurses-libs-5.6)


Ln-s/usr/lib/libncurses. so.5/lib/libtinfo. so.5


This article is a summary of my WebRtc study notes. I will keep updating it and hope it will be helpful to my friends who are preparing to study WebRtc.


Local Address: http://blog.csdn.net/hpccn/article/details/38562019, reproduced please express.





When compiling the Linux kernel, the _ LINUX_ARM_ARCH _ is not defined error occurs.

Check the arch/arm/Makefile file, which contains definitions of _ LINUX_ARM_ARCH.

Do you want to cross-compile linux on the arm platform? If yes, copy the arm CPU-related configuration file under the arch/ARM/configs/directory to the kernel root directory and rename it as. config:
1, cp arch/arm/config/xxx_defconfig. config
2. make menuconfig and select the desired configuration.
3, make

In linux make ARCH = arm CROSS_COMPILE = arm-926ejs-linux-zImage compilation has the following error?

Your cross-compiler settings are incorrect. Generally, they are arm-linux-gcc. What name did you give yourself?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.