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

Can't build the library #46

Open DavidBarishev opened 8 years ago

DavidBarishev commented 8 years ago

Hello! I have followed all the instructions, and i can't seem to build the library. I'm running ubuntu 16.04 in a VM, with android-ndk-r12b installed. I followed all the steps including setting ANDROID_NDK, and the build failes at ./android_build.sh , here is the log:

david@david-VirtualBox:~/ffmpeg-android$ ./android_build.sh
patching file fontconfig/src/fcxml.c
Hunk #1 succeeded at 1345 (offset 31 lines).
Hunk #2 succeeded at 1392 (offset 31 lines).
abi_settings.sh: line 29: /home/longnd/build/android-ndk-r12b/build/tools/make-standalone-toolchain.sh: No such file or directory
~/ffmpeg-android/x264 ~/ffmpeg-android
Makefile:3: config.mak: No such file or directory
cat: config.h: No such file or directory
./configure
platform:      X86_64
byte order:    little-endian
system:        LINUX
cli:           yes
libx264:       internal
shared:        no
static:        no
asm:           yes
interlaced:    yes
avs:           avxsynth
lavf:          no
ffms:          no
mp4:           no
gpl:           yes
thread:        posix
opencl:        yes
filters:       crop select_every
debug:         no
gprof:         no
strip:         no
PIC:           no
bit depth:     8
chroma format: all

You can run 'make' or 'make fprofiled' now.
rm -f  common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/osdep.o common/rectangle.o common/set.o common/quant.o common/deblock.o common/vlc.o common/mvpred.o common/bitstream.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/threadpool.o common/x86/mc-c.o common/x86/predict-c.o common/opencl.o encoder/slicetype-cl.o common/x86/const-a.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/cpu-a.o common/x86/dct-64.o common/x86/bitstream-a.o common/x86/sad-a.o common/x86/trellis-64.o  x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/avs.o input/thread.o    *.a *.lib *.exp *.pdb x264 x264.exe .depend TAGS
rm -f checkasm checkasm.exe tools/checkasm.o tools/checkasm-a.o  common/oclobj.h x264_lookahead.clbin
rm -f example example.exe example.o
rm -f common/mc.gcda common/predict.gcda common/pixel.gcda common/macroblock.gcda common/frame.gcda common/dct.gcda common/cpu.gcda common/cabac.gcda common/common.gcda common/osdep.gcda common/rectangle.gcda common/set.gcda common/quant.gcda common/deblock.gcda common/vlc.gcda common/mvpred.gcda common/bitstream.gcda encoder/analyse.gcda encoder/me.gcda encoder/ratecontrol.gcda encoder/set.gcda encoder/macroblock.gcda encoder/cabac.gcda encoder/cavlc.gcda encoder/encoder.gcda encoder/lookahead.gcda common/threadpool.gcda common/x86/mc-c.gcda common/x86/predict-c.gcda common/opencl.gcda encoder/slicetype-cl.gcda x264.gcda input/input.gcda input/timecode.gcda input/raw.gcda input/y4m.gcda output/raw.gcda output/matroska.gcda output/matroska_ebml.gcda output/flv.gcda output/flv_bytestream.gcda filters/filters.gcda filters/video/video.gcda filters/video/source.gcda filters/video/internal.gcda filters/video/resize.gcda filters/video/cache.gcda filters/video/fix_vfr_pts.gcda filters/video/select_every.gcda filters/video/crop.gcda filters/video/depth.gcda input/avs.gcda input/thread.gcda common/mc.gcno common/predict.gcno common/pixel.gcno common/macroblock.gcno common/frame.gcno common/dct.gcno common/cpu.gcno common/cabac.gcno common/common.gcno common/osdep.gcno common/rectangle.gcno common/set.gcno common/quant.gcno common/deblock.gcno common/vlc.gcno common/mvpred.gcno common/bitstream.gcno encoder/analyse.gcno encoder/me.gcno encoder/ratecontrol.gcno encoder/set.gcno encoder/macroblock.gcno encoder/cabac.gcno encoder/cavlc.gcno encoder/encoder.gcno encoder/lookahead.gcno common/threadpool.gcno common/x86/mc-c.gcno common/x86/predict-c.gcno common/opencl.gcno encoder/slicetype-cl.gcno x264.gcno input/input.gcno input/timecode.gcno input/raw.gcno input/y4m.gcno output/raw.gcno output/matroska.gcno output/matroska_ebml.gcno output/flv.gcno output/flv_bytestream.gcno filters/filters.gcno filters/video/video.gcno filters/video/source.gcno filters/video/internal.gcno filters/video/resize.gcno filters/video/cache.gcno filters/video/fix_vfr_pts.gcno filters/video/select_every.gcno filters/video/crop.gcno filters/video/depth.gcno input/avs.gcno input/thread.gcno *.dyn pgopti.dpi pgopti.dpi.lock *.pgd *.pgc
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all
Unknown option --disable-shared, ignored
No working C compiler found.

Any ideas ?

thealban commented 7 years ago

would be great if someone could help on this I need the newest version but I can't build the project

johnmurphy01 commented 7 years ago

I had to update my NDK ABI version to 4.9(the default is 4.8). I also had to update my android version to something other than the default(which is 9). I updated my version to 23. All of this can be done from within the settings.sh bash file. I am running into other issues but this got me past the C compiler and toolchain errors.

johnmurphy01 commented 7 years ago

My issue is within x264. Whenever I run the bash script to compile x264, I get the following in the logs:

checking for pthread_create(0,0,0,0); in pthread.h... no
Failed command line was:
---------------------------------------------------------
/home/john/repos/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc conftest.c -Wall -I. -
I$(SRCPATH) --sysroot=/home/john/repos/ffmpeg-android/toolchain-android/sysroot -std=gnu99 -
lpthread --sysroot=/home/john/repos/ffmpeg-android/toolchain-android/sysroot -lm -o conftest 
androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lpthread
collect2: error: ld returned 1 exit status

There are several more of these similar errors surrounding swscale.h, lpostproc, lavcodec and more

stonyz commented 6 years ago

Same issue on ubuntu 14.04

SwatGuard commented 6 years ago

Same in Ubuntu 16.04.

kohiyadav commented 5 years ago

I am facing the same issue the log file content is as below:

x264 configure script Command line options: "--cross-prefix=/home/test/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-" "--sysroot=/home/test/ffmpeg-android/toolchain-android/sysroot" "--host=arm-linux" "--enable-pic" "--disable-asm" "--enable-static" "--disable-shared" "--prefix=/home/test/ffmpeg-android/toolchain-android" "--disable-cli"

checking whether /home/test/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc works... no Failed commandline was:

/home/test/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc conftest.c -Wall -I. -I$(SRCPATH) --sysroot=/home/test/ffmpeg-android/toolchain-android/sysroot --sysroot=/home/test/ffmpeg-android/toolchain-android/sysroot -lm -o conftest ./configure: line 157: /home/test/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-gcc: No such file or directory

Failed program was:

int main (void) { return 0; }

DIED: No working C compiler found.

csbubbles commented 5 years ago

Same in Ubuntu 18.