Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building ffmpeg for android x86 #40

Open
mortyccp opened this issue Aug 12, 2016 · 8 comments
Open

building ffmpeg for android x86 #40

mortyccp opened this issue Aug 12, 2016 · 8 comments

Comments

@mortyccp
Copy link

.../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
Copy link

Same issue here...

@myroid
Copy link

myroid commented Nov 28, 2016

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
Copy link

myroid commented Dec 12, 2016

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

@jokiamo
Copy link

jokiamo commented Dec 21, 2016

What is the solution?

@adancygier
Copy link

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

@adancygier
Copy link

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
Copy link

Dak0r commented Jan 8, 2017

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants