Hi Jesper, The OCL20 branch can only build with LLVM3.8+ for some OpenCL 2.0 features need frontend support, and for LLVM3.8 we need some patch for clang. And for LLVM3.9 there are some change we have not merged into OCL20 branch. So if you would try the OCL20 branch, I suggest you build a llvm 3.8 and I will provide the patch set for clang in another mail.
Thanks Xiuli -----Original Message----- From: Beignet [mailto:[email protected]] On Behalf Of Jesper Puge (s113443) Sent: Wednesday, October 26, 2016 5:14 AM To: [email protected] Subject: [Beignet] Problems compiling the OCL20 branch Hi, I am trying to compile the head of the OCL20 branch to test shared virtual memory, but it will not compile. I have previously compiled the 1.2 release using LLVM 3.6, but I can see API changes in the code that suggest a newer version of LLVM is required. What version of LLVM is known to work with the branch? Do I need to supply any special parameters to CMake to make the build work? I run cmake with the following command: CC=clang-3.6 CXX=clang++-3.6 cmake -DCMAKE_VERBOSE_MAKEFILE=true -DCMAKE_BUILD_TYPE=Debug -DLLVM_INSTALL_DIR=/usr/bin -DCMAKE_C_COMPILER=clang-3.6 -DCOMPILER=LLVM --DCMAKE_INSTALL_PREFIX:PATH=/path/to/project/bin ../ The first error I encounter is that it does not know atomic_int: cd /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl && /usr/bin/clang-3.6 -cc1 -fno-builtin -ffp-contract=off -cl-kernel-arg-info -fblocks -triple spir64 -DGEN7_SAMPLER_CLAMP_BORDER_WORKAROUND -cl-std=CL2.0 -I /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl//usr/local/lib/beigne t//include/ -emit-llvm-bc -o /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl//usr/local/lib/beigne t//ocl_atom.bc -x cl /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl/src/ocl_atom.cl In file included from /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl/src/ocl_atom.cl:18: /home/s113443/gpgpu/git/ocl20/build/backend/src/libocl//usr/local/lib/beigne t//include/ocl_atom.h:116:22: error: unknown type name 'atomic_int' ATOMIC_GEN_FUNCTIONS(atomic_int, int, 32) ^ I have tried to include stdatomic.h that defines atomic_int, but this let to other errors. Any help on this would be much appreciated. Best regards, Jesper _______________________________________________ Beignet mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/beignet
