[Beignet] Problems compiling the OCL20 branch

Jesper Puge (s113443) s113443 at student.dtu.dk
Tue Oct 25 21:13:32 UTC 2016


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



More information about the Beignet mailing list