UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant yan0110
Participant
374 Views
Registered: ‎09-12-2018

Failed building the SDSoC Colordetect Acceleration Project

Hi, i was trying to build the SDSoC colordetect acceleration demo project according to the SDSoC Environment Tutorial: Migrate OpenCV to xfOpenCV(https://github.com/Xilinx/SDSoC-Tutorials/blob/master/opencv-to-xfopencv-migration-tutorial/lab2-build-sdsoc-acceleration-project.md). There are lots of the such similar errors:

Analyzing source for RTL template usage
error: unable to handle compilation, expected exactly one compiler job in ''
Error while processing F:\Environment_Tutorial\color_detect\Release\1.
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:38:9: error: unknown type name '__Int8x8_t'
typedef __Int8x8_t int8x8_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:39:9: error: unknown type name '__Int16x4_t'
typedef __Int16x4_t int16x4_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.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
F:\zcu104-rv-ss-2018-3\zcu104_rv_ss\sw\a53_linux\a53_linux\sysroot\aarch64-xilinx-linux/usr/include\bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.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
F:\zcu104-rv-ss-2018-3\zcu104_rv_ss\sw\a53_linux\a53_linux\sysroot\aarch64-xilinx-linux/usr/include\bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:42:9: error: unknown type name '__Float16x4_t'
typedef __Float16x4_t float16x4_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:43:9: error: unknown type name '__Float32x2_t'
typedef __Float32x2_t float32x2_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:44:9: error: unknown type name '__Poly8x8_t'
typedef __Poly8x8_t poly8x8_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:45:9: error: unknown type name '__Poly16x4_t'
typedef __Poly16x4_t poly16x4_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:46:9: error: unknown type name '__Uint8x8_t'
typedef __Uint8x8_t uint8x8_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:47:9: error: unknown type name '__Uint16x4_t'
typedef __Uint16x4_t uint16x4_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:48:9: error: unknown type name '__Uint32x2_t'
typedef __Uint32x2_t uint32x2_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:49:9: error: unknown type name '__Float64x1_t'
typedef __Float64x1_t float64x1_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:50:9: error: unknown type name '__Uint64x1_t'
typedef __Uint64x1_t uint64x1_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.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
F:\zcu104-rv-ss-2018-3\zcu104_rv_ss\sw\a53_linux\a53_linux\sysroot\aarch64-xilinx-linux/usr/include\bits/types.h:38:26: note: '__int16_t' declared here
typedef signed short int __int16_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:52:9: error: unknown type name '__Int16x8_t'
typedef __Int16x8_t int16x8_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.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
F:\zcu104-rv-ss-2018-3\zcu104_rv_ss\sw\a53_linux\a53_linux\sysroot\aarch64-xilinx-linux/usr/include\bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.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
F:\zcu104-rv-ss-2018-3\zcu104_rv_ss\sw\a53_linux\a53_linux\sysroot\aarch64-xilinx-linux/usr/include\bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.1/include\arm_neon.h:55:9: error: unknown type name '__Float16x8_t'
typedef __Float16x8_t float16x8_t;
^
E:/SDX/SDK/2018.3/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.3.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 while processing F:\Environment_Tutorial\color_detect\src\colordetect.cpp.
ERROR: [TemplateExtract 83-3509] Failed to run clang frontend action of rtl_template_extract!
ERROR: [SdsCompiler 83-5176] RTL template analysis exited with non-zero code processing F:/Environment_Tutorial/color_detect/Release/1 F:/Environment_Tutorial/color_detect/src/colordetect.cpp
sds++ log file saved as F:/Environment_Tutorial/color_detect/Release/_sds/reports/sds_colordetect.log
ERROR: [SdsCompiler 83-5004] Build failed

make: *** [src/subdir.mk:26: src/colordetect.o] Error 1

22:01:23 Build Finished (took 8s.78ms)

Either the version of my SDSoC and reVISION Stack is 2018.3.

How can i solve this problem?

Many thanks.

Tags (3)
0 Kudos
3 Replies
Observer kdavis119
Observer
307 Views
Registered: ‎04-23-2019

Re: Failed building the SDSoC Colordetect Acceleration Project

Did you ever solve this ? 
I am experiencing the same errors and unable to currently get around them

0 Kudos
Xilinx Employee
Xilinx Employee
225 Views
Registered: ‎08-20-2018

Re: Failed building the SDSoC Colordetect Acceleration Project

Hi @yan0110 @kdavis119 

Please verify if you have done below steps.

At the top of the colordetect.cpp file, add the xfOpenCV include statements needed to support the reVISION platform. Replace the following three lines right below #include <iostream>:

#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>

With the following lines of code:

#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 first part related to ARM_NEON is to handle compilation of the OpenCV include/libraries for the Arm processor on the ZCU102. Below the ARM_NEON section is where you are defining the xfOpenCV includes the tool is going to use. Including these files will insure the compiler has access to all functions and datatypes needed.

📌 NOTE: __SDSCC__ is automatically set by the sds++ compiler.

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Xilinx Employee
Xilinx Employee
174 Views
Registered: ‎08-20-2018

Re: Failed building the SDSoC Colordetect Acceleration Project

Hi @kdavis119 @yan0110 

Are you still getting this error?

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos