[Libav-user] build for Android on WIndows

Alex Cohn alexcohn at netvision.net.il
Mon Jun 23 14:50:55 CEST 2014


When we build ffmpeg for Android in Windows (using cygwin or Mingw
shell), and enable NEON, make for libavcodec.so fails because the
command line becomes too long.

I suggest a simple patch which will work for all platforms and all
targets. I am not sure if this patch will resolve all problems for
everybody.

$ git diff
diff --git a/library.mak b/library.mak
index cd39f11..5d4293b 100644
--- a/library.mak
+++ b/library.mak
@@ -53,7 +53,9 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)

 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SLIBOBJS) $(SUBDIR)lib$(NAME).ver
        $(SLIB_CREATE_DEF_CMD)
-       $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
+       $(Q)echo >$(SUBDIR)lib$(NAME).list $(wordlist 1,400,$(filter %.o,$$<))
+       $(Q)echo >>$(SUBDIR)lib$(NAME).list $(wordlist 401,999,$(filter %.o,$$<)
+       $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O)
@$(SUBDIR)lib$(NAME).list $(FFEXTRALIBS)
        $(SLIB_EXTRA_CMD)

 ifdef SUBDIR

See http://stackoverflow.com/questions/23683518/how-to-compile-ffmpeg-2-2-2-on-windows-with-cygwin-and-android-ndk-r9c

Should I open a ticket about this? Should I forward this to ffmpeg-devel?

BR,
Alex Cohn


More information about the Libav-user mailing list