Hello, I am new to compiling with libvpx and ideally I want to cross compile with FFMPEG on android. Before I get there I am having issues compiling libvpx.
vpx_dsp/arm/idct4x4_1_add_neon.c:11:22: fatal error: arm_neon.h: No such file or directory
#include <arm_neon.h>
I thought maybe I need to add the sdk_path, downloaded ndk r16e for linux and then (also tried to point to a standalone toolchain, didn't work either)
./configure --target=arm64-android-gcc --disable-examples --sdk-path=$NDK
Failed configuration, checked config.log and at the end
android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/hdd/Android/android-ndk-r16b/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration -Wuninitialized -Wunused -Wextra -Wundef -E -o /tmp/vpx-conf-2697-2985.o /tmp/vpx-conf-2697-2985.c
/tmp/vpx-conf-2697-2985.c:1:19: fatal error: stdio.h: No such file or directory
#include "stdio.h"
^
compilation terminated.
Is it pointing to the non-64 bit toolchain (it is autogenerated...)?
Then I tried using external build,
./configure --target=arm64-android-gcc --disable-examples --sdk-path=$NDK --enable-external-build
That worked, then make gives an error:
disabling examples
enabling external_build
enabling vp8_encoder
enabling vp8_decoder
enabling vp9_encoder
enabling vp9_decoder
Configuring for target 'arm64-android-gcc'
enabling arm64
enabling neon
enabling realtime_only
enabling webm_io
enabling libyuv
Bypassing toolchain for environment detection.
Creating makefiles for arm64-android-gcc libs
Creating makefiles for arm64-android-gcc tools
Creating makefiles for arm64-android-gcc docs
ngmatthew@ngmatthew:~/Android/libvpx$
ngmatthew@ngmatthew:~/Android/libvpx$ make -j64^C
ngmatthew@ngmatthew:~/Android/libvpx$ make -j64
make[1]: Nothing to be done for `all'.
[CC] tools/tiny_ssim.c.o
arm-linux-androideabi-gcc: error: unrecognized command line option '-Wparentheses-equality'
arm-linux-androideabi-gcc: error: unrecognized command line option '-Wshorten-64-to-32'
make[1]: *** [tools/tiny_ssim.c.o] Error 1
make: *** [.DEFAULT] Error 2
Then I tried to do the way I am compiling other libraries with cflags. Created a arm64 standalone toolchain
$NDK/build/tools/make_standalone_toolchain.py --arch arm64 --api 27 --install-dir /tmp/toolchain
export TOOL= /tmp/toolchain
Then the configure
./configure --target=arm64-android-gcc --disable-examples --prefix=prefix --extra-cflags=" -I$TOOL/lib/gcc/aarch64-linux-android/4.9.x/include/ -L$TOOL/sysroot/usr/lib -D__ANDROID_API__=27 -isystem $TOOL/sysroot/usr/include/aarch64-linux-android/ -I$TOOL/system/usr/include/aarch64-linux-android/"
I checked all the paths (and they work) but not sure about the cflags. Then I run make and I get a bunch of errors similar to
/hdd/Android/tmp/toolchain//lib/gcc/aarch64-linux-android/4.9.x/include/arm_neon.h:86:1: error: unknown type name ‘__builtin_aarch64_simd_poly16’
typedef __builtin_aarch64_simd_poly16 poly16_t;
^
What am I missing or doing wrong? Thanks in advance!