Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling FFmpeg 3.1.1 for x86 using Android NDK

The newest version of FFmpeg is 3.1.1. After version 3.1, I can't compile FFmpeg for x86.(But 3.0.2 or earlier versions can be compiled.)

The terminal shows ld: error: libavutil/../compat/strtod.o: incompatible target.

My OS is Xubuntu 14.04 x86 and x86_64.(I have tried both of them.)

My NDK version is r10e(x86) and r12b(x86_64).

When I compile FFmpeg 3.0.2, it has no error.

This is my configure:

./configure \
--prefix="${PREFIX}" \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--cross-prefix="${PREFIX}/bin/i686-linux-android-" \
--target-os=linux \
--arch=x86 \
--enable-cross-compile \
--sysroot="${PREFIX}/sysroot" \
--extra-cflags="" \
--extra-ldflags="" \
--extra-libs="" \
--disable-debug

${PREFIX} is a directory path used for --install-dir option while running make-standalone-toolchain.sh which is a tool in Android NDK.

It only happens while I compile FFmpeg for x86. ARM architecture is ok.

like image 306
user3032481 Avatar asked Dec 24 '22 04:12

user3032481


1 Answers

I ran into the same issue and found a workaround. Make sure to remove "compat/strtod.o" and "compat/strtod.d" if you previously built for another architecture. For some reason these do not get rebuilt if you change architecture in 3.1.1, but it worked fine in previous versions. You should also do a "make clean" before building.

like image 195
Dave Avatar answered Dec 28 '22 08:12

Dave