Currently trying to move an XRT application from a 32-bit build to a 64-bit build. Presently using static linking to the XRT libraries on the 32 bit platform. Trying to do the same on the 64 bit platform gives the error below:
What is believed being done is taking the static XRT library and linking it into a dynamic library owned by the developers. This is not working for the 64-bit build but has been working fine for the 32-bit build.
Error:
/usr/bin/ld: /software/xrt/linux64.xrt17c/lib/libxrtgear.a(XrtGearString.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /software/xrt/linux64.xrt17c/lib/libxrtgear.a: could not read symbols: Bad value collect2: ld returned 1 exit status
Is static linking known to work on x86_64 (amd64) platform?
"Taking the static XRT library and linking it into a dynamic library of ours" is not a supported use of the XRT static libraries. If it potentially worked in the past, it is not intended to work as it is not supported.
XRT libraries are available as shared dynamic libraries, and that's what it should be used for if the intent is to create a shared library - the XRT dynamic library would be dynamically linked and distributed with the customer's library.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center