AR# 69355

|

SDx 2017.x - File .settings64-SDx.csh does not contain path to "/usr/lib/x86_64-linux-gnu" in LIBRARY_PATH

描述

When compiling host code on an Ubuntu 16.04 or 18.04 machine with SDx (SDAccel) or Vitis, the following errors are seen:

g++ -L<Path>/runtime/lib/x86_64 -lstdc++ -lxilinxopencl -lgomp ./src/streamHost-all.o -o gstreambench
<Path>/lnx64/binutils-2.26/bin/ld: cannot find crt1.o: No such file or directory
<Path>/lnx64/binutils-2.26/bin/ld: cannot find crti.o: No such file or directory
<Path>/lnx64/binutils-2.26/bin/ld: cannot find -lm
<Path>/lnx64/binutils-2.26/bin/ld: cannot find -lc
<Path>/lnx64/binutils-2.26/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status

解决方案

This happens because the linker looks for libraries via LIBRARY_PATH instead of LD_LIBRARY_PATH.

The variable LIBRARY_PATH needs to contain "/usr/lib/x86_64-linux-gnu" on Ubuntu.

You might observe the error in emulation.

The work-around is to use the following command in your terminal to set up the environment:

export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu  // sh
setenv LIBRARY_PATH /usr/lib/x86_64-linux-gnu // csh

Xilinx Forums:

Please seek technical support via the Vitis, SDAccel and SDSoC Board. The Xilinx Forums are a great resource for technical support. 

The entire Xilinx Community is available to help here, and you can ask questions and collaborate with Xilinx experts to get the solutions you need.

AR# 69355
日期 11/08/2019
状态 Active
Type 综合文章
Tools
People Also Viewed