ffmpeg-android icon indicating copy to clipboard operation
ffmpeg-android copied to clipboard

building ffmpeg for android x86

Open mortyccp opened this issue 9 years ago • 8 comments

.../ld: warning: skipping incompatible libavutil/libavutil.a while searching for avutil
.../ld: error: cannot find -lavutil

I encounter the above error when compelling ffmpeg3.1.2 for android x86. Anyone knows how to fix this?

mortyccp avatar Aug 12 '16 05:08 mortyccp

Same issue here...

bubbleguuum avatar Aug 20 '16 09:08 bubbleguuum

so i am. so am i.


/home/dafan/Desktop/ffmpeg-android/toolchain-android/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: warning: skipping incompatible libavutil/libavutil.a while searching for avutil /home/dafan/Desktop/ffmpeg-android/toolchain-android/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lavutil cmdutils.o:cmdutils.c:function log_callback_report: error: undefined reference to 'av_log_default_callback' cmdutils.o:cmdutils.c:function log_callback_report: error: undefined reference to 'av_log_format_line' cmdutils.o:cmdutils.c:function print_buildconf.constprop.9: error: undefined reference to 'av_log' cmdutils.o:cmdutils.c:function print_buildconf.constprop.9: error: undefined reference to 'av_log'

……

libswresample/libswresample.a(swresample.o):swresample.c:function swr_init: error: undefined reference to 'av_get_planar_sample_fmt' libswscale/libswscale.a(utils.o):utils.c:function sws_init_context: error: undefined reference to 'av_pix_fmt_swap_endianness' collect2: error: ld returned 1 exit status Makefile:131: recipe for target 'ffmpeg_g' failed make: *** [ffmpeg_g] Error 1

myroid avatar Nov 28 '16 09:11 myroid

I found the reason! recipe for target 'ffmpeg_g' failed,because ffmpeg_g already exists.

myroid avatar Dec 12 '16 12:12 myroid

What is the solution?

jokiamo avatar Dec 21 '16 13:12 jokiamo

I'm encountering the same issue for x86 builds, but it's only after updating the ffmpeg submodule branch to release/3.2

adancygier avatar Dec 28 '16 03:12 adancygier

I have a work around for now. The problem is there are left over files from the arm build when it gets to x86 build, I think its attempting to link to pull in the wrong files. A quick fix is to reset ffmpeg checkout manually and run x86 separately on its own. You need to modify one line in settings.sh, change SUPPORTED_ARCHITECTURES to SUPPORTED_ARCHITECTURES=(x86) to run x86 only. Before running delete ffmpeg directory and rerun ./init_update_libs.sh before running ./android_build.sh. I think clean target in ffmpeg Makefile needs tweaking. Im taking a look. Once I implemented this hack I was able to build ffmpeg binaries for arm and x86 with the latest release of ffmpeg 3.2. I dont know when they intend to make a new release but I will work on the Makefile changes and other small tweaks and can submit a pull request.

adancygier avatar Dec 28 '16 05:12 adancygier

Thanks @adancygier !! I just had the same issue, after updating it to release/3.2. I didn't check the builds folder until, because i thought the whole building process somehow failed. :)

Dak0r avatar Jan 08 '17 18:01 Dak0r

Same here with 3.2. You just need to delete compat/strtod.d and .o to fix it. I just edited android_build.sh to do it after building ffmpeg before building for next architecture.

jounisuominen avatar Apr 07 '17 08:04 jounisuominen