AnsweredAssumed Answered

How to install the same library file with multiple packages

Question asked by ユーリ レリョーサ on May 12, 2015
Latest reply on May 26, 2015 by gusarambula

We have multiple types of the same system, same hardware, just different libraries and UI applications.

I am trying to put them into packages to make different sdcard images.

 

For example "mypad2" is the base system and is inherited by "mypad2-typeA".

Right now their only difference is a library file "libnfcp2pLib.so" with the same name but different protocols inside.

When I bitbake "core-image-mypad2" it does fine, but bitbaking "core-image-mypad2-typeA" will result on the following errors:

 

ERROR: The recipe nfcp2pLib-typeA is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
   /opt/mypad-dev/build_1.7/fsl-community-bsp/phase2-mypad2-build/tmp/sysroots/imx6q-mypad2/usr/lib/libnfcp2pLib.so
 Matched in manifest-imx6q-mypad2-nfcp2pLib.populate_sysroot
Please verify which recipe should provide the above files.
The build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.
ERROR: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.
ERROR: Function failed: sstate_task_postfunc
ERROR: Logfile of failure stored in: /opt/mypad-dev/build_1.7/fsl-community-bsp/phase2-mypad2-build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/nfcp2pLib-typeA/1.0-r0/temp/log.do_populate_sysroot.4052
ERROR: Task 1695 (/opt/mypad-dev/build_1.7/fsl-community-bsp/sources/meta-mypad/recipes-mypad/nfc/nfcp2pLib-typeA_1.0.bb, do_populate_sysroot) failed with exit code '1'

If I do "bitbake nfcp2pLib - clean" first before building "core-image-mypad2-typeA" or even just "nfcp2pLib-typeA", then there will be no errors.

Now, the question is, is it always necessary to clean before bitbaking or is there another way to force installing the file on sysroot?

Or is using the should we change the name of the library file for each type henceforth?

 

EDIT:

There seems to be no problem if you install file that is not in ${libdir}.

With the same recipes but instead of "/usr/lib" I changed it to "/usb/bin" and there were no errors.

 

Thanks

Yuri

Outcomes