Mediastreamer2-2.8.0 移植笔记

在UBUNTU下

./configure --prefix=/usr  --enable-macsnd=no --enable-video=no --enable-tests

去掉了苹果系统的声卡支持,去掉了视频支持,增加了测试程序


移植到开发板上

./configure --prefix=/phone --host=arm-linux --with-gnu-ld --disable-static  --enable-macsnd=no --enable-video=no --enable-tests --disable-gsm

error: cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation

怎么办?尝试了下其它版本的mediastreaer2,包括2.0和2.5的,都是会出现同样的错误!换个UBUNTU编译说是找不到SPEEX,可我是把交叉编译好的文件就放到指定的文件夹里啊!


第二天:

在INSTALL里看到这么一段话:

Compiling For Multiple Architectures
====================================

You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory.  To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'.  `cd' to the
directory where you want the object files and executables to go and run
the `configure' script.  `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.

   If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory.  After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.

我之前在UBUNTU下编译过,但是并没有清除,估计是有影响的!我在UBUNTU下安装好之后就把那个源码包删掉了,悲剧!这可怎么删啊??!换个UBUNTU再试下吧!鉴于昨天SPEEX没有通过,重头再来,先交叉编译SPEEX再说,免得又提示没有SPEEX。而编译SPEEX之前先编译下依赖的OGG库。还是没有发现SPEEX,不过根据提示再了参数  PKG_CONFIG_PATH=/phone/lib/pkgconfig 就好了,接着又提示没有ORTP的库,靠!再来!!添加ORTP库! 再编译,成功!!呼~


总结


其实整个编译过程并不难,之所以走了这么多弯路应该是在不同环境编译时会产生影响!以后就得注意点了!总结下整个步骤吧!

1)编译OGG库

./configure --prefix=/phone --host=arm-linux --with-gnu-ld --disable-static 

2)编译SPEEX  

./configure --prefix=/phone --host=arm-linux --with-gnu-ld --disable-static --enable-fixed-point --disable-float-api  --with-ogg=/phone

3)编译ORTP库

./configure --prefix=/phone --host=arm-linux --with-gnu-ld --disable-static 

4)轮到主角了MEDIASTREAMER2 

./configure --prefix=/phone --host=arm-linux --with-gnu-ld --disable-static  --enable-macsnd=no --enable-video=no --enable-tests --disable-gsm PKG_CONFIG_PATH=/phone/lib/pkgconfig 


PS:

刚才突然又想明白了一个问题,即最开始出现的那个错误,其实加上参数

PKG_CONFIG_PATH=/phone/lib/pkgconfig 

就可以解决问题!看来问题是出现在配置参数上的!虽然折腾了很长时间但问题还是解决了!




你可能感兴趣的:(VOIP,ubuntu,path,object,include,each,测试)