meta-clang icon indicating copy to clipboard operation
meta-clang copied to clipboard

spirv-llvm-translator(-native) can't be built in current master

Open zboszor opened this issue 3 years ago • 1 comments

clang/llvm is 13.0.1, spirv-llvm-translator is 14.0.0 current master in meta-clang at the moment.

This combination results in a configuration error:

| CMake Error at CMakeLists.txt:77 (find_package):
|   Could not find a configuration file for package "LLVM" that is compatible
|   with requested version "14.0.0".
| 
|   The following configuration files were considered but not accepted:
| 
|     /data/genericx86-64-yocto-3.5/tmp-sicom-glibc/work/x86_64-linux/spirv-llvm-translator-native/14.0.0-r0/recipe-sysroot-native/usr/lib/cmake/llvm/LLVMConfig.cmake, version: 13.0.1

When adding this patch to spirv-llvm-translator, a compilation error occurs as LLVM Spirv Translator is not backwards compatible with older LLVM versions:

diff --git a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb
index eb2618c..4d405a3 100644
--- a/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb
+++ b/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator_git.bb
@@ -22,6 +22,7 @@ OECMAKE_GENERATOR = "Unix Makefiles"
 
 # Specify any options you want to pass to cmake using EXTRA_OECMAKE:
 EXTRA_OECMAKE = "\
+        -DBASE_LLVM_VERSION=${LLVMVERSION} \
         -DBUILD_SHARED_LIBS=ON \
         -DLLVM_SPIRV_BUILD_EXTERNAL=YES \
         -DCMAKE_BUILD_TYPE=Release \

LLVM and Spirv Translator should both be using the same release generation. Either upgrade LLVM to 14 or downgrade Spirv Translator.

zboszor avatar Feb 15 '22 10:02 zboszor

I have lllvm 14 upgrade ready perhaps I should submit that as PR

kraj avatar Feb 15 '22 17:02 kraj