Ubuntu 12.04.4 lts linphone-android compile record

Source: Internet
Author: User
Tags git clone automake linphone

Operating system: Ubuntu 12.04.4 LTS 32-bit

Linphone-android version: Android:versioncode= "2211"

Preparatory work:

1, first install git to obtain linphone-android source code

ykx@ykx:~$ sudo apt-get install git

Get the Linphone-android source code only use Git's basic functionality, so use Apt-get to install it.

2, access to Linphone-android source code

ykx@ykx:~/workspace$ git clone git://git.linphone.org/linphone-android.git--recursive | Tee Git.log

Note that you need to add "--recursive" parameters, otherwise not all, after the successful download is probably not 360M, if you add git file, probably 638M, the size of the folder are as follows:

408K./tests

1.0M./sample

5.3M./res

352K./libs

248M./submodules

20K./patches

383M./.git

860K./src

204K./liblinphone_tester

16K./jni

638M.

Tee Git.log says I've got the information that git downloaded when it's in the Git.log file.

3, the installation of dependent libraries

The Readme file in the Linphone-android directory is related to the compilation environment and steps, so it is a good idea to read the file first and have a general understanding of the compilation process. Here is my environment configuration:

A, JDK 1.7.0_51

B, Android SDK R22.6-linux

C, Android NDK R9d-linux

The above three Google has a detailed installation tutorial, here is not to repeat. Just talk about the configuration of my environment variables:

After the installation, I changed the/etc/environment and/etc/profile two files, the path of the three are written in, note that the/etc/environment is best not to use $java_home such reference variables, all write detailed path. /etc/profile, it doesn't matter.

There is also the need to change the three installation path access rights, otherwise the compilation process has no access to cause failure.

For example, to change JDK permissions, the following actions are:

ykx@ykx:/usr/src/jdk1.7.0_51$ chmod 777 *-R

Indicates that the permissions for all files and folders in the current directory are changed to 777 (read/write/run).

Changing the SDK and NDK access rights operation is similar.

D, installation yasm, NASM, curl, Ant and Autotools (autoconf, Automake, aclocal, Libtoolize, Pkgconfig)

This write relies on using Apt-get install automatically, note Autotools installation:

root@ykx:/home/ykx# Apt-get Install autoconf

root@ykx:/home/ykx# Apt-get Install Automake

root@ykx:/home/ykx# Apt-get Install Libtool

root@ykx:/home/ykx# Apt-get Install Pkg-config

Aclocal will be installed automatically when the Automake is installed.

The dependencies mentioned in the Readme file are these, and you can use the which command to see if the installation was successful.

E, after the above, follow the steps of the Readme, I started make. Like many things, life is a bitch, and when you think you're going to be successful, she's always making fun of you.

I have failed.

View the output of make, get LWP, install LWP, and then execute make clean command, then make, again failed, this hint cannot find LWP::P Rotocol::https, put it on, re clean and make,done!

To talk about this error resolution process, for people familiar with Linux and Perl, this problem is not called a problem, but I am small white, so still record.

LWP is a Perl module, the specific features I am not clear, interested people to their own Baidu.

root@ykx:/home/ykx# Perl-mcpan-eshell

Then I needed to configure something, and I was all the way down the road. Then enter CPAN command line mode

cpan> install BUNDLE::LWP; installation LWP

cpan> Install LWP::P Rotocol::https; Installation LWP::P Rotocol::https

Exit is OK when you are done.

4, the final make on it, the resulting. So file will be placed in the Libs directory. Linphone-android is used to manage and generate apk files through ant, if you need to develop under eclipse, you need to take the source code, library files and corresponding configuration files out, and build another Android project. I don't say it in detail, put my classpath file on it.

<?xml version= "1.0" encoding= "UTF-8"?> <classpath> <classpathentry kind= "src" path= "src"/> Classpathentry kind= "src" path= "Submodules/linphone/coreapi/help/java"/> <classpathentry excluding= "org/" Linphone/mediastream/mediastreameractivity.java "kind=" src "path=" submodules/linphone/mediastreamer2/java/src " > <classpathentry kind= "src" path= "Submodules/externals/axmlrpc/src/main/java"/> <classpathentry Kind = "src" path= "Submodules/linphone/java/common"/> <classpathentry kind= "src" path= "submodules/linphone/java/"  Impl "/> <classpathentry kind=" src "path=" submodules/linphone/java/j2se "/> <classpathentry kind=" src " Path= "Gen"/> <classpathentry exported= "true" kind= "con" path= "Com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" /> <classpathentry exported= "true" kind= "con" path= "Com.android.ide.eclipse.adt.DEPENDENCIES"/> <clas Spathentry exported= "true" kind= "Con" path= "CoM.android.ide.eclipse.adt.libraries "/> <classpathentry kind=" Output "path=" bin/classes "/> </classpath& Gt

Finally, make a mistake when you first made it in Ubuntu, prompting Bin/bash^m: Bad interpreter: no file or directory

This is because at first I was under the Windows Linphone source code, and looked at some files, and Windows and Linux line breaks, the equivalent of implicitly modifying the file, resulting in a run error.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/

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.