21

I'm using Yocto to install clBLAS library (https://github.com/clMathLibraries/clBLAS) using the recipe https://github.com/CogentEmbedded/meta-opencl/blob/master/meta-ocl-common/recipes-graphics/clblas/clblas_git.bb

But I'm getting the below warning everytime & .so file is not present in the built image.

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]

How to overcome this warning & make the .so file present in the target's /usr/lib folder?

Avis
  • 988
  • 2
  • 11
  • 31

3 Answers3

19

Add below lines to your clblas_git.bb

 FILES_${PN} += "${libdir}/*"
 FILES_${PN}-dev = "${libdir}/* ${includedir}"

For good explanation you will get it here

yoctotutor.com
  • 5,145
  • 4
  • 26
  • 36
  • 2
    Thanks@ Siva.v , could you please tell me why we need to add include dir –  Apr 12 '18 at 05:11
  • The answer isn't a really good one and certainly not perfect. It is treating only the symptoms, particularly INSANE_SKIP means the test will be skipped, but the underlying problem will stay. And correct file packaging should happen automatically. If you can run 'bitbake -e clblas' and post the output (e.g. to pastebin), we might be able to better diagnoze why it isn't working by default. – Alexander Kanavin Apr 02 '19 at 14:17
  • 3
    It will be helpful if someone could explain how this solution works – Roy Aug 07 '19 at 11:51
11

If you are using new version of yocto this will help:

FILES:${PN} ="name of the dirs is not shipping";

In old versions it is FILES_${PN}.

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
Abdullah Noman
  • 151
  • 1
  • 2
0

The problem is that multilib is not considered correctly during build, looking at cmake files in clBLAS, its using CMake variable for constructing multilib path SUFFIX_LIB and yocto recipe is setting it to be empty here however its not encoding the yocto logic for multilib paths. A potential fix would be in recipe as below

--- 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"
Khem
  • 1,162
  • 8
  • 8