UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer skotti
Observer
1,942 Views
Registered: ‎06-18-2018

Vivado failed to link libdpi.so

Jump to solution

Hello!

I try to compile my kernel with xocc compiler. I had all correct options for 2018.1 version. Now I thought they will be valid for 2018.2 as well , but turned out that not.

(for 2018.2 I used the same but with 2018.2 everywhere)

 

/opt/Xilinx/SDx/2018.1/bin/emconfigutil -f xilinx_kcu1500_dynamic_5_0
/opt/Xilinx/SDx/2018.1/bin/xocc -t hw_emu -c -k kernel0 --platform xilinx_kcu1500_dynamic_5_0 initial_test_kernel.cl -o kernel0.xo
/opt/Xilinx/SDx/2018.1/bin/xocc -t hw_emu -l kernel0.xo --platform xilinx_kcu1500_dynamic_5_0 -o kernel0.xclbin
export XCL_EMULATION_MODE=true
export XILINX_SDX=/opt/Xilinx/SDx/2018.1

and environment variables:

 

export XILINX_SDACCEL=/opt/Xilinx/SDx/2018.1
export XILINX_SDX=/opt/Xilinx/SDx/2018.1
export XILINX_OPENCL=/opt/Xilinx/SDx/2018.1
export LD_LIBRARY_PATH=/usr/local/lib:/opt/Xilinx/SDx/2018.1/runtime/lib/x86_64:/opt/Xilinx/SDx/2018.1/lib/:/opt/Xilinx/SDx/2018.1/lib/lnx64.o/:/opt/Xilinx/SDx/2018.1/:/opt/Xilinx/SDx/2018.1/lib/lnx64.o/:/opt/Xilinx/SDx/2018.1/runtime/lib/x86_64/:/opt/Xilinx/SDx/2018.1/lib/lnx64.o/Default
export XCL_EMULATION_MODE=hw_em

All licenses are correct.

Attached are kernel and host code. And also a log from vivado. I managed to launch like this what I wanted in 2018.1 and want to preserve this flow on a new version. From where does this inconsistency go? I tried this on the correct ubuntu (16.04.3, currently I use 16.04.1) - the same fault.

 

 

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
Observer remy561
Observer
2,108 Views
Registered: ‎06-20-2018

Re: Vivado failed to link libdpi.so

Jump to solution

Hey Skotti,

 

I've managed to resolve this issue by installing the following package: libc6-dev-i386

 

By looking into the compile.log file located in the directory where the libdpi.so should be generated, I found 23 compilation errors had popped up. All these errors were caused by a missing sys/cdefs.h which is included in those files. A quick google search pointed me to this missing library, which resolved the issues and allows the hw_emu build compile successfully. :)

 

Kind regards,
Remy

 

6 Replies
Xilinx Employee
Xilinx Employee
1,887 Views
Registered: ‎09-08-2011

Re: Vivado failed to link libdpi.so

Jump to solution

I tried this in 2018.2:

 

>xocc -t hw_emu -c -k kernel0 --platform xilinx_kcu1500_dynamic_5_0 initial_test_kernel.cl -o kernel0.xo

>xocc -t hw_emu -l kernel0.xo --platform xilinx_kcu1500_dynamic_5_0 -o kernel0.xclbin

 

And got it to link.

 

Is the issue in the host? do you have the command you used for the host build? xcpp? Can you share that portion next?

 

Thanks,


Evan

If at first you don't succeed, try redefining success?
0 Kudos
Observer skotti
Observer
1,877 Views
Registered: ‎06-18-2018

Re: Vivado failed to link libdpi.so

Jump to solution

Linking failed for  /home/anastasiia/_x/link/vivado/prj/prj.sim/sim_1/behav_gdb/xsim/libdpi.so - this is emitted exactly on the second xocc command with -l option.

On this stage from console output: Hardware accelerator integration...

 

What is this library for? I see that it is situated in automatically generated folders for vivado, so seems this is his internal library, yes?

 

Link has failed for this library, I assume that the host code does not perform any role, when I try to run xocc command. So when executing these two commands I didn't have the host code even compiled. (this worked for 2018.1, I mean, absence of compiled source code, when compiling and linking the kernel, so I assume it should be correct for 2018.2 as well).

I tried these two on both ubuntu16.04.1 and 16.04.3 and got the same error. Seems that the problem is not in OS version. Or maybe I need to use completely another os?

 

Perhaps I should specify something additional in environment variables or so? If they work for you, then the problem is in environment and absence of some libs or their correctness. But I can't imagine what additional should be configured.

0 Kudos
Observer skotti
Observer
1,873 Views
Registered: ‎06-18-2018

Re: Vivado failed to link libdpi.so

Jump to solution

P.S. Additionally to the extended answer: I tried to install on a pure virtual machine and run there, still linking is failed. I really assume that something should be different for initial 2018.2 configuration.

0 Kudos
Observer skotti
Observer
1,857 Views
Registered: ‎06-18-2018

Re: Vivado failed to link libdpi.so

Jump to solution

I see also, that some IP are blocked, not sure why. Can it influence somehow?

0 Kudos
Observer remy561
Observer
1,772 Views
Registered: ‎06-20-2018

Re: Vivado failed to link libdpi.so

Jump to solution

Hi Skotti,

 

I'm currently having the exact same issue using 2018.2 on Ubuntu 16.04.4.

Everything of the SDAccel tooling seems to work, except for hw_emulation which fails on linking libdpi.so with the following error:

ERROR: [XSIM 43-4452] Linking failed for "/home/remqui/git/rabbitct/src/modules/OpenCL/OpenCL_Xilinx/XOCL_0_Arguments/_x/link/vivado/prj/prj.sim/sim_1/behav_gdb/xsim/libdpi.so". Please check the log files or run with "-v" option for more messages.

When looking into the directory of the to be linked libdpi.so, I see a lot of files but no shared libraries.

So, any idea on how to get the tooling to create or link to the correct file?

 

Kind regards,
Remy

 

0 Kudos
Observer remy561
Observer
2,109 Views
Registered: ‎06-20-2018

Re: Vivado failed to link libdpi.so

Jump to solution

Hey Skotti,

 

I've managed to resolve this issue by installing the following package: libc6-dev-i386

 

By looking into the compile.log file located in the directory where the libdpi.so should be generated, I found 23 compilation errors had popped up. All these errors were caused by a missing sys/cdefs.h which is included in those files. A quick google search pointed me to this missing library, which resolved the issues and allows the hw_emu build compile successfully. :)

 

Kind regards,
Remy