我正在使用Yocto使用食谱https://github.com/clMathLibraries/clBLAS
安装clBLAS库(https://github.com/CogentEmbedded/meta-opencl/blob/master/meta-ocl-common/recipes-graphics/clblas/clblas_git.bb)但我每次都会收到以下警告。 .so文件不存在于构建的图像中。
WARNING: QA Issue: clblas: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/libclBLAS.so.2.12.0
/usr/lib/libclBLAS.so.2
/usr/lib/libclBLAS.so
/usr/lib/.debug
/usr/lib/pkgconfig
/usr/lib/cmake
/usr/lib/.debug/libclBLAS.so.2.12.0
/usr/lib/pkgconfig/clBLAS.pc
/usr/lib/cmake/clBLAS
/usr/lib/cmake/clBLAS/clBLASTargets-debug.cmake
/usr/lib/cmake/clBLAS/clBLASConfigVersion.cmake
/usr/lib/cmake/clBLAS/clBLASTargets.cmake
/usr/lib/cmake/clBLAS/clBLASConfig.cmake
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
clblas: 14 installed and not shipped files. [installed-vs-shipped]
如何克服此警告&使.so文件出现在目标的/usr/lib
文件夹中?
答案 0 :(得分:2)
将以下行添加到 FILES_${PN} += "${libdir}/*"
FILES_${PN}-dev = "${libdir}/* ${includedir}"
delta()
答案 1 :(得分:0)
问题在于,在构建期间未正确考虑multilib,查看clBLAS中的cmake文件,使用CMake变量构造multilib路径SUFFIX_LIB,而yocto配方将其设置为空here它没有编码multilib路径的yocto逻辑。可能的解决方法如下所示
--- clblas_git.bb.org 2019-12-07 12:41:56.784649031 -0800
+++ clblas_git.bb 2019-12-07 12:42:25.317982206 -0800
@@ -16,7 +16,7 @@ S = "${WORKDIR}/git/src"
inherit cmake pythonnative
-EXTRA_OECMAKE += "-DSUFFIX_LIB= -DUSE_SYSTEM_GTEST=ON -DBUILD_TEST=OFF -DPREBUILT_CLT_PATH=${WORKDIR}/clt"
+EXTRA_OECMAKE += "-DSUFFIX_LIB=${@d.getVar('baselib', True).replace('lib', '')} -DUSE_SYSTEM_GTEST=ON -DBUILD_TEST=OFF -DPREBUILT_CLT_PATH=${WORKDIR}/clt"
DEPENDS += "virtual/opencl"