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

`clean' has both : and :: entries.  Stop.

 
 
我也遇到了相同的问题,不过经过一步步排查,是因为在libavfilter目录中的Makefile的末尾处多了 Clean 这个玩意儿 将其注释掉或者删掉就可以了
 
 
恢复改方法
/libavutil/libm.h:183:40: error: static declaration of 'truncf' follows non-static declaration
 
libm.h的static方法删除掉
 
/*#define av_restrict restrict*/
#define restrict
 
 
 file included from jni/ffmpeg/libavcodec/aacdec.c:82:0:
jni/ffmpeg/libavcodec/../libavutil/float_dsp.h:150:50: error: expected ';', ',' or ')' before 'v1'
jni/ffmpeg/libavcodec/aacdec.c: In function 'apply_mid_side_stereo':
jni/ffmpeg/libavcodec/aacdec.c:1746:29: error: 'AVFloatDSPContext' has no member named 'butterflies_float'
make: *** [obj/local/armeabi/objs/avcodec/aacdec.o] Error 1
 
 
c、修改jni/ffmpeg/config.h下的 
#define avrestrict restrict为#define restrict

这个应该改为 #define av_restrict

 
 
stdlib 的错误
 /home/usr/android-ndk-r9/platforms/android-18/arch-arm/usr/include/stdlib.h:54:14: error: expected identifier or '(' before 'void'
/home/usr/android-ndk-r9/platforms/android-18/arch-arm/usr/include/stdlib.h:54:14: error: expected ')' before numeric constant
 
--extra-cflags="-I${NDK_ROOT}/platforms/${PLATFORM}/arch-arm/usr/include -fPIC -DANDROID -std=c99" \
添加了I,应该是stdlib的头文件没有找对导致的
 
 
 

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 <time.h> 替换为 #include <sys/../time.h>
 
 
undefined reference to 'inflateReset'
在libAvcodec的mk文件里做修改、
参考
http://blog.sina.com.cn/s/blog_5c4dd3330100mpdx.html
 
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES :=        \
    $(LOCAL_PATH)        \
    $(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_LDLIBS := -lz
LOCAL_STATIC_LIBRARIES := $(FFLIBS)

LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)
 
/home/wjh/fox/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: /home/wjh/fox/android-ndk-r9c/samples/player/obj/local/armeabi/libavcodec.a(log2_tab.o): multiple definition of 'ff_log2_tab'
/home/wjh/fox/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/wjh/fox/android-ndk-r9c/samples/player/obj/local/armeabi/libavformat.a(log2_tab.o): previous definition here
/home/wjh/fox/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: /home/wjh/fox/android-ndk-r9c/samples/player/obj/local/armeabi/libavutil.a(log2_tab.o): multiple definition of 'ff_log2_tab'
/home/wjh/fox/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/wjh/fox/android-ndk-r9c/samples/player/obj/local/armeabi/libavformat.a(log2_tab.o): previous definition here
 
去掉libavforma里Android.mk里的zlib
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES :=        \
    $(LOCAL_PATH)        \
    $(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_CFLAGS += -include "string.h" -Dipv6mr_interface=ipv6mr_ifindex
#LOCAL_LDLIBS := -lz
#LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)
 
 
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
 
------------------------------------------
 
-------------------------------------------

buntu12.10 64位 + android-ndk-r9 编译ffmpeg遇到的问题的更多相关文章

  1. ubuntu12.10+NDK r9 编译 ffmpeg 的一些参考资料Perhaps you should add the directory containing `libssl.pc'

    首先入门级的 编译宝典: https://trac.ffmpeg.org/wiki/CompilationGuide/Android http://www.roman10.net/how-to-bui ...

  2. 64位 CentOS NDK 编译 FFMPEG

    64位 CentOS NDK 编译 FFMPEG 一.           参考文章: http://www.cnblogs.com/baopu/p/4733029.html http://www.c ...

  3. openfl使用64位的ndk时,编译报错的问题!

    当使用64位的ndk时,如果使用openfl test android运行android测试,应该会出现 arm-linux-androideabi-g++:找不到这个命令的错误. 原因是,haxel ...

  4. Android NDK r9的配置与使用

    Android NDK 配置: 网上有很多教程,但大部分是旧版本的内容,最新版本的已经改变,为了让大家少走弯路,在这里针对r9的配置进行记录分享. 要玩NDK,你或多或少要用到以下一些东西,所以先做一 ...

  5. Android NDK R9 安装配置 无需Cygwin

    转自:http://www.cr173.com/soft/66623.html NDK是一个工具集,可让您实现您的应用程序使用本机代码的语言,如C和C + +.Android NDK 是在SDK前面又 ...

  6. 求助下 Ubuntu 15.10(64 位)下安装 pyspider 下的问题 - V2EX

    https://www.v2ex.com/t/279405 求助下 Ubuntu 15.10(64 位)下安装 pyspider 下的问题 - V2EX pip 更新到最新 sudo apt inst ...

  7. Android 环境下编译FFmpeg

    Android 环境下编译FFmpeg 开发环境:Ubuntu 12.04.2 LTS , android-sdk-linux, android-ndk-r8e 一 .X264 编译 1.    X2 ...

  8. android NDk环境编译总结

    首先,这篇文章的撰写是基于很多前人的优秀的帖子,感谢他们的分享让我能够学习这么多的知识.谢谢 Android NDK开发环境的搭建 前言: Android 上,应用程序的开发,大部分基于 Java 语 ...

  9. 64位ubuntu下重新编译hadoop2.2流水账

    hadoop官方网站中只提供了32位的hadoop-2.2.0.tar.gz,如果要在64位ubuntu下部署hadoop-2.2.0,就需要重新编译源码包,生成64位的部署包.建议以下操作使用roo ...

随机推荐

  1. 经典问题:查询有多少段区间和等于k值

    题目连接 题意:在大小为1e5以内的数组求存在多少个区间和的值等于k的次方 这种题很经常见,总是想着用两个for循环解决,但是一定会超时. 题解:算出前缀和,使用map去查找mp[sum[i+1]-t ...

  2. MQTT再学习 -- 漫谈MQTT协议

    先占楼,稍后再讲.先搭建好MQTT服务器和客户端

  3. MPAndroidChart Wiki(译文)~Part 1

    1. 基础入门 1.1 添加依赖 Gradle 工程添加依赖 (推荐使用) 项目级build.gradle中添加: allprojects { repositories { maven { url & ...

  4. HDU 2268

    http://acm.hdu.edu.cn/showproblem.php?pid=2268 小学四年级应用题,让我找回了儿时的快乐... #include <iostream> #inc ...

  5. swift实现label换行

    so easy 换行的实质为在字符串中添加"\n" so, understand???

  6. lx 与cd 的计算方法

    Candela to lux calculation with distance in meters The illuminance Ev in lux (lx) is equal to the lu ...

  7. HDU - 5628:Clarke and math (组合数&线性筛||迪利克雷卷积)

    题意:略. 思路:网上是用卷积或者做的,不太会. 因为上一题莫比乌斯有个类似的部分,所以想到了每个素因子单独考虑. 我们用C(x^p)表示p次减少分布在K次减少里的方案数,由隔板法可知,C(x^p)= ...

  8. stm32寄存器版学习笔记08 DMA

    DMA(Direct Memory Access),直接存储器访问.DMA传输方式无需CPU直接控制传输,通过硬件为RAM与I/O设备开辟一条直接传送数据的通路,使CPU效率大大提高.stm32f10 ...

  9. Luogu3576 POI2014 MRO-Ant colony 【树形DP】*

    Luogu3576 POI2014 MRO-Ant colony The ants are scavenging an abandoned ant hill in search of food. Th ...

  10. Ubuntu 忘记密码后重置密码

    摘自百度贴吧:http://tieba.baidu.com/p/2869755075 选后会再出现一个选单,让你选取,请选取:root - Drop to root shell prompt 选完后, ...