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 zhengjia
Participant
400 Views
Registered: ‎07-23-2018

xfopencv include“hls_opencv.h” throw errors

I download the xfopencv from git. It can compile correctly. I want to use the hls::resize() function. So I modify the code to  include "hls_opencv.h" and "hls_video.h" , I refer to https://forums.xilinx.com/t5/SDSoC-Environment-and-reVISION/hls-CvtColor-amp-xf-Threshold/m-p/899203#M2985.

Then it throw erros.Do you have any ideas? It will be helpful that give me some examples useing the hls lib in SDSoc.

make pre-build main-build
sdsoc_make_clean Release

Building file: ../src/top.cpp
Invoking: SDS++ Compiler
sds++ -DHLS_NO_XIL_FPO_LIB -Wall -O3 -I"../src" -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/zcu102_rv_ss/sw/a53_linux/a53_linux/inc/xfopencv -c -fmessage-length=0 -MT"src/top.o" -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/c++/6.2.1 -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/c++/6.2.1/aarch64-xilinx-linux -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/c++/6.2.1/backward -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/glib-2.0 -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/lib/glib-2.0/include -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1 -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1/aarch64-linux-gnu -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1/backward -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include-fixed -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include -Wno-overloaded-virtual -Wno-unused-label -Wno-strict-overflow -Wno-uninitialized -Wno-unused-function -Wno-unused-variable -Wno-unknown-attributes -Wno-unused-local-typedefs -Wno-sign-compare -mstrict-align -hls-target 1 -MMD -MP -MF"src/top.d" -MT"src/top.o" -o "src/top.o" "../src/top.cpp" -sds-hw integralimagehls top.cpp -clkid 2 -sds-end -sds-sys-config a53_linux -sds-proc a53_linux -sds-pf "/home/zhengjia/SDSoc/platform/zcu102_rv_1802/zcu102_rv_ss"
Processing -sds-hw block for integralimagehls
Create data motion intermediate representation
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_int_special.h:99:1: warning: 'complex' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
struct complex<ap_int<_AP_W> > {
^
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_int_special.h:71:24: note: did you mean struct here?
template<typename _Tp> class complex;
^~~~~
struct
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_fixed_special.h:99:1: warning: 'complex' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
struct complex<ap_fixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N> > {
^
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_fixed_special.h:71:24: note: did you mean struct here?
template<typename _Tp> class complex;
^~~~~
struct
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_int_special.h:71:24: note: did you mean struct here?
template<typename _Tp> class complex;
^~~~~
struct
/home/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
/home/tools/SDx2018.2/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/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
/home/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/tools/SDx2018.2/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/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:38:26: note: '__int16_t' declared here
typedef signed short int __int16_t;
^
/home/tools/SDx2018.2/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/tools/SDx2018.2/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/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
/home/tools/SDx2018.2/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/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
/home/tools/SDx2018.2/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/tools/SDx2018.2/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/zhengjia/SDSoc/sdsoc182/sdx_gui/hars/hars/src/top.cpp
sds++ log file saved as /home/zhengjia/SDSoc/sdsoc182/sdx_gui/hars/hars/Release/_sds/reports/sds_top.log
ERROR: [SdsCompiler 83-5004] Build failed

make: *** [src/top.o] Error 1

15:13:37 Build Finished (took 7s.349ms)

0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
375 Views
Registered: ‎08-20-2018

Re: xfopencv include“hls_opencv.h” throw errors

 

Hi @zhengjia

1. Are you building it in command line or in SDx GUI

2. If in command line, in Makefile update platform path (line no. 4 PLATFORM ?= )

 

Best Regards,

Nutan

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Participant zhengjia
Participant
359 Views
Registered: ‎07-23-2018

Re: xfopencv include“hls_opencv.h” throw errors

In command line. I used the reVISION platform.(PLATFORM=/home/zhengjia/SDSoc/platform183/zcu102_rv_ss/), Without the hls lib. The project can compile correctly. So  I doubt that whether the SDSoc can support the hls_opencv.h and hls_video.h lib?

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

Re: xfopencv include“hls_opencv.h” throw errors

Hi @zhengjia

Which example you are trying to compile?

xFopencv is updated recently, please clone repository again and check.

I would also recommend to use GUI based build.

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

Re: xfopencv include“hls_opencv.h” throw errors

Hi @zhengjia,

The error is because of "hls_opencv.h". OpenCV includes needed to be guarded and ARM NEON includes should be undefined, when building for SDSoC. You can see how it is done here.

Also, the whole HLS Video Library has been ported to xfOpenCV in 2018.3 version.  Hence, you can use xf::Resize function instead of hls::Resize, without any issue. For more details, check the "Migrating HLS Video Library to xfOpenCV" section of UG1233.