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. 高射炮打蚊子丨在VS 2017里用C语言写经典的冒泡排序

    ​上一期<高射炮打蚊子丨用Visual Studio 2017写最初级的C语言程序>中,我们用Visual Studio “全宇宙最强IDE”这门大炮,打了“C语言写Hello World ...

  2. centos7环境配置

    CentOS-7-64bit 配置Apache + MySQL + PHP :http://blog.itpub.net/29773961/viewspace-1261417/ 上面教程可以正常安装阿 ...

  3. CentOS7 修改默认时区为 北京时间

    首先同步时间 yum install -y ntpdate ntpdate -u cn.pool.ntp.org 然后设置中国时区(北京时间) timedatectl set-timezone Asi ...

  4. 在微信里面打开链接,显示501 Not Implemented,但是同样的链接在其他浏览器是可以打开的。

    在微信里面打开链接,显示501 Not Implemented,但是同样的链接在其他浏览器是可以打开的. 显示: 还原:该链接在2017年之前微信还是可以访问的. 访问的地址格式是:http://xx ...

  5. ES重要配置

    虽然ES需要的配置很少,但是仍然有些配置需要我们手工去配置,尤其是在产品上线之前. path.data and path.logs cluster.name node.name bootstrap.m ...

  6. jQuery 滑动选项卡jQuery tabslet

    Tabslet   Yet another jQuery plugin for tabs, lightweight, easy to use and with some extra features ...

  7. HBase数据存储

    HRegionServer  HBase的数据文件都存储在HDFS上,格式主要有两种: - HFile:HBase中KeyValue数据的存储格式,HFile是Hadoop的二进制文件,实际上Sto ...

  8. FFmpeg再学习 -- SDL 环境搭建和视频显示

    继续看雷霄骅的 课程资料 - 基于FFmpeg+SDL的视频播放器的制作 一.SDL 简介 参看:WIKI -- Simple DirectMedia Layer 参看:最简单的视音频播放示例9:SD ...

  9. DBSCAN聚类︱scikit-learn中一种基于密度的聚类方式

    一.DBSCAN聚类概述 基于密度的方法的特点是不依赖于距离,而是依赖于密度,从而克服基于距离的算法只能发现"球形"聚簇的缺点. DBSCAN的核心思想是从某个核心点出发,不断向密 ...

  10. 理解Scala中的Extractor

    引言 最近抱着<Programming in Scala>(英文第二版)在死啃Scala.在阅读第26章Extractor时,偶然在Stack Overflow上搜到一个帖子<Sca ...