Yocto - Files/directories were installed but not shipped in any package
Asked Answered
E

3

25

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?

Expropriate answered 10/4, 2018 at 8:9 Comment(0)
T
21

Add below lines to your clblas_git.bb

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

For good explanation you will get it here

Tham answered 11/4, 2018 at 4:36 Comment(3)
Thanks@ Siva.v , could you please tell me why we need to add include dirLakh
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.Babbage
It will be helpful if someone could explain how this solution worksBiscuit
H
20

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}.

Hine answered 14/8, 2022 at 0:4 Comment(1)
That was my case, good point! thanksBoylan
C
1

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"
Centre answered 7/12, 2019 at 20:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.