android ffmpeg移植编译错误汇总


   

以下是在移植ffmpeg过程中出现的问题汇总,如果博友有碰到其他的问题也加入此博客作为汇总
1、
出现找不到tmp文件的问题
arm-linux-androideabi-gcc.exe: error: /tmp/ffconf.Ao14GJDP.c: No such file or directory
arm-linux-androideabi-gcc.exe: fatal error: no input files
这个问题是因为cygwin的路径起点与交叉编译工具链的路径起点不一致,需要在configure进行之前将configure内用到的TMPDIR变量设置为cygwin中某个文件夹在windows中的路径。
即:export TMPDIR=C:/cygwin/tmp或者其它路径。
2、
在编译过程可能会出现各种 error: undefined reference to“xxxxx”的问题,请务必要一个个解决,网上流传的在mk里加入LOCAL_ALLOW_UNDEFINED_SYMBOLS := true可能编译通过但是在用上so库运行时会出现各种错误
3、
make: execvp: /home/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/arm-linux-                      androideabi-g++: Argument list too long
在相应用配置文件进而加入如下配置就好
LOCAL_SHORT_COMMANDS := true
4、

C:\cygwin64\tmp\ccdxSDSg.s: Assembler messages:
C:\cygwin64\tmp\ccdxSDSg.s:356: Error: instruction not supported in Thumb16 mode -- `adds r3,r1,r0,lsr#31'
C:\cygwin64\tmp\ccdxSDSg.s:357: Error: selected processor does not support Thumb mode `itet ne'
C:\cygwin64\tmp\ccdxSDSg.s:358: Error: Thumb does not support conditional execution
C:\cygwin64\tmp\ccdxSDSg.s:359: Error: Thumb does not support conditional execution
C:\cygwin64\tmp\ccdxSDSg.s:360: Error: Thumb does not support conditional execution
C:\cygwin64\tmp\ccdxSDSg.s:462: Error: instruction not supported in Thumb16 mode -- `adds r3,r1,r0,lsr#31'
C:\cygwin64\tmp\ccdxSDSg.s:463: Error: selected processor does not support Thumb mode `itet ne'
C:\cygwin64\tmp\ccdxSDSg.s:464: Error: Thumb does not support conditional execution
C:\cygwin64\tmp\ccdxSDSg.s:465: Error: Thumb does not support conditional execution
C:\cygwin64\tmp\ccdxSDSg.s:466: Error: Thumb does not support conditional execution
/cygdrive/d/worktool/android-ndk-r10c/build/core/build-binary.mk:447: recipe for target '/cygdrive/e/ffmpeg/ffmpeg2/obj/local/armeabi/objs/avfilter/af_dcshift.o' failed
make: *** [/cygdrive/e/ffmpeg/ffmpeg2/obj/local/armeabi/objs/avfilter/af_dcshift.o] Error 1
在相应用配置文件进而加入如下配置就好
LOCAL_ARM_MODE := arm

5、
android-ndk-r8d/build/core/build-binary.mk:41: *** target file 

`clean' has both : and :: entries.  Stop.
 
 
我也遇到了相同的问题,不过经过一步步排查,是因为在libavfilter目录中的Makefile的末尾处多了 Clean 这个玩意儿 将其注释掉或者删掉就可以了
 #clean::
#$(RM) $(CLEANSUFFIXES:%=libavfilter/libmpcodecs/%)
6、
libavformat/libavformat.a(log2_tab.o):(.rodata+0x0): multiple definition of `ff_log2_tab'
libavcodec/libavcodec.a(log2_tab.o):(.rodata+0x0): first defined here
libavutil/libavutil.a(log2_tab.o):(.rodata+0x0): multiple definition of `ff_log2_tab'
libavcodec/libavcodec.a(log2_tab.o):(.rodata+0x0): first defined here
移植ffmpeg的时候如果遇到这样的情况,在两个文件的Makefile中删掉一个log2_tab.o文件就可以了
打开libavformat的Makefile文件
 
       lfg.o                                                            \
       lls1.o                                                           \
       lls2.o                                                           \
       log.o                                                            \
#      log2_tab.o                                                       \
       mathematics.o                                                    \
       md5.o                                                            \
       mem.o                                                            \                                                   \
 
删除文件,如果是多行,就不要用注释了,直接删除掉
 
 
修改libavcodec的Makefile
OBJS-$(CONFIG_RDFT)                    += rdft.o $(RDFT-OBJS-yes)
OBJS-$(CONFIG_SHARED)                  += log2_tab.o
OBJS-$(CONFIG_SINEWIN)                 += sinewin.o

7、

jni/ffmpeg/libavutil/parseutils.c:541:15: error: storage size of 'dt' isn't known
jni/ffmpeg/libavutil/parseutils.c:634:20: error: variable 'dt2' has initializer but incomplete type
jni/ffmpeg/libavutil/parseutils.c:634:38: error: invalid type argument of unary '*' (have 'int')
jni/ffmpeg/libavutil/parseutils.c:634:54: error: invalid type argument of unary '*' (have 'int')
jni/ffmpeg/libavutil/parseutils.c:634:23: error: storage size of 'dt2' isn't known

这个问题的解决方法是:打开 libavutil/parseutils.h,把 #include 替换为 #include
  http://blog.csdn.net/gavin_liang/article/details/26281331


你可能感兴趣的:(android ffmpeg移植编译错误汇总)