Clarify the relationship between linphone dependent libraries before transplantation. This is generally the key to porting, and the key is the cross compiler of the target platform. The libraries that the linphone-3.1.0 depends on are as follows: speex (and libogg dependent) libosip2-3.1.0libeXosip2-3.1.0readline (optional) Build a cross-compilation environment. Create a directory libs under the/home/cjx directory and decompress the downloaded source code package to this directory. Find./-n
Clarify the relationship between linphone dependent libraries before transplantation. This is generally the key to porting, and the key is the cross compiler of the target platform.
The Library of linphone-3.1.0 dependencies is as follows:
Speex (dependent on libogg again)
Libosip2-3.1.0
LibeXosip2-3.1.0
Readline (optional)
Build a cross-compilation environment. Create a directory libs under the/home/cjx directory and decompress the downloaded source code package to this directory.
Find./-name '* .tar.gz'-exec tar zxvf {}\; // decompress all source files at a time
Cd/home/cjx/libs
Cd ncurses-5.7/
./Configure -- prefix =/install -- host = arm-linux -- with-gnu-ld -- with-shared
Make
Make install DESTDIR =/home/cjx/source/linphone-arm/build/
Cd ..
Cd readline-6.1/
./Configure -- prefix =/install -- host = arm-linux -- with-gnu-ld -- disable-static
Make
Make install DESTDIR =/home/fzu/source/linphone-arm/build/
Cd ..
Cd libosip2-3.3.0/
./Configure -- host = arm-linux -- prefix =/install -- with-gnu-ld -- disable-static
Make
Make install DESTDIR =/home/cjx/source/linphone-arm/build/
Cd ..
Cd libogg-1.2.0/
./Configure -- host = arm-linux -- prefix =/install -- with-gnu-ld
Make
Make install DESTDIR =/home/cjx/source/linphone-arm/build/
Cd ..
Cd speex-1.2rc1/
. /Configure -- prefix =/install -- host = arm-linux -- with-gnu-ld -- disable-static -- enable-fixed-point -- enable-arm-asm -- with-ogg- libraries =/home/cjx/source/linphone-arm/build/install/lib/-- with-ogg-nodes des =/home/cjx/source/linphone-arm/build/install /include/
Make
Make install DESTDIR =/home/cjx/source/linphone-arm/build/
Cd ..
Cd libeXosip2-3.1.0/
. /Configure OSIP_CFLAGS =-I/home/cjx/source/linphone-arm/build/install/include/OSIP_LIBS = "-L/home/cjx/source/linphone-arm/build /install/lib-losip2-losipparser2 "-- prefix =/install -- host = arm-linux
Cp ../libosip2-3.3.0/src/osipparser2/. libs/libosipparser2.la/home/fzu/source/linphone-arm/build/install/lib/
Make
Make-k install DESTDIR =/home/fzu/source/linphone-arm/build/
Cd ..
Cd linphone-3.3.2/
Export ARM_INSTALL_TREE =/home/cjx/source/linphone-arm/build/
. /Configure -- host = arm-linux -- prefix =/install -- with-gnu-ld -- disable-static -- disable-glib -- with-osip =/home/cjx/source/linphone -arm/build/install/-- with-readline = $ ARM_INSTALL_TREE/install SPEEX_CFLAGS = "-I $ ARM_INSTALL_TREE/install/include" SPEEX_LIBS = "-L $ ARM_INSTALL_TREE/install/lib- lspeex-lspeexdsp "placement ="-I $ ARM_INSTALL_TREE/install/include "OSIP_LIBS ="-L $ ARM_INSTALL_TREE/install/lib-losip2-leXosip2-losipparser2 "-- disable-video -- disable-gtk_ui
Make
Make-k install DESTDIR =/home/cjx/source/linphone-arm/build/
If an error occurs during compilation, check whether the input is correct. Www.linuxidc.com I used to write a link library lspeex into lspeek when compiling linphone. The error message is as follows:
Collect2: ld returned 1 exit status
Make [5]: *** [libmediastreamer. la] Error 1
Make [5]: Leaving directory '/home/fzu/linux/linphone/libs/linphone-3.3.2/
Mediastreamer2/src'
Make [4]: *** [all] Error 2
Make [4]: Leaving directory '/home/fzu/linux/linphone/libs/linphone-3.3.2/
Mediastreamer2/src'
Make [3]: *** [all-recursive] Error 1
Make [3]: Leaving directory '/home/fzu/linux/linphone/libs/linphone-3.3.2/
Mediastreamer2'
Make [2]: *** [all] Error 2
Make [2]: Leaving directory '/home/fzu/linux/linphone/libs/linphone-3.3.2/
Mediastreamer2'
Make [1]: *** [all-recursive] Error 1
Make [1]: Leaving directory '/home/fzu/linux/linphone/libs/linphone-3.3.2'
Make: *** [all] Error 2
As a result, I paid a heavy price for my carelessness and spent dozens of times (several days) of others to identify this error.
For other possible errors, it may be that some libraries are not installed properly (on the x86 platform, you may be prompted to install g ++ (A c ++ compiler) and intltool ), based on the error prompts, you can easily find out the cause and solve the problem easily. You can install the prompted library. Another problem is that errors may occur when compiling libeXosip and linphone. This does not affect our migration (if-k is specified during installation, the error is ignored, this can be found in configure syntax ). For example, the following error occurs when compiling the libeXosip2-3.1.0:
/Bin/sed: can't read/install/lib/libosipparser2.la: No such file or directory
Libtool: link: '/install/lib/libosipparser2.la' is not a valid libtool archive
Make [2]: *** [libeXosip2.la] Error 1
Make [2]: Leaving directory '/home/fzu/linux/linphone/libs/libeXosip2-3.1.0/src'
Make [1]: *** [all-recursive] Error 1
Make [1]: Leaving directory '/home/fzu/linux/linphone/libs/libeXosip2-3.1.0'
Make: *** [all] Error 2
In addition,./confiugre -- prefix =/install... is installed using the directory specified in make install as the root directory. In this compilation, all the compiled libraries and executable files are stored in the/home/cjx/source/linphone-arm/build/install directory.
After compilation, download it to the Development Board.