Open Hosseinyzr opened 6 years ago
Hi, I guess you have not fed the script with proper compiler. Please make sure you have the proper compiler in your toolchain folder under NDK folder.
@Hosseinyzr what happen if you run the following .. #!/bin/bash
NDK=$HOME/Android/ndk PLATFORM=$NDK/platforms/android-18/arch-arm/ PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
GENERAL="\ --enable-small \ --enable-cross-compile \ --extra-libs="-lgcc" \ --arch=arm \ --cc=$PREBUILT/bin/arm-linux-androideabi-gcc \ --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \ --nm=$PREBUILT/bin/arm-linux-androideabi-nm \ --extra-cflags="-I../ffmpeg-build/armeabi/include" \ --extra-ldflags="-L../ffmpeg-build/armeabi/lib" "
MODULES="\ --enable-gpl \ --enable-libx264"
function build_ARMv6 { ./configure \ --target-os=android \ --prefix=./android/armeabi \ ${GENERAL} \ --sysroot=$PLATFORM \ --enable-shared \ --disable-static \ $COMMON_FLAGS \ --extra-cflags=" -O3 -fpic -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 -mfloat-abi=softfp -mfpu=vfp -marm -march=armv6" \ --extra-ldflags="-lx264 -Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \ --enable-zlib \ ${MODULES} \ --disable-doc \ --enable-neon
make clean make make install }
build_ARMv6
echo Android ARMEABI builds finished
@falahati1987 so where should i make this sh file and run? i made an .sh file in ffmpeg folder named "build_ffmpeg_aaa.sh" and ran it. i think compiling was being done this time but unfortunately had errors i think... these are codes that i think show the errors...
License: LGPL version 2.1 or later ./build_ffmpeg_aaa.sh: line 25: --target-os=android: command not found ./build_ffmpeg_aaa.sh: line 26: --prefix=./android/armeabi: No such file or directory ./build_ffmpeg_aaa.sh: line 27: --enable-small: command not found ./build_ffmpeg_aaa.sh: line 28: --sysroot=/home/hossein/ffmpeg/android-ndk-r16b-linux-x86_64/android-ndk-r16b/platforms/android-18/arch-arm/: No such file or directory ./build_ffmpeg_aaa.sh: line 29: --enable-shared: command not found ./build_ffmpeg_aaa.sh: line 30: --disable-static: command not found ./build_ffmpeg_aaa.sh: line 32: --extra-cflags= -O3 -fpic -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 -mfloat-abi=softfp -mfpu=vfp -marm -march=armv6: command not found ./build_ffmpeg_aaa.sh: line 33: --extra-ldflags=-lx264 -Wl,-rpath-link=/home/hossein/ffmpeg/android-ndk-r16b-linux-x86_64/android-ndk-r16b/platforms/android-18/arch-arm//usr/lib -L/home/hossein/ffmpeg/android-ndk-r16b-linux-x86_64/android-ndk-r16b/platforms/android-18/arch-arm//usr/lib -nostdlib -lc -lm -ldl -llog: No such file or directory ./build_ffmpeg_aaa.sh: line 34: --enable-zlib: command not found ./build_ffmpeg_aaa.sh: line 35: --enable-gpl: command not found ./build_ffmpeg_aaa.sh: line 36: --disable-doc: command not found ./build_ffmpeg_aaa.sh: line 37: --enable-neon: command not found
and the last codes it printed:
LD ffprobe_g STRIP ffprobe mkdir: cannot create directory ‘/usr/local/share/man/man1’: Permission denied doc/Makefile:125: recipe for target 'install-man' failed make: *** [install-man] Error 1 Android ARMEABI builds finished
many other codes was preinted but i think there were ok and for compiling .
thank u.
the output is weird.. is it running every line of the scrip?? --target-os=android is a part of config parameters. How does one take it as a command?
@falahati1987 yeah! it is weird. but this time it was compiling i think but these problems occur . can you please release some built of it if u had done ? i mean .so file of complete builds. i had seen some prebuilt versions but they were old...
@Hosseinyzr check out ffmpeg-build folder
@falahati1987 thanks man...
Hi @falahati1987.
I have the same (or similar) problem. My code is:
`#!/bin/bash NDK=C:/Users/EndyB/AppData/Local/Android/Sdk/ndk-bundle PLATFORM=$NDK/platforms/android-18/arch-arm/ TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 PREFIX=./android/arm PREBUILT=$NDK/prebuilt/windows-x86_64/bin
function build_one { ./configure \ --prefix=$PREFIX \ --enable-static \ --enable-pic \ --host=arm-linux \ --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi \ --sysroot=$PLATFORM
make clean make make install }
build_one
echo Android ARM builds finished `
then throw me this output:
Reviewing the ndk files I found the make.exe in the path: C:\Users\EndyB\AppData\Local\Android\Sdk\ndk-bundle\prebuilt\windows-x86_64\bin I don´t if it has influence. Please, help me to resolve my problem. Thanks!
Hi @endyleon ,
First and foremost, you are on windows. Make sure your windows supports bash scripting (v >= 10). Secondly, the error you are receiving stems from the incorrect paths you have provided. BTW, I have also provided the .so files to be directly imported to your Android project. You can use them and skip the cross-compilation phase.
Hi, First Thanks for your library. I faced problem at the last step (when running buid_ffmpeg_for_android.sh) . I have "Ubuntu desktop 17.10.1" and "android-ndk-r16b-linux-x86_64". please help me fix it... these are what had printed on console:
./build_ffmpeg_for_android.sh ~/ffmpeg/ffmpeg4Android ~/ffmpeg/ffmpeg4Android Building x264 for android ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script No working C compiler found. Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Android ARM builds finished ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script No working C compiler found. Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Android ARM builds finished ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script No working C compiler found. Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Android ARM64 builds finished ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script No working C compiler found. Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Android MIPS builds finished ~/ffmpeg/ffmpeg4Android/x264-build-script ./build_android_all.sh: line 21: ./build_android_mips64.sh: No such file or directory ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script No working C compiler found. Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Android x86 builds finished ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android/x264-build-script No working C compiler found. Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure with --disable-asm. Makefile:337: recipe for target 'config.mak' failed make: [config.mak] Error 1 Android x86_64 builds finished ~/ffmpeg/ffmpeg4Android/x264-build-script ~/ffmpeg/ffmpeg4Android ~/ffmpeg/ffmpeg4Android ~/ffmpeg/ffmpeg4Android ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script /home/hossein/ffmpeg/android-ndk-r16b-linux-x86_64/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc is unable to create an executable file. C compiler test failed.
If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: No rule to make target '/tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: No rule to make target '/tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop. Android ARMEABI builds finished ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script /home/hossein/ffmpeg/android-ndk-r16b-linux-x86_64/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc is unable to create an executable file. C compiler test failed.
If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: No rule to make target '/tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: No rule to make target '/tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: *** No rule to make target '/tests/Makefile'. Stop. Android ARMv7-a builds finished ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script /home/hossein/ffmpeg/android-ndk-r16b-linux-x86_64/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc is unable to create an executable file. C compiler test failed.
If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "conflog.txt" produced by configure as this will help solve the problem. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: No rule to make target '/tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: No rule to make target '/tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:157: /tests/Makefile: No such file or directory make: No rule to make target '/tests/Makefile'. Stop. Android ARM64v8a builds finished ~/ffmpeg/ffmpeg4Android/ffmpeg-build-script ./build_android_x86.sh: line 27: ./configure: No such file or directory make: No rule to make target 'clean'. Stop. make: No targets specified and no makefile found. Stop. make: No rule to make target 'install'. Stop. Android X86 builds finished ./build_android_x86_64.sh: line 25: ./configure: No such file or directory make: No rule to make target 'clean'. Stop. make: No targets specified and no makefile found. Stop. make: No rule to make target 'install'. Stop. Android X86_64 builds finished ./build_android_mips.sh: line 26: ./configure: No such file or directory make: No rule to make target 'clean'. Stop. make: No targets specified and no makefile found. Stop. make: No rule to make target 'install'. Stop. Android MIPS builds finished ~/ffmpeg/ffmpeg4Android Building finished. You can find your compiled libraries in ffmpeg-build\n