<div dir="ltr">Hello,<div><br></div><div>I am trying to compile Beignet on Yocto 3.0.1 (zeus) 32 bits for Intel Coffee Lake with UHD 630 Graphics. I have the <a href="https://github.com/kraj/meta-clang">meta-clang layer</a> which provides clang/llvm 9.0. My compilation is failing. I have a bitbake recipe for beignet, with a script borrowed from <a href="https://github.com/rossburton/meta-beignet">meta-beignet</a> and edited (given below). Is there any patch for compiling beignet with LLVM 9.0 for 32 bits?</div><div><br></div><div>I am encountering the following issues during the configure step:</div><div>```</div><div>| CMake Error: Attempt to add a custom rule to output "/home/soham/disk/yocto-vanilla/build/tmp/work/x86_64-linux/beignet-native/1.0+gitAUTOINC+419c041736-r0/build/backend/src/libocl/src/ocl_workitem.cl.rule" which already has a custom rule.<br>| CMake Error: Attempt to add a custom rule to output "/home/soham/disk/yocto-vanilla/build/tmp/work/x86_64-linux/beignet-native/1.0+gitAUTOINC+419c041736-r0/build/backend/src/libocl/src/ocl_async.cl.rule" which already has a custom rule.<br>| CMake Error: Attempt to add a custom rule to output "/home/soham/disk/yocto-vanilla/build/tmp/work/x86_64-linux/beignet-native/1.0+gitAUTOINC+419c041736-r0/build/backend/src/libocl/src/ocl_sync.cl.rule" which already has a custom rule.<br>| CMake Error: Attempt to add a custom rule to output "/home/soham/disk/yocto-vanilla/build/tmp/work/x86_64-linux/beignet-native/1.0+gitAUTOINC+419c041736-r0/build/backend/src/libocl/src/ocl_memcpy.cl.rule" which already has a custom rule.<br>| CMake Error: Attempt to add a custom rule to output "/home/soham/disk/yocto-vanilla/build/tmp/work/x86_64-linux/beignet-native/1.0+gitAUTOINC+419c041736-r0/build/backend/src/libocl/src/ocl_memset.cl.rule" which already has a custom rule<br></div><div>...</div><div>| CMake Error: The following variables are used in this project, but they are set to NOTFOUND.<br>| Please set them or make sure they are set and tested correctly in the CMake files:<br>| CLANG_LIB<br>|     linked by target "gbe" in directory /home/soham/disk/yocto-vanilla/build/tmp/work/x86_64-linux/beignet-native/1.0+gitAUTOINC+419c041736-r0/git/backend/src<br>|     linked by target "gbe" in directory /home/soham/disk/yocto-vanilla/build/tmp/work/x86_64-linux/beignet-native/1.0+gitAUTOINC+419c041736-r0/git/backend/src<br></div><div>```</div><div><br></div><div><br></div><div>The following is my beignet recipe for Yocto:</div><div><br></div><div>```</div><div>DEPENDS = "beignet-native ocl-icd ncurses libdrm libxfixes libx11 libxext clang mesa llvm"<br>DEPENDS_class-native = "clang-native libdrm-native ocl-icd"<br><br># NOTE: spec file indicates the license may be "MIT"<br>inherit cmake pkgconfig pythonnative clang<br><br><br>BBCLASSEXTEND = "native"<br><br>EXTRA_OECMAKE = "-DLLVM_LIBRARY_DIR=${STAGING_LIBDIR} -DBEIGNET_INSTALL_DIR=/usr/lib/beignet -DCMAKE_BUILD_TYPE=Release -DCOMPILER=clang"<br>EXTRA_OECMAKE_append_class-target = " -DCMAKE_SKIP_RPATH=TRUE -DUSE_STANDALONE_GBE_COMPILER=true"<br>EXTRA_OECMAKE_append_class-target = " -DGEN_PCI_ID=0x3e92"<br><br># TODO respect distrofeatures for x11<br>PACKAGECONFIG ??= ""<br>PACKAGECONFIG[examples] = '-DBUILD_EXAMPLES=1,-DBUILD_EXAMPLES=0,libva'<br># TODO: add explicit on/off upstream<br>PACKAGECONFIG[x11] = ",,libxext libxfixes"<br><br>FILES_${PN} += " \<br>                ${sysconfdir}/OpenCL/vendors/intel-beignet.icd \<br>                ${libdir} ${includedir} \<br>               "<br><br>FILES_${PN}-dev = ""<br><br>do_install_append() {<br>    # Remove the headers; these will be included by another recipe<br>    rm -rf ${D}${includedir}/CL<br><br>    # Create intel-beignet.icd file<br>    mkdir -p ${D}${sysconfdir}/OpenCL/vendors/<br>    echo ${libdir}/beignet/libcl.so > ${D}${sysconfdir}/OpenCL/vendors/intel-beignet.icd<br>}<br><br>do_install_append_class-target() {<br>    install -d ${D}${bindir}<br>    install -m 0755 ${B}/backend/src/gbe_bin_generater ${D}${bindir}<br><br>    install -d ${D}${libdir}/beignet/include<br>    install -m 0755 ${B}/utests/utest_run ${D}${libdir}/beignet<br>    install -m 0755 ${B}/utests/setenv.sh ${D}${libdir}/beignet<br>    install -m 0644 ${S}/kernels/*.cl ${D}${libdir}/beignet<br>    install -m 0644 ${S}/kernels/*.bmp ${D}${libdir}/beignet<br>    install -m 0644 ${S}/kernels/compiler_ceil.bin ${D}${libdir}/beignet<br>    install -m 0644 ${S}/kernels/runtime_compile_link.h ${D}${libdir}/beignet<br>    install -m 0644 ${S}/kernels/include/runtime_compile_link_inc.h ${D}${libdir}/beignet/include/runtime_compile_link_inc.h<br>    install -d ${D}${libdir}<br>    install -m 0644 ${B}/utests/libutests.so ${D}${libdir}<br>}<br><br>do_install_class-native() {<br>    install -d ${D}${libdir}/cmake<br>    install -m644 ${S}/CMake/FindStandaloneGbeCompiler.cmake ${D}${libdir}/cmake<br><br>    install -d ${D}${bindir}<br>    install ${B}/backend/src/gbe_bin_generater ${D}${bindir}<br><br>    install -d ${D}${bindir}/include<br>    install ${B}/backend/src/libocl/usr/lib/beignet/include/* ${D}${bindir}/include<br>}<br></div><div>```</div><div><br></div><div>I would appreciate any help or pointer.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Regards,<div>Soham S</div><div>PhD Student, Department of Computer Science</div><div>Boston University</div></div></div></div></div></div></div></div></div></div>