me@ubuntu:~/Android/Sdk/ndk-bundle/sources/ffmpeg$ ./build_ffmpeg.sh /home/me/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linu-androideabi-gcc is unable to create an executable file. C compiler test failed. If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the [email protected] mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. Makefile:163: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop. Makefile:163: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop. Makefile:163: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop.
报错:C compiler test failed.
NDK:android-ndk-r20-linux-x86_64.zip
FFmpeg:4.1.4 (目前最新)
网上的方法我尝试了个遍,没有成功,什么解锁啦,什么乱七八糟的都试了。
我自己的方法也试了,因为 linux-androideabi-gcc 这个文件在目录中没有,我下载了老版本 NDK(android-ndk-r15c-linux-x86_64.zip),将里面的 linux-androideabi-gcc 复制到相应位置,还是一点效果没有。
![]() | 1 fgodt 2019-07-28 16:04:57 +08:00 用 r12b 来编译吧,相对简单点 |
![]() | 2 pursuer 2019-07-28 19:51:55 +08:00 ![]() 没编译过 ffmpeg,这个是交叉编译吧,报错没办法创建可以执行的程序,交叉编译创建不了 native 可执行程序的。看下怎么交叉编译 ffmpeg ? |
5 hmoe 2019-07-28 21:27:29 +08:00 |
![]() | 6 fgodt 2019-0-28 23:06:04 +08:00 报错看下 ffbuild/config.log 里面的信息,一般是环境配置问题,找不到 gcc 或者什么的。r20 用的 clang 你用低一点的版本才有 gcc |
7 B4a1n 2019-07-28 23:21:58 +08:00 别编译了 试试 apt-get install software-properties-common python-software-properties add-apt-repository ppa:jonathonf/ffmpeg-4 apt-get update apt-get install ffmpeg |
![]() | 8 ReZer0 2019-07-28 23:58:15 +08:00 via Android 我不知道你那是不是有特定依赖一定要编译,不然可以用官网提供的静态文件,下载后直接运行就行,弄个环境变量就能用了。 |
![]() | 9 ReZer0 2019-07-28 23:59:33 +08:00 via Android 就是 5 楼的那个地址。 |
10 xmoiduts 2019-07-28 23:59:53 +08:00 via Android 想当年(三年前)刚买了千万云学生机,想要个 ffmpeg 就到处去找也找不到。后来……静态编译文件真香。 |
11 mumbler 2019-07-29 00:04:08 +08:00 via Android 不用编译,直接用二进制版 https://www.moerats.com/archives/719/ |
![]() | 12 v2zhao 2019-07-29 07:25:13 +08:00 via Android R20 把 gcc 废弃了 只能用 clang,难道你不看 change log? |
13 orannge 2019-07-29 07:38:55 +08:00 你的编译脚本过时了,现在网上大部分教程都是按旧版本来的,用 r20 得改成用 clang 编译。 |
14 binlaten 2019-07-29 08:04:19 +08:00 via Android r20 用的 clang,但是最新的 ffmpeg 不支持 clang 编译。 |
15 blindmt 2019-07-29 09:04:04 +08:00 前几天编译了 ffmpeg,版本是 4.1.4,用的是 r15c,抄 github 上别人的编译脚本一把过,基本没有什么问题。 然后编了一把 libvpx,r15c 编不了,因为是用 clang 编译的,所以弄了个 r20 编过了。 再之后我把 ffmpeg 的 libvpx 给 enable 了,就出现了各种爆炸的问题,虽然最后也是 ok 了。 有一条额外的经验 自己 enable 的额外带依赖的编解码库的-I 和-L,-l 要放在 configure 的--extra-ldflags 参数里,不然 configure 会失败 |