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. LeetCode OJ:Jump Game II(跳跃游戏2)

    Given an array of non-negative integers, you are initially positioned at the first index of the arra ...

  2. js 滚到页面顶部

    一.滚到顶部,且滚动中,用户滚动鼠标无效 <style> .div1, .div2, .div3, .div4 { height: 400px; width: 400px; } .div1 ...

  3. jQuery动画与特效

    参考:jQuery权威指南jQuery初步jQuery选择器jQuery操作domjQuery操作dom事件jQuery插件jQuery操作AjaxjQuery动画与特效jQuery实现导航栏jQue ...

  4. mysql服务1067错误:修改mysql可执行文件路径

    今天遇到mysql服务1067错误的问题,设置使用系统账户也无法启动mysql,后面认证看了系统的配置信息,发现启动文件也就是mysql安装路径是之前的(也说明之前安装mysql,没去卸载直接安装新的 ...

  5. redis安装配置记录

    环境:CentOS7,最小化安装 安装gcc wget # yum upgrade # yum install gcc # yum install wget 下载并安装redis # wget htt ...

  6. 【LeetCode 100_二叉树_遍历】Same Tree

    解法一:递归 bool isSameTree(TreeNode* p, TreeNode* q) { if (p == NULL && q == NULL) return true; ...

  7. web服务器无法显示font-awesome字体图标

    今天遇到了在本地运行网页 一切调用的额font的小图标都OK的,但是把网页发布到tomcat服务器上面就不行了 之后百度了下,找到了解决方法,遂记录下,方法如下: 在web.xml 文件中加上: &l ...

  8. VPS安装metasploit-framework

    一.安装过程 在/etc/apt/sources.list添加kali源: root@localhost:~# cat >> /etc/apt/sources.list <<  ...

  9. Python中常用的内值方法

    1)min(2,4)            ## 求最小值        2)max(2,4)            ## 求最大值3)sum(range(1,100,2)) ## 求和4)枚举:返回 ...

  10. OK335x mksd.sh hacking

    #! /bin/sh # mk3PartSDCard. # Licensed under terms of GPLv2 # 参考文档: # . sfidsk创建可启动分区问题 # http://seg ...