Ubuntu下linphone穿插编译与移植[Linux安全]
本文“Ubuntu下linphone穿插编译与移植[Linux安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
移植前搞清楚linphone依靠库的关系,这个普通是移植工作的关键所在,还有一个关键是目标平台的穿插编译器.
linphone-3.1.0依靠的库以下:
speex(又依靠libogg)
libosip2-3.1.0
libeXosip2-3.1.0
readline(optional)
搭建好穿插编译环境.在/home/cjx 目录下新建目录libs,将下载的源码包解压在该目录下.
find ./ -name '*.tar.gz' -exec tar zxvf {} \;//一次解压全部源文件
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-includes=/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" OSIP_CFLAGS="-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/
若编译时出错时应先查抄各输入是不是有误.www.linuxidc.com我曾经在编译linphone时将一个链接库lspeex写成lspeek,出错提醒以下:
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
后果不可思议,我为了我这次的粗心付出了惨痛的代价,花了别人几十倍(好几天)的时间才将这个错误找出.
至于其他大概呈现的错误,大概是有些库没安装好(在x86平台上,大概会提醒你安装g++(一个c++编译器)、intltool等),这些按照错误提醒可以很轻松的找出缘由,办理的办法也很简单,安装提醒的库便可以了.还有一个就是在编译libeXosip和linphone时会大概出错,这个不用管它,对我们移植没有影响(在安装时指定-k就是忽视错误,这个可以在configure语法中查到).如编译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
别的,./confiugre --prefix=/install ....是以make install 中指定的目录为根目录安装的.在本次编译中,全部编译好的库及可履行文件等都放在/home/cjx/source/linphone-arm/build/install 目录下.
编译完成后,将其下载到开辟板上.
以上是“Ubuntu下linphone穿插编译与移植[Linux安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |