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!
06-25-2018 11:28 PM - edited 06-26-2018 12:34 AM
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.
07-04-2018 06:04 AM
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
06-27-2018 01:22 PM
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
06-28-2018 06:31 AM - edited 06-28-2018 06:31 AM
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.
06-28-2018 06:42 AM
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.
06-28-2018 10:40 AM
I see also, that some IP are blocked, not sure why. Can it influence somehow?
07-04-2018 05:48 AM - edited 07-04-2018 05:49 AM
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
07-04-2018 06:04 AM
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