cropsly / ffmpeg-android

FFmpeg for Android compiled with x264, libass, fontconfig, freetype, fribidi and lame (Supports Android 4.1+)
http://writingminds.github.io/ffmpeg-android/
Other
1.63k stars 415 forks source link

building ffmpeg for android x86 #40

Open mortyccp opened 8 years ago

mortyccp commented 8 years ago
.../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?

bubbleguuum commented 8 years ago

Same issue here...

myroid commented 7 years ago

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 commented 7 years ago

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

jokiamo commented 7 years ago

What is the solution?

adancygier commented 7 years ago

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

adancygier commented 7 years ago

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.

Dak0r commented 7 years ago

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. :)

jounisuominen commented 7 years ago

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.