OpenCL examples do not compile with SDx 2018.3
Closed this issue · 1 comments
Moschn commented
I am using ubuntu 18.04 and SDx 2018.3. The OpenCL examples in this repo do not compile on my machine. E.g., running make clean all
in ocl/getting_started/hello_vadd_ocl results in
aarch64-linux-gnu-g++ -o 'build/zcu102_hw/vadd' src/host.cpp ../../../libs/xcl2/xcl2.cpp -I/opt/Xilinx/SDx/2018.3/runtime/include/1_2/ -I/opt/Xilinx/SDx/2018.3/Vivado_HLS/include/ -O2 -g -Wall -std=c++14 -lxilinxopencl -lpthread -lrt -ldl -lcrypt -lstdc++ -L/opt/Xilinx/SDx/2018.3/runtime/lib/aarch64 -I../../../libs/xcl2
In file included from src/host.cpp:37:0:
../../../libs/xcl2/xcl2.hpp:38:10: fatal error: CL/cl2.hpp: No such file or directory
#include <CL/cl2.hpp>
^~~~~~~~~~~~
compilation terminated.
To fix this, I tried to add another include directive to the compiler (i.e., -I/usr/include
since cl2.hpp
is in /usr/include/CL/cl2.hpp
) but then the compiler complains about float128 amongs other errors:
In file included from /usr/include/wchar.h:30:0,
from /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/7.3.1/cwchar:44,
from /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/7.3.1/bits/postypes.h:40,
from /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/7.3.1/iosfwd:40,
from /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/7.3.1/ios:38,
from /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/7.3.1/ostream:38,
from /opt/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/include/c++/7.3.1/iterator:64,
from /usr/include/CL/cl2.hpp:543,
from ../../../libs/xcl2/xcl2.hpp:38,
from src/host.cpp:37:
/usr/include/bits/floatn.h:87:9: error: ‘__float128’ does not name a type; did you mean ‘__cfloat128’?
typedef __float128 _Float128;
heeran-xilinx commented
Closing this issue as this repository is only for older released version of tool and no more support is available.
Please use latest Repository: https://github.com/Xilinx/Vitis_Accel_Examples for Xilinx latest Tool chain.