cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
a70024
Observer
Observer
2,749 Views
Registered: ‎01-25-2018

can't include arm_neon.h for aarch64 correctly.

Dear Xilinx:

  I am migrating eigen library to ZCU102, but there are lots of build errors about can't find type declartions of 

__Int8x8_t
_Int16x4_t
__Int32x2_t 

...so on.

 

they are caused simply by including the file, arm_neon.h.

/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h

 

would you let me know how do I get these defines from SDSoc tool chain?

 

[log]

/home/lucas/Project/Software/SDSoc_2017-4/SDx/2017.4/bin/clang_wrapper -I../../ -I../src -Wall -g -fmessage-length=0 -MMD -MP -D __SDSCC__ -target aarch64-linux-gnu -mcpu=cortex-a53 -O0 -g -I /home/lucas/Project/Software/SDSoc_2017-4/SDx/2017.4/target/aarch64-linux/include -D HLS_NO_XIL_FPO_LIB -I /home/lucas/Project/Software/SDSoc_2017-4/Vivado/2017.4/include -I/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1 -I/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1/aarch64-linux-gnu -I/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1/backward -I/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include -I/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include-fixed -I/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include -I/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/libc/usr/include -std=c++11 -emit-llvm -S /home/lucas/Project/git_workspace/eigen-git-mirror/project/gemm_test/src/main.cpp -o /home/lucas/Project/git_workspace/eigen-git-mirror/project/gemm_test/Debug/_sds/.llvm/src/main.s
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:30:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC push_options
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:31:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC target ("+nothing+simd")
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:38:9: error: unknown type name '__Int8x8_t'
typedef __Int8x8_t int8x8_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:39:9: error: unknown type name '__Int16x4_t'
typedef __Int16x4_t int16x4_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:40:9: error: unknown type name '__Int32x2_t'; did you mean '__int32_t'?
typedef __Int32x2_t int32x2_t;
^~~~~~~~~~~
__int32_t
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/libc/usr/include/bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:41:9: error: unknown type name '__Int64x1_t'; did you mean '__int64_t'?
typedef __Int64x1_t int64x1_t;
^~~~~~~~~~~
__int64_t
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/libc/usr/include/bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:42:9: error: unknown type name '__Float16x4_t'
typedef __Float16x4_t float16x4_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:43:9: error: unknown type name '__Float32x2_t'
typedef __Float32x2_t float32x2_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:44:9: error: unknown type name '__Poly8x8_t'
typedef __Poly8x8_t poly8x8_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:45:9: error: unknown type name '__Poly16x4_t'
typedef __Poly16x4_t poly16x4_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:46:9: error: unknown type name '__Uint8x8_t'
typedef __Uint8x8_t uint8x8_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:47:9: error: unknown type name '__Uint16x4_t'
typedef __Uint16x4_t uint16x4_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:48:9: error: unknown type name '__Uint32x2_t'
typedef __Uint32x2_t uint32x2_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:49:9: error: unknown type name '__Float64x1_t'
typedef __Float64x1_t float64x1_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:50:9: error: unknown type name '__Uint64x1_t'
typedef __Uint64x1_t uint64x1_t;
^
/home/lucas/Project/Software/SDSoc_2017-4/SDK/2017.4/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include/arm_neon.h:51:9: error: unknown type name '__Int8x16_t'; did you mean '__int16_t'?
typedef __Int8x16_t int8x16_t;

 

BRs

CJ

0 Kudos
5 Replies
liyang53719
Visitor
Visitor
2,551 Views
Registered: ‎06-10-2018

i have the same problem in SDX 2018.2 with ZCU102.

do you have any idera?

10:34:03 **** Build of configuration Debug for project vins_mono ****
make pre-build main-build
sdsoc_make_clean Debug

Building file: ../src/utility/CameraPoseVisualization.cpp
Invoking: SDS++ Compiler
sds++ -Wall -O0 -g -I"../src" -c -fmessage-length=0 -MT"src/utility/CameraPoseVisualization.o" -MMD -MP -MF"src/utility/CameraPoseVisualization.d" -MT"src/utility/CameraPoseVisualization.o" -o "src/utility/CameraPoseVisualization.o" "../src/utility/CameraPoseVisualization.cpp" -sds-sys-config a53_linux -sds-proc a53_linux -sds-pf "zcu102"
Create data motion intermediate representation
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:30:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC push_options
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:31:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC target ("+nothing+simd")
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:38:9: error: unknown type name '__Int8x8_t'
typedef __Int8x8_t int8x8_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:39:9: error: unknown type name '__Int16x4_t'
typedef __Int16x4_t int16x4_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:40:9: error: unknown type name '__Int32x2_t'; did you mean '__int32_t'?
typedef __Int32x2_t int32x2_t;
^~~~~~~~~~~
__int32_t
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/libc/usr/include/bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:41:9: error: unknown type name '__Int64x1_t'; did you mean '__int64_t'?
typedef __Int64x1_t int64x1_t;
^~~~~~~~~~~
__int64_t
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/libc/usr/include/bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:42:9: error: unknown type name '__Float16x4_t'
typedef __Float16x4_t float16x4_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:43:9: error: unknown type name '__Float32x2_t'
typedef __Float32x2_t float32x2_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:44:9: error: unknown type name '__Poly8x8_t'
typedef __Poly8x8_t poly8x8_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:45:9: error: unknown type name '__Poly16x4_t'
typedef __Poly16x4_t poly16x4_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:46:9: error: unknown type name '__Uint8x8_t'
typedef __Uint8x8_t uint8x8_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:47:9: error: unknown type name '__Uint16x4_t'
typedef __Uint16x4_t uint16x4_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:48:9: error: unknown type name '__Uint32x2_t'
typedef __Uint32x2_t uint32x2_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:49:9: error: unknown type name '__Float64x1_t'
typedef __Float64x1_t float64x1_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:50:9: error: unknown type name '__Uint64x1_t'
typedef __Uint64x1_t uint64x1_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:51:9: error: unknown type name '__Int8x16_t'; did you mean '__int16_t'?
typedef __Int8x16_t int8x16_t;
^~~~~~~~~~~
__int16_t
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/libc/usr/include/bits/types.h:38:26: note: '__int16_t' declared here
typedef signed short int __int16_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:52:9: error: unknown type name '__Int16x8_t'
typedef __Int16x8_t int16x8_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:53:9: error: unknown type name '__Int32x4_t'; did you mean '__int32_t'?
typedef __Int32x4_t int32x4_t;
^~~~~~~~~~~
__int32_t
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/libc/usr/include/bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:54:9: error: unknown type name '__Int64x2_t'; did you mean '__int64_t'?
typedef __Int64x2_t int64x2_t;
^~~~~~~~~~~
__int64_t
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/libc/usr/include/bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:55:9: error: unknown type name '__Float16x8_t'
typedef __Float16x8_t float16x8_t;
^
/home/liyang/soft/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:56:9: error: unknown type name '__Float32x4_t'
typedef __Float32x4_t float32x4_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
ERROR: [SdsCompiler 83-5005] clang exited with non-zero code processing /home/liyang/workspace/vins_mono/src/utility/CameraPoseVisualization.cpp
sds++ log file saved as /home/liyang/workspace/vins_mono/Debug/_sds/reports/sds_CameraPoseVisualization.log
ERROR: [SdsCompiler 83-5004] Build failed

src/utility/subdir.mk:24: recipe for target 'src/utility/CameraPoseVisualization.o' failed
make: *** [src/utility/CameraPoseVisualization.o] Error 1

10:34:05 Build Finished (took 2s.17ms)

0 Kudos
sgrace
Xilinx Employee
Xilinx Employee
2,531 Views
Registered: ‎10-28-2013

Hi,

 

In your code, you'd need to gate the ARM_NEON from being used in compilation.

 

You would need to do something like this (from the OpenCV to xfOpenCV tutorial): 

 

#if __SDSCC__
#undef __ARM_NEON__
#undef __ARM_NEON
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/core/core.hpp>
#define __ARM_NEON__
#define __ARM_NEON
#else
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/core/core.hpp>
#endif

The includes would be related to any image processing you're doing.

 

Hope this helps.

 

Steve

0 Kudos
kardec
Adventurer
Adventurer
2,475 Views
Registered: ‎01-30-2018

did you solve the problem?

I'm having the same problem when building another project (CHaiDNN)

0 Kudos
xiaohong_liut
Visitor
Visitor
2,452 Views
Registered: ‎11-30-2016

It doesn't work for me, unfortunately. 

 

Any other hint?

 

Thanks,

Lily

0 Kudos
sgrace
Xilinx Employee
Xilinx Employee
2,449 Views
Registered: ‎10-28-2013

Do you haven to have your C/C++ Build Settings adjusted for targeting the right libraries? I'm assuming you're using the reVISION Platform, which would require SYSROOT and some other includes/libraries to be added.
0 Kudos