Android; ARM NEON; Can't compile project with "arm_neon.h";

Put problems with the Android NDK in this forum.

Android; ARM NEON; Can't compile project with "arm_neon.h";

Postby Green_Troll » Tue Sep 27, 2011 8:25 am

Hi everybody.

I try to work with ARM_NEON coprocessor.
To turn on support of NEON I include "arm_neon.h" in my project. When I tryed to compile this I got error message (see below).
I think problem connected with compilator flags.

Could you give me advice, please. Which flags I need to use. Or any other solution?
Thanks in advance.

PS I'm using latest NDK "android-ndk-r6b" from "android.com", Platform ARM Cortex-A8.

Error message (showing only for first function, the same situation for each other function definitions).

In file included from D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT/preproc.c:4:
D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/inc
lude/arm_neon.h: In function 'vadd_s8':
D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/inc
lude/arm_neon.h:402: error: incompatible type for argument 1 of '__builtin_neon_vaddv8qi'
D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/inc
lude/arm_neon.h:402: note: expected '__builtin_neon_qi __vector__' but argument is of type 'int8x8_t'
D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/inc
lude/arm_neon.h:402: error: incompatible type for argument 2 of '__builtin_neon_vaddv8qi'
D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/inc
lude/arm_neon.h:402: note: expected '__builtin_neon_qi __vector__' but argument is of type 'int8x8_t'
make: *** [/cygdrive/d/work/sdk/h264enc/src/encoder/process_row/obj/local/armeabi-v7a/objs/vsshencoderlib/../../../opt/n
oOPT/preproc.o] Error 1
Green_Troll
Freshman
Freshman
 
Posts: 3
Joined: Tue Sep 27, 2011 7:55 am

Top

Re: Android; ARM NEON; Can't compile project with "arm_neon.

Postby jonbonazza » Tue Sep 27, 2011 6:01 pm

What compilation parameters are you using?
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Android; ARM NEON; Can't compile project with "arm_neon.

Postby Green_Troll » Wed Sep 28, 2011 2:10 pm

jonbonazza!

I use:
-march=armv7-a -mfpu=neon -O3 -mfloat-abi=softfp -ftree-vectorize -finline-functions -finline-functions-called-once -fmodulo-sched -ffast-math -fno-strict-aliasing

Above you can see listing with option "-v" for my file

Compile arm : vsshencoderlib <= preproc.c
Using built-in specs.
Target: arm-linux-androideabi
Configured with: /tmp/ndk-digit/src/build/../gcc/gcc-4.4.3/configure --prefix=/tmp/ndk-digit/build/install/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows --target=arm-linux-androideabi --host=i586-mingw32msvc --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/tmp/ndk-digit/build/toolchain-arm-linux-androideabi-4.4.3/temp-install --with-mpfr=/tmp/ndk-digit/build/toolchain-arm-linux-androideabi-4.4.3/temp-install --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-initfini-array --disable-nls --prefix=/tmp/ndk-digit/build/install/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows --with-sysroot=/tmp/ndk-digit/build/install/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/sysroot --with-binutils-version=2.19 --with-mpfr-version=2.3.0 --with-gmp-version=4.2.4 --with-gcc-version=4.4.3 --with-gdb-version=6.6 --with-arch=armv5te --enable-libstdc__-v3 --program-transform-name='s,^,arm-linux-androideabi-,'
Thread model: posix
gcc version 4.4.3 (GCC)
COLLECT_GCC_OPTIONS='-MMD' '-MP' '-MF' 'D:/work/sdk/h264enc/src/encoder/process_row/obj/local/armeabi-v7a/objs/vsshencoderlib/../../../opt/noOPT/preproc.o.d.org' '-fpic' '-ffunction-sections' '-funwind-tables' '-fstack-protector' '-D__ARM_ARCH_5__' '-D__ARM_ARCH_5T__' '-D__ARM_ARCH_5E__' '-D__ARM_ARCH_5TE__' '-Wno-psabi' '-march=armv7-a' '-mfloat-abi=softfp' '-mfpu=vfp' '-O2' '-fomit-frame-pointer' '-funswitch-loops' '-finline-limit=300' '-mfpu=neon' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../..' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../encoder' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../opt' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/..' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../..' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../src' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../..' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system/src' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system/src/android' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/..' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../..' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT/armeabi-v7a' '-ID:/android-ndk-r6/sources/android/cpufeatures' '-ID:/work/sdk/h264enc/src/encoder/process_row/jni' '-DANDROID' '-fsigned-char' '-D_ARM_ANDROID' '-DLINUX' '-D_L6_' '-march=armv7-a' '-mfpu=neon' '-O3' '-mfloat-abi=softfp' '-v' '-DINLINE=static inline' '-ftree-vectorize' '-finline-functions' '-finline-functions-called-once' '-fmodulo-sched' '-ffast-math' '-fno-strict-aliasing' '-D_USE_OPT_NEON_2' '-O2' '-DNDEBUG' '-g' '-ID:/android-ndk-r6/platforms/android-3/arch-arm/usr/include' '-c' '-o' 'D:/work/sdk/h264enc/src/encoder/process_row/obj/local/armeabi-v7a/objs/vsshencoderlib/../../../opt/noOPT/preproc.o'
D:/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../libexec/gcc/arm-linux-androideabi/4.4.3/cc1.exe -quiet -v -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../.. -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../encoder -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../opt -ID:/work/sdk/h264enc/src/encoder/process_row/jni/.. -ID:/work/sdk/h264enc/src/encoder/process_row/jni -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../.. -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../src -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../.. -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system/src -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system/src/android -ID:/work/sdk/h264enc/src/encoder/process_row/jni/.. -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../.. -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt -ID:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT/armeabi-v7a -ID:/android-ndk-r6/sources/android/cpufeatures -ID:/work/sdk/h264enc/src/encoder/process_row/jni -ID:/android-ndk-r6/platforms/android-3/arch-arm/usr/include -imultilib armv7-a -iprefix D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/ -MMD D:/work/sdk/h264enc/src/encoder/process_row/obj/local/armeabi-v7a/objs/vsshencoderlib/../../../opt/noOPT/preproc.d -MF D:/work/sdk/h264enc/src/encoder/process_row/obj/local/armeabi-v7a/objs/vsshencoderlib/../../../opt/noOPT/preproc.o.d.org -MP -MQ D:/work/sdk/h264enc/src/encoder/process_row/obj/local/armeabi-v7a/objs/vsshencoderlib/../../../opt/noOPT/preproc.o -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -DANDROID -D_ARM_ANDROID -DLINUX -D_L6_ -DINLINE=static inline
-D_USE_OPT_NEON_2 -DNDEBUG D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT/preproc.c -mbionic -quiet
-dumpbase preproc.c -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mfpu=neon -march=armv7-a -mfpu=neon -mfloat-abi=softfp -auxbase-strip D:/work/sdk/h264enc/src/encoder/process_row/obj/local/armeabi-v7a/objs/vsshencoderlib/../../../opt/noOPT/preproc.o -g -O2 -O3 -O2 -Wno-psabi -version -fpic -ffunction-sections -funwind-tables -fstack-protector -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fsigned-char -ftree-vectorize -finline-functions -finline-functions-called-once -fmodulo-sched -ffast-math -fno-strict-aliasing -o D:\Tools\cygwin\tmp\ccSNZgth.s
GNU C (GCC) version 4.4.3 (arm-linux-androideabi)
compiled by GNU C version 4.4.2, GMP version 4.2.4, MPFR version 2.3.0.
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128909
ignoring nonexistent directory "D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/include"
ignoring nonexistent directory "/tmp/ndk-digit/build/install/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/sysroot/tmp/ndk-digit/build/install/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.4.3/../../../../include"
ignoring duplicate directory "d:/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/lib/gcc/../../lib/gcc/arm-linux-androideabi/4.4.3/include"
ignoring duplicate directory "d:/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/lib/gcc/../../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed"
ignoring nonexistent directory "d:/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/lib/gcc/../../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/include"
ignoring nonexistent directory "/tmp/ndk-digit/build/install/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/sysroot/usr/include"
ignoring nonexistent directory "D:/work/sdk/h264enc/src/encoder/process_row/jni/../../encoder"
ignoring nonexistent directory "D:/work/sdk/h264enc/src/encoder/process_row/jni/../../opt"
ignoring duplicate directory "D:/work/sdk/h264enc/src/encoder/process_row/jni/.."
ignoring duplicate directory "D:/work/sdk/h264enc/src/encoder/process_row/jni/../.."
ignoring duplicate directory "D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt"
ignoring nonexistent directory "D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT/armeabi-v7a"
ignoring duplicate directory "D:/work/sdk/h264enc/src/encoder/process_row/jni"
#include "..." search starts here:
#include <...> search starts here:
D:/work/sdk/h264enc/src/encoder/process_row/jni/../..
D:/work/sdk/h264enc/src/encoder/process_row/jni/..
D:/work/sdk/h264enc/src/encoder/process_row/jni
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../..
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../src
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../..
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system/src
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../system/src/android
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT
D:/android-ndk-r6/sources/android/cpufeatures
D:/android-ndk-r6/platforms/android-3/arch-arm/usr/include
D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include D:\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\../lib/gcc/arm-linux-androideabi/4.4.3/include-fixed
End of search list.
GNU C (GCC) version 4.4.3 (arm-linux-androideabi)
compiled by GNU C version 4.4.2, GMP version 4.2.4, MPFR version 2.3.0.
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128909
Compiler executable checksum: a39289f59cdb7bbe297a6ee3480193a8
In file included from D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../opt/noOPT/preproc.c:4:
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../arm_neon.h: In function 'vadd_s8':
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../arm_neon.h:402: error: incompatible type for argument 1 of '__builtin_neon_vaddv8qi'
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../arm_neon.h:402: note: expected '__builtin_neon_qi __vector__' but argument is of type 'int8x8_t'
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../arm_neon.h:402: error: incompatible type for argument 2 of '__builtin_neon_vaddv8qi'
D:/work/sdk/h264enc/src/encoder/process_row/jni/../../../../../arm_neon.h:402: note: expected '__builtin_neon_qi __vector__' but argument is of type 'int8x8_t'
make: *** [/cygdrive/d/work/sdk/h264enc/src/encoder/process_row/obj/local/armeabi-v7a/objs/vsshencoderlib/../../../opt/n
oOPT/preproc.o] Error 1
Green_Troll
Freshman
Freshman
 
Posts: 3
Joined: Tue Sep 27, 2011 7:55 am

Re: Android; ARM NEON; Can't compile project with "arm_neon.

Postby jonbonazza » Thu Sep 29, 2011 12:22 am

are you using the ndk-build shell script or trying to manually configure and make?
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Android; ARM NEON; Can't compile project with "arm_neon.

Postby Green_Troll » Thu Sep 29, 2011 7:57 am

I'm using ndk_build script which was included in NDK without any changes.
File with build parameters is attached (was renamed from *.mk to *.txt).
Attachments
Android.txt
(5.99 KiB) Downloaded 68 times
Green_Troll
Freshman
Freshman
 
Posts: 3
Joined: Tue Sep 27, 2011 7:55 am

Top

Return to NDK Problems

Who is online

Users browsing this forum: No registered users and 1 guest