cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kousei.iwabuchi
Participant
Participant
1,497 Views
Registered: ‎06-27-2018

Vitis Vision Library example build error

Jump to solution

Hi,

I tried to build Vitis Vision Library example, and I got error.

The step is as follows.

1. Download ZCU102 base platform(ZCU102 Base 2019.2) and sysroot(Cross-Compilation Sysroot) from https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-platforms.html and extract to /opt/Vitis/2019.2/platform.

2. git clone https://github.com/Xilinx/Vitis_Libraries

3. Launch Vitis, and create new Empty project selecting above zcu102 platform.

4. Copy following example source code to project src directory.

  Vitis_Libraries/vision/L2/examples/gaussianfilter/*.cpp, *.h

  Vitis_Libraries/vision/L2/examples/gaussianfilter/build/xf_config_params.h

5. Add include path "Vitis_Libraries/vision/L1/include" and libraries of openCV(opencv_core, opencv_highgui....).

6. Build project, and got error message.

17:19:04 **** Incremental Build of configuration Hardware for project image_filter_zcu102 ****
make -j8 incremental 
/opt/Vitis/2019.2/bin/v++ --target hw --compile -I"../src" --config common-config.ini --config binary_container_1-gaussian_filter_accel-compile.ini -I/home/iwabuchi/Vitis/Vitis_Libraries/vision/L1/include -o"binary_container_1.build/gaussian_filter_accel.xo" "../src/xf_gaussian_filter_accel.cpp"
Option Map File Used: '/opt/Vitis/2019.2/data/vitis/vpp/optMap.xml'

****** v++ v2019.2 (64-bit)
  **** SW Build 2708876 on Wed Nov  6 21:39:14 MST 2019
    ** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

INFO: [v++ 60-1306] Additional information associated with this v++ compile can be found at:
	Reports: /home/iwabuchi/workspace_vitis/image_filter_zcu102/Hardware/binary_container_1.build/reports/gaussian_filter_accel
	Log files: /home/iwabuchi/workspace_vitis/image_filter_zcu102/Hardware/binary_container_1.build/logs/gaussian_filter_accel
Running Dispatch Server on port:46450
INFO: [v++ 60-1548] Creating build summary session with primary output /home/iwabuchi/workspace_vitis/image_filter_zcu102/Hardware/binary_container_1.build/gaussian_filter_accel.xo.compile_summary, at Mon Jan 20 17:19:07 2020
INFO: [v++ 60-1316] Initiating connection to rulecheck server, at Mon Jan 20 17:19:07 2020
INFO: [v++ 60-895]   Target platform: /opt/Vitis/2019.2/platforms/zcu102_base/zcu102_base.xpfm
INFO: [v++ 60-1578]   This platform contains Xilinx Shell Archive '/opt/Vitis/2019.2/platforms/zcu102_base/hw/zcu102_base.xsa'
INFO: [v++ 60-585] Compiling for hardware target
INFO: [v++ 60-423]   Target device: zcu102_base
INFO: [v++ 60-242] Creating kernel: 'gaussian_filter_accel'

===>The following messages were generated while  performing high-level synthesis for kernel: gaussian_filter_accel Log file: /home/iwabuchi/workspace_vitis/image_filter_zcu102/Hardware/binary_container_1.build/gaussian_filter_accel/gaussian_filter_accel/vivado_hls.log :
INFO: [v++ 204-61] Option 'relax_ii_for_timing' is enabled, will increase II to preserve clock frequency constraints.
ERROR: [v++ 203-191] Unsupported pointer usage: ''  used by 'out_mat.data.chnl.V.load'  in function  'gaussian_filter_accel' .
ERROR: [v++ 200-70] Synthesizability check failed.
ERROR: [v++ 60-300] Failed to build kernel(ip) gaussian_filter_accel, see log for details: /home/iwabuchi/workspace_vitis/image_filter_zcu102/Hardware/binary_container_1.build/gaussian_filter_accel/gaussian_filter_accel/vivado_hls.log
ERROR: [v++ 60-599] Kernel compilation failed to complete
ERROR: [v++ 60-592] Failed to finish compilation
makefile:82: ターゲット 'binary_container_1.build/gaussian_filter_accel.xo' のレシピで失敗しました
make: *** [binary_container_1.build/gaussian_filter_accel.xo] エラー 1

17:19:30 Build Finished (took 25s.477ms)

(sorry including japanese letters :)

Anyone knows the cause of this error message, or walk around?

0 Kudos
1 Solution

Accepted Solutions
kousei.iwabuchi
Participant
Participant
1,434 Views
Registered: ‎06-27-2018

I could resolve by my self.

By adding these defines to Settings, I could build and run.

  • __SDSVHLS__
  • HLS_NO_XIL_FPO_LIB

View solution in original post

Settings.png
4 Replies
kousei.iwabuchi
Participant
Participant
1,435 Views
Registered: ‎06-27-2018

I could resolve by my self.

By adding these defines to Settings, I could build and run.

  • __SDSVHLS__
  • HLS_NO_XIL_FPO_LIB

View solution in original post

Settings.png
cana11xxx
Visitor
Visitor
1,396 Views
Registered: ‎11-25-2019

In order to try to build Vitis Vision Library example, what libraries of OpenCV did you add?

I added 9 OpenCV libraries (opencv_core, opencv_video, opencv_highgui, opencv_imgcodecs, opencv_imgproc, opencv_features2d, opencv_flan, opencv_video and opencv_calib3d) but I got error messages.

aarch64-linux-gnu-g++ -o "test102.exe" src/xf_gaussian_filter_accel.o src/xf_gaussian_filter_tb.o -lxilinxopencl -lopencv_core -lopencv_videoio -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_features2d -lopencv_flann -lopencv_video -lopencv_calib3d -lopencv_ml -lopencv_objdetect -lpthread -lrt -ldl -lcrypt -lstdc++ -L/vitis-prj/sysroot-vitis/sysroots/aarch64-xilinx-linux/usr/lib/ --sysroot=/vitis-prj/sysroot-vitis/sysroots/aarch64-xilinx-linux
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: src/xf_gaussian_filter_tb.o: in function `main':
xf_gaussian_filter_tb.cpp:(.text.startup+0x17c): undefined reference to `cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x290): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x29c): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
makefile:84: recipe for target 'test102.exe' failed
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x2dc): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x2f4): undefined reference to `cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x34c): undefined reference to `xcl::get_xil_devices()'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x424): undefined reference to `xcl::find_binary_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x488): undefined reference to `xcl::import_binary_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x994): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x9ac): undefined reference to `cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x9d8): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x9e4): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x9f0): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0xa1c): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0xa34): undefined reference to `cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
collect2: error: ld returned 1 exit status
make: *** [test102.exe] Error 1
0 Kudos
kousei.iwabuchi
Participant
Participant
1,389 Views
Registered: ‎06-27-2018

I added only 4 opencv libs.

  • opencv_core
  • opencv_highgui
  • opencv_imgproc
  • opencv_imgcodecs

Could you build by Makefile included in build directory as following command, without error?

$  make host xclbin TARGET=hw BOARD=Zynq ARCH=aarch64 DEVICE=<platform>

And, xcl:: functions are defined in "Vitis_Libraries/vision/ext/xcl2/xcl2.cpp, xcl2.hpp". So please add these files to your project.

0 Kudos
cana11xxx
Visitor
Visitor
1,365 Views
Registered: ‎11-25-2019

Thank you for your replying.

After I added xcl2.cpp and xcl2.hpp to my project src directory, didn't get xcl errors.
But I have got 11 cv errors still.

/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x290): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x29c): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x2dc): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x2f4): undefined reference to `cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
/tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x994): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)' /tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x9ac): undefined reference to `cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' /tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x9d8): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)' /tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x9e4): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)' /tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0x9f0): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)' /tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0xa1c): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)' /tools/Xilinx/Vitis/2019.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/8.2.0/../../../../aarch64-linux-gnu/bin/ld: xf_gaussian_filter_tb.cpp:(.text.startup+0xa34): undefined reference to `cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'

I cannot build by Makefile. I am thinking about the solution now.

0 Kudos