Xilinx / Vitis-Tutorials

Vitis In-Depth Tutorials
https://Xilinx.github.io/Vitis-Tutorials/
MIT License
1.23k stars 553 forks source link

Get moving with Alveo: fails on sw_emu #381

Open bootonly opened 1 year ago

bootonly commented 1 year ago

Which tutorial are you running? https://github.com/Xilinx/Vitis-Tutorials/tree/2022.2/Hardware_Acceleration/Design_Tutorials/10-get_moving_with_alveo

Describe the issue It fails on sw_emu.

To Reproduce Type: make run TARGET=sw_emu and it will report the error: terminate called after throwing an instance of 'std::runtime_error' what(): Multiple instances of XRT core shim library detected, only one can be loaded at any given time. Please check if application is explicity linked with XRT core library (xrt_core, xrt_hwemu, or xrt_swemu) and remove this linking. Use XCL_EMULATION_MODE set to either hw_emu or sw_emu if running in emulation mode. /bin/sh: line 1: 470683 Aborted (core dumped) XCL_EMULATION_MODE=sw_emu ./00_load_kernels alveo_example.xclbin make: *** [Makefile:26: run] Error 134

Screenshots image

Your environment:

Additional context Add any other context about the problem here.

AnusheelXilinx commented 1 year ago

Hi bootonly,

Please ensure the build was also run with TARGET=sw_emu as the correct libraries are needed. If the build was done with TARGET=sw_emu and you are still seeing the issue, can you please try to modify "design_source/cmake/Modules/FindXRT.cmake" as below and let me know if it works:

From: set(XRT_LIBS ${LIBXRT_CORE_LIBRARY} ${LIBXRT_XILOCL_LIBRARY}) to: set(XRT_LIBS ${LIBXRT_XILOCL_LIBRARY})