Building with Xilinx 24.1 with a license inside docker

I currently have an issue where building with Xilinx 24 seems to run into internal errors only when trying to build for FPGA’s that require a license. HDL seems to build fine for smaller devices, but runs into issues when trying an ocpiadmin install on the HDL part of the OSP. This leads me to believe this Isn’t an issue with OpenCPI but with Xilinx its self. Posting here just in case anyone else has come across this issue.

Attempted to build both with docker containers with Rocky 8 + v2.4.7 and Rocky 9 + v2.4.8, both run into the same issue:

My vivado.out shows:

Attempting to get a license for feature 'Synthesis' and/or device 'xc7z045'
munmap_chunk(): invalid pointer
Abnormal program termination (6)

And the stack trace this points at:

#
# An unexpected error has occurred (6)
#
Stack:
/lib64/libc.so.6(+0x4e630) [0x7f2d2bebb630]
/lib64/libc.so.6(gsignal+0x10f) [0x7f2d2bebb5af]
/lib64/libc.so.6(abort+0x127) [0x7f2d2be8eee5]
/lib64/libc.so.6(+0x8f887) [0x7f2d2befc887]
/lib64/libc.so.6(+0x96b8c) [0x7f2d2bf03b8c]
/lib64/libc.so.6(+0x96fac) [0x7f2d2bf03fac]
/lib64/libselinux.so.1(selinuxfs_exists+0xcc) [0x7f2ceb4c4e4c]
/lib64/libselinux.so.1(+0x7d0c) [0x7f2ceb4bcd0c]
/lib64/ld-linux-x86-64.so.2(+0x911a) [0x7f2d2e2db11a]
/lib64/ld-linux-x86-64.so.2(+0x921a) [0x7f2d2e2db21a]
/lib64/libc.so.6(_dl_catch_exception+0xdc) [0x7f2d2bfe5aec]
/lib64/ld-linux-x86-64.so.2(+0x1092e) [0x7f2d2e2e292e]
/lib64/libc.so.6(_dl_catch_exception+0x84) [0x7f2d2bfe5a94]
/lib64/ld-linux-x86-64.so.2(+0x10b81) [0x7f2d2e2e2b81]
/lib64/libdl.so.2(+0xf8a) [0x7f2d27740f8a]
/lib64/libc.so.6(_dl_catch_exception+0x84) [0x7f2d2bfe5a94]
/lib64/libc.so.6(_dl_catch_error+0x33) [0x7f2d2bfe5b53]
/lib64/libdl.so.2(+0x152e) [0x7f2d2774152e]
/lib64/libdl.so.2(dlopen+0x4a) [0x7f2d2774102a]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(xilinxd_52bd85b956c3a2c4+0x16) [0x7f2d23a1d3a6]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(xilinxd_52bd86ce1027d014+0xa0) [0x7f2d23a1d640]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(+0x12e128) [0x7f2d23a18128]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(xilinxd_52bd866351b78202+0x9) [0x7f2d23a185e9]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(+0xdb467) [0x7f2d239c5467]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(xilinxd_52bd862318b59a70+0x86) [0x7f2d239c5226]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(+0xc879f) [0x7f2d239b279f]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(xilinxd_52bd9e923616155c+0x50) [0x7f2d239948b0]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(xilinxd_52bda08d467867f9+0x257) [0x7f2d239a8707]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(+0xc2b6b) [0x7f2d239acb6b]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(xilinxd_52bd940d725306a5+0x399) [0x7f2d239a77e9]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(xilinxd_52bd6fcc5faf4a0e+0x5a) [0x7f2d239a795a]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libXil_lmgr11.so(XilFNP::XilFlex::XF_lc_checkout(lm_handle*, char*, char*, int, int, vendorcode7*, int, unsigned char*)+0x15f) [0x7f2d2395d8df]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_commonxillic.so(+0x83f2a) [0x7f2d2844cf2a]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_commonxillic.so(+0x84c91) [0x7f2d2844dc91]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_commonxillic.so(XilReg::Utils::GetRegKey(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, int*, bool*, int*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, lm_handle*>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, lm_handle*> > >&)+0x9c) [0x7f2d2844e77c]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_commonxillic.so(XilReg::Utils::GetRegKey(lm_handle**, 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&, int*, bool*, int*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool*, unsigned char*)+0x82) [0x7f2d2844e812]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_common.so(HLRegMgr::checkoutFeature(HLFeature*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool) const+0x1ff) [0x7f2d2d1c7dcf]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_common.so(HLRegMgr::getFeature(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const+0x297) [0x7f2d2d1c8e57]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_common.so(HLRegUtils::HLLRegCheckHandler::getRegKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x3f) [0x7f2d2d1c972f]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_vivadotasks.so(+0x789ff8) [0x7f2ced187ff8]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_vivadotasks.so(+0x797063) [0x7f2ced195063]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_common.so(+0xd85d9f) [0x7f2d2d562d9f]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libtcl8.6.so(TclNRRunCallbacks+0x47) [0x7f2d27f4c497]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libtcl8.6.so(+0x45309) [0x7f2d27f4e309]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libtcl8.6.so(Tcl_FSEvalFileEx+0x1f8) [0x7f2d28003ae8]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_commontasks.so(+0x27c1d5) [0x7f2d211681d5]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_common.so(+0xd85d9f) [0x7f2d2d562d9f]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libtcl8.6.so(TclNRRunCallbacks+0x47) [0x7f2d27f4c497]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_commontasks.so(+0x2c4bad) [0x7f2d211b0bad]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_commontasks.so(+0x2c61df) [0x7f2d211b21df]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_common.so(+0xd85d9f) [0x7f2d2d562d9f]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libtcl8.6.so(TclNRRunCallbacks+0x47) [0x7f2d27f4c497]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_commonmain.so(+0xe6d2) [0x7f2d2e4f26d2]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/libtcl8.6.so(Tcl_MainEx+0x1a8) [0x7f2d2800b038]
/tools/Xilinx/Vivado/2024.1/lib/lnx64.o/librdi_common.so(+0xdaf42b) [0x7f2d2d58c42b]
/lib64/libpthread.so.0(+0x81ca) [0x7f2d2bc551ca]
/lib64/libc.so.6(clone+0x43) [0x7f2d2bea6953]

This leads me to believe that the issue is with how Xilinx’s internal license manager is probing my docker container for its information.

Fixes I have tried:

  • Added ‘OCPI_LD_PRELOAD=/usr/lib64/libudev.so.1’ before installing opencpi
  • Ensured that vivado can find and accept the license file using its own inbuilt license manager vlm.
  • Disabling Selinux using both setenforce 0 and in my compose file:
security_opt:
 - label=disable 

Just to add another dataset I just tested this using rocky9 docker container from the gitlab container registry to build zcu111 platform, which requires a license, using Xilinx 2024.1 tools. My development host is Ubuntu 24.04.

Though I’m am using the develop branch. I’ll try v2.4.8 next.

What is your host os?

This is what the container file we use in the pipelines has:

FROM rockylinux:9 as base
ENV LANG="en_US.UTF-8"
ENV OCPI_LD_PRELOAD="/usr/lib64/libudev.so.1"
WORKDIR /home/user/opencpi
RUN touch /.dockerenv && yum update -y && yum install -y git iputils

So in addition to OCPI_LD_PRELOAD it also sets LANG.

Tested with v2.4.8 as well and was able to complete zcu111 install platform which builds testbias hdl assembly.

My host is Rocky 8.10

I don’t recall how this error visually manifests, but are you using --network host?

docker run --network host <image>

I could be misremembering, but I think I’ve had stack traces in the past relating to the inability to check the container MAC address.

1 Like