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

VP9 builds failure with android-ndk-r16 #3520

Closed
nelson-xia opened this issue Nov 30, 2017 · 6 comments
Closed

VP9 builds failure with android-ndk-r16 #3520

nelson-xia opened this issue Nov 30, 2017 · 6 comments
Assignees
Labels

Comments

@nelson-xia
Copy link

nelson-xia commented Nov 30, 2017

When I try to use extensions/vp9 and follow its readme, VP9 can not be built with android-ndk-r16. the complains are as follows:
build_android_configs:
configure --target=armv7-android-gcc --sdk-path=/data/SDK/NDK/android-ndk-r16 --enable-neon --enable-neon-asm --disable-examples --disable-docs --enable-realtime-only --disable-vp8 --disable-vp9-encoder --disable-webm-io --disable-libyuv --disable-runtime-cpu-detect
disabling examples
disabling docs
enabling realtime_only
disabling vp8
disabling vp9_encoder
disabling webm_io
disabling libyuv
disabling runtime_cpu_detect
enabling vp9_decoder
Configuring for target 'armv7-android-gcc'
enabling armv7
Unable to invoke compiler: /data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/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

Configuration failed. This could reflect a misconfiguration of your
toolchains, improper options selected, or another problem. If you
don't see any useful error messages above, the next step is to look
at the configure error log file (config.log) to determine what
configure was trying to do when it died.

The config.log is as follows:

../../libvpx/configure --target=armv7-android-gcc --sdk-path=/data/SDK/NDK/android-ndk-r16 --enable-neon --enable-neon-asm --disable-examples --disable-docs --enable-realtime-only --disable-vp8 --disable-vp9-encoder --disable-webm-io --disable-libyuv --disable-runtime-cpu-detect

enabling vp9_decoder
Configuring for target 'armv7-android-gcc'
enabling armv7
add_asflags --defsym ARCHITECTURE=7
check_cpp
BEGIN /tmp/vpx-conf-8225-18142.c
1 #ifndef __ARM_PCS_VFP
2 #error "not hardfp"
3 #endif
END /tmp/vpx-conf-8225-18142.c
gcc -E -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
/tmp/vpx-conf-8225-18142.c:2:2: error: #error "not hardfp"
#error "not hardfp"
^
check_cxxflags -march=armv7-a -mfloat-abi=softfp
check_cxx -Werror -march=armv7-a -mfloat-abi=softfp
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
g++ -Werror -march=armv7-a -mfloat-abi=softfp -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
g++: error: unrecognized command line option ‘-mfloat-abi=softfp’
check_cflags -march=armv7-a -mfloat-abi=softfp
check_cc -Werror -march=armv7-a -mfloat-abi=softfp
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
gcc -Werror -march=armv7-a -mfloat-abi=softfp -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
gcc: error: unrecognized command line option ‘-mfloat-abi=softfp’
add_asflags -march=armv7-a -mfloat-abi=softfp
check_cxxflags -mfpu=neon
check_cxx -Werror -mfpu=neon
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
g++ -Werror -mfpu=neon -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
g++: error: unrecognized command line option ‘-mfpu=neon’
check_cflags -mfpu=neon
check_cc -Werror -mfpu=neon
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
gcc -Werror -mfpu=neon -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
gcc: error: unrecognized command line option ‘-mfpu=neon’
add_asflags -mfpu=neon
check_cxxflags -DNDEBUG
check_cxx -Werror -DNDEBUG
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -Werror -DNDEBUG -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -DNDEBUG
check_cc -Werror -DNDEBUG
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -Werror -DNDEBUG -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -O3
check_cxx -Werror -O3
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -Werror -O3 -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -O3
check_cc -Werror -O3
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -Werror -O3 -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -fPIC
check_cxx -Werror -fPIC
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -Werror -fPIC -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -fPIC
check_cc -Werror -fPIC
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -Werror -fPIC -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cc
BEGIN /tmp/vpx-conf-8225-18142.c
1 unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E';
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cc
BEGIN /tmp/vpx-conf-8225-18142.c
1 static inline function() {}
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wall
check_cxx -Werror -Wall
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Werror -Wall -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wall
check_cc -Werror -Wall
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Werror -Wall -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wdeclaration-after-statement
check_cxx -Werror -Wdeclaration-after-statement
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Werror -Wdeclaration-after-statement -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
cc1plus: error: command line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++ [-Werror]
cc1plus: all warnings being treated as errors
check_cflags -Wdeclaration-after-statement
check_cc -Werror -Wdeclaration-after-statement
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Werror -Wdeclaration-after-statement -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wdisabled-optimization
check_cxx -Werror -Wdisabled-optimization
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Werror -Wdisabled-optimization -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wdisabled-optimization
check_cc -Werror -Wdisabled-optimization
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdeclaration-after-statement -Werror -Wdisabled-optimization -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wfloat-conversion
check_cxx -Werror -Wfloat-conversion
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Werror -Wfloat-conversion -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wfloat-conversion
check_cc -Werror -Wfloat-conversion
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Werror -Wfloat-conversion -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wpointer-arith
check_cxx -Werror -Wpointer-arith
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Wfloat-conversion -Werror -Wpointer-arith -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wpointer-arith
check_cc -Werror -Wpointer-arith
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-conversion -Werror -Wpointer-arith -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wtype-limits
check_cxx -Werror -Wtype-limits
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Werror -Wtype-limits -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wtype-limits
check_cc -Werror -Wtype-limits
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Werror -Wtype-limits -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wcast-qual
check_cxx -Werror -Wcast-qual
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Werror -Wcast-qual -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wcast-qual
check_cc -Werror -Wcast-qual
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Werror -Wcast-qual -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wvla
check_cxx -Werror -Wvla
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Werror -Wvla -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wvla
check_cc -Werror -Wvla
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Werror -Wvla -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wimplicit-function-declaration
check_cxx -Werror -Wimplicit-function-declaration
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Werror -Wimplicit-function-declaration -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
cc1plus: error: command line option '-Wimplicit-function-declaration' is valid for C/ObjC but not for C++ [-Werror]
cc1plus: all warnings being treated as errors
check_cflags -Wimplicit-function-declaration
check_cc -Werror -Wimplicit-function-declaration
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Werror -Wimplicit-function-declaration -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wuninitialized
check_cxx -Werror -Wuninitialized
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Werror -Wuninitialized -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wuninitialized
check_cc -Werror -Wuninitialized
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/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 -Werror -Wuninitialized -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wunused
check_cxx -Werror -Wunused
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wuninitialized -Werror -Wunused -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wunused
check_cc -Werror -Wunused
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/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 -Werror -Wunused -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cxxflags -Wextra
check_cxx -Werror -Wextra
BEGIN /tmp/vpx-conf-8225-18142.cc
1 int x;
END /tmp/vpx-conf-8225-18142.cc
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/data/SDK/NDK/android-ndk-r16/platforms/android-27/arch-arm -DNDEBUG -O3 -fPIC -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wuninitialized -Wunused -Werror -Wextra -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.cc
check_cflags -Wextra
check_cc -Werror -Wextra
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/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 -Werror -Wextra -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cflags -Wundef
check_cc -Werror -Wundef
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/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 -Werror -Wundef -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
check_cflags -Wshorten-64-to-32
check_cc -Werror -Wshorten-64-to-32
BEGIN /tmp/vpx-conf-8225-18142.c
1 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/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 -Werror -Wshorten-64-to-32 -c -o /tmp/vpx-conf-8225-18142.o /tmp/vpx-conf-8225-18142.c
arm-linux-androideabi-gcc: error: unrecognized command line option '-Wshorten-64-to-32'
check_header stdio.h
check_cpp
BEGIN /tmp/vpx-conf-8225-18142.c
1 #include "stdio.h"
2 int x;
END /tmp/vpx-conf-8225-18142.c
/data/SDK/NDK/android-ndk-r16/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/data/SDK/NDK/android-ndk-r16/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-8225-18142.o /tmp/vpx-conf-8225-18142.c
/tmp/vpx-conf-8225-18142.c:1:19: fatal error: stdio.h: No such file or directory
#include "stdio.h"
^
compilation terminated.

Building it with ndk-r15c and ndk-r14b successfully. Please add the ndk version into vp9 readme.

@andrewlewis andrewlewis self-assigned this Nov 30, 2017
@andrewlewis
Copy link
Collaborator

It looks like the layout of the sysroot has changed quite a bit in NDK 16 (maybe related to the unified headers migration?). I was able to get it to build by creating a unified toolchain with build/tools/make_standalone_toolchain.py --arch arm --api 26 --install-dir unified-toolchain and setting the output directory as the sysroot.

@vigneshvg Configuration of libvpx fails at the moment with NDK 16, as include files aren't present in the sysroot. Any ideas what the right fix is? Thanks!

@vigneshvg
Copy link
Contributor

Thanks for pointing this out.

It looks like we may have to fix the configure script on upstream libvpx. I've opened a bug for libvpx: https://bugs.chromium.org/p/webm/issues/detail?id=1476

I'll update the instructions to use the updated version of libvpx once that bug is fixed.

@ojw28 ojw28 added the bug label Dec 4, 2017
@alexcohn
Copy link
Contributor

alexcohn commented Jan 1, 2018

While the bug is being taken care of, here is a workaround:

../../libvpx/configure --target=armv7-android-gcc --sdk-path=/data/SDK/NDK/android-ndk-r16 --enable-neon --enable-neon-asm --disable-examples --disable-docs --enable-realtime-only --disable-vp8 --disable-vp9-encoder --disable-webm-io --disable-libyuv --disable-runtime-cpu-detect \
--extra-cflags="-isystem /data/SDK/NDK/android-ndk-r16/sysroot/usr/include/arm-linux-androideabi \
  -isystem /data/SDK/NDK/android-ndk-r16/sysroot/usr/include"

Note that NDK r16 dropped support for android-9.

@nelson-xia
Copy link
Author

The pointed NDK version has been told in the VP9 readme and workaround method has been provided. Thanks for all developers ;)

@cmeng-git
Copy link

cmeng-git commented Mar 20, 2018

I have the following observations when building libvpx from source v1.7.0 for all the android supported ABI i.e. ABIS=("armeabi" "armeabi-v7a" "arm64-v8a" "x86" "x86_64" "mips" "mips64")
See: https://github.com/cmeng-git/vpx-android

Observation 1:

ANDROID_API=21
NDK=/opt/android/android-ndk-r16b
PREFIX=./output/android/${ABI}

./configure
--sdk-path=${NDK}
--prefix=${PREFIX}
--target=${TARGET}
--disable-runtime-cpu-detect
--disable-docs
--enable-static
--disable-shared
--disable-examples
--disable-tools
--disable-debug
--disable-unit-tests
--enable-realtime-only
--disable-webm-io
--extra-cflags="-isystem ${NDK}/sysroot/usr/include/${NDK_ABIARCH} -isystem ${NDK}/sysroot/usr/include"

Results:

  1. "arm64-v8a" failed half way with
    ....
    [CC] vpx_scale/vpx_scale_rtcd.c.o
    [CC] vpx_ports/arm_cpudetect.c.o
    [CC] vpx_dsp/prob.c.o
    In file included from /opt/android/android-ndk-r16b/sysroot/usr/include/signal.h:35:0,
    from /opt/android/android-ndk-r16b/sysroot/usr/include/sys/select.h:36,
    from /opt/android/android-ndk-r16b/sysroot/usr/include/sys/time.h:37,
    from /opt/android/android-ndk-r16b/sysroot/usr/include/time.h:33,
    from /opt/android/android-ndk-r16b/sysroot/usr/include/pthread.h:37,
    from ./vpx_ports/vpx_once.h:118,
    from vpx_scale/vpx_scale_rtcd.c:13:
    /opt/android/android-ndk-r16b/sysroot/usr/include/aarch64-linux-android/asm/sigcontext.h:39:3: error: unknown type name '__uint128_t'
    __uint128_t vregs[32];
    ^
    make[1]: *** [vpx_scale/vpx_scale_rtcd.c.o] Error 1

  2. The build is ok when using NDK=/opt/android/android-ndk-r15c and without the parameter
    --extra-cflags="-isystem ${NDK}/sysroot/usr/include/${NDK_ABIARCH} -isystem ${NDK}/sysroot/usr/include"

Observation 2:

ANDROID_API=21
NDK=/opt/android/android-ndk-r16b or /opt/android/android-ndk-r15c
PREFIX=./output/android/${ABI}

Results:

  1. Both ABI "mips" "mips64" failed to build with ndk r16 or r15 with target sets respectively to
    a. TARGET="mips32-linux-gcc"
    b. TARGET="mips64-linux-gcc"

disabling runtime_cpu_detect
disabling docs
disabling shared
disabling examples
disabling tools
disabling debug
disabling unit_tests
enabling realtime_only
disabling webm_io
enabling vp8_encoder
enabling vp8_decoder
enabling vp9_encoder
enabling vp9_decoder
Configuring for target 'mips32-linux-gcc'
enabling mips32
enabling libyuv
Toolchain is unable to link executables

Configuration failed. This could reflect a misconfiguration of your
toolchains, improper options selected, or another problem. If you
don't see any useful error messages above, the next step is to look
at the configure error log file (config.log) to determine what
configure was trying to do when it died.

and the config.log error is
check_ld
check_cc
BEGIN /tmp/vpx-conf-5798-24779.c
1 int main(void) {return 0;}
END /tmp/vpx-conf-5798-24779.c
/home/cmeng/workspace/ndk/libvpx/mips-android-toolchain/bin/mipsel-linux-android-clang -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -march=mips32 -DNDEBUG -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-conversion -Wparentheses-equality -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration -Wuninitialized -Wunused -Wextra -Wundef -Wno-unused-function -Wshorten-64-to-32 -c -o /tmp/vpx-conf-5798-24779.o /tmp/vpx-conf-5798-24779.c
/home/cmeng/workspace/ndk/libvpx/mips-android-toolchain/bin/mipsel-linux-android-ld -o /tmp/vpx-conf-5798-24779.x /tmp/vpx-conf-5798-24779.o -lpthread
/home/cmeng/workspace/ndk/libvpx/mips-android-toolchain/bin/mipsel-linux-android-ld: cannot find -lpthread

Observation 3:

ANDROID_API=21
NDK=/opt/android/android-ndk-r15c

Use method as proposed by andrewlewis commented on Nov 30, 2017
build/tools/make_standalone_toolchain.py --arch arm --api 26 --install-dir unified-toolchain and setting the output directory as the sysroot.

Not sure what it means by "output directory as the sysroot"
Instead I set
./configure
--sdk-path='unified-toolchain'

Results:

  1. "arm64-v8a" failed during configuration, apparently got the incorrect ${CC}
    ....
    enabling vp9_decoder
    Configuring for target 'arm64-android-gcc'
    enabling arm64
    enabling neon
    enabling libyuv
    Unable to invoke compiler: /arm-linux-androideabi-gcc -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mfpu=neon -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing

  2. Both ABI "mips" "mips64" failed as observation Support wider range of DASH manifests #2

@cmeng-git
Copy link

There is an error in the vpx configure for arm64-android-gcc etc. Please see below for more information
android/ndk#190 (comment)

@google google locked and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants