Skip to content

Instantly share code, notes, and snippets.

@hypothermic
Last active April 26, 2022 08:05
Show Gist options
  • Save hypothermic/074b88831f86d2ac7e048a879c85b5b9 to your computer and use it in GitHub Desktop.
Save hypothermic/074b88831f86d2ac7e048a879c85b5b9 to your computer and use it in GitHub Desktop.
Using Xilinx Vitis Vision libraries on Arch Linux

How to get Vitis HLS Vision 2021.2 running on Arch Linux

This information will probably be outdated once you read it, because Arch is a rolling distro, which means that packages get updated almost immediately when they get released. Old software like Xilinx tools depend on specific versions of these libraries and they don't like newer versions. This means that you'll have to downgrade some packages to get Xilinx tools like Vitis HLS working on your Arch machine.

  1. Downgrade opencv to 4.4.0-3
  2. Downgrade tbb to 2020.3
  3. Downgrade openexr (they changed name November 2021 so the Xilinx tools still refer to it as libIlmImf) to 2.5.5-1

And finally, you have to provide your system's libstdc++ library to HLS, because the default shipped version is so ancient that is has different ABI. Example using the default installation path:

mv /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.o/Default /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.o/Default_BACKUP
mkdir /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.0/Default
ln -s /usr/lib/libstdc++.so /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.o/Default/libstdc++.so
ln -s /usr/lib/libstdc++.so /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.o/Default/libstdc++.so.6
ln -s /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.o/Default_BACKUP/libgomp.so.1 /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.o/Default/libgomp.so.1
ln -s /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.o/Default_BACKUP/libgcc_s.so.1 /opt/Xilinx/Vitis_HLS/2021.2/lib/lnx64.o/Default/libgcc_s.so.1

That's all!

P.S. If you're running the makefiles included in the Vitis Vision examples, make sure to specify the opencv header/lib paths and the vivado path:

make run CSIM=1 CSYNTH=0 COSIM=0 XPART=<part> OPENCV_INCLUDE=/usr/include/opencv4 OPENCV_LIB=/usr/lib XILINX_VIVADO=/opt/Xilinx/Vivado/2021.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment