OKMX6Q libx264交叉编译

最开始使用的是最新版x264-snapshot-20171119-2245
配置使用:

./configure --host=arm-linux --cross-prefix=arm-linux- --enable-shared
make
make install

编译成功了,下一步重新编译ffmpeg:

./configure --cc=arm-linux-gcc --arch=arm --disable-altivec --disable-mmx --disable-mmx2 --enable-cross-compile --prefix=arm-linux- --enable-gpl --enable-libx264 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
make

但是configure阶段时出现ERROR:can't find libx264错误,查看日志可以发现:

undefined reference to `x264_encoder_open'

试了很多种办法都没解决,后来发现ffmpeg是2008年的版本……于是我就找了个附近版本的libx264
我使用的版本是x264-snapshot-20090101-2245
其他版本可以从这下
http://download.videolan.org/pub/videolan/x264/snapshots/

./configure --host=arm-linux --enable-shared

这个版本不支持--cross-prefix-参数,所以手动修改config.mk文件中的CC为arm-linux-gcc就可以了。
之后再编译还是不行,试过多个版本:
2010,2013和2017错误一样,都是configure阶段就不能通过
20090101,,2008和2007错误一样:XXX has no member named 'b_bidir_me'
https://ubuntuforums.org/showthread.php?t=786095&page=13
这篇帖子中说是接口问题,建议用20081001版本,用了之后编译通过。

posted @ 2018-01-14 20:51  可乐咸鱼  阅读(548)  评论(0编辑  收藏  举报