Bitbake is unable to find the license file because it's looking in the wrong 
place. If you look at the contents of 
/media/ice/slow_ext4/yocto_poky/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/ice_helloworld/helloworld-0.1/ice_helloworld-helloworld/
 , you will probably find it to be empty, and you will find COPYING.MIT in the 
directory above it.

The reason is that ${S} (see 
https://www.yoctoproject.org/docs/3.1.2/ref-manual/ref-manual.html#var-S) 
defaults to a location where a tarball would be unpacked, but your recipe isn't 
using a tarball.

Add the following to your recipe:
S = "${WORKDIR}"

Thanks,

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, August 8, 2020 2:12 AM, Sergey Ivanov <icegood1...@gmail.com> 
wrote:

> Hi there.
> I'm newbie ib yocto and (of course) nothing works for me from scratch.
> For testing purposes, i work with yocto 3.1 based on 
> 5d47cdf448b6cff5bb7cc5b0ba0426b8235ec478 rev aka dunfell-23.0.0
> MACHINE ?= "qemuarm" and DISTRO ?= "poky" (btw i tried poky-tony as well but 
> machine didn't start properly under qemu)
>
> I created my new layer with next structure:
> .
> ├── conf
> │ └── layer.conf
> ├── COPYING.MIT
> ├── README
> └── recipes-ice
> ├── COPYING.MIT
> └── ice_helloworld
> ├── COPYING.MIT
> ├── files
> │ ├── COPYING.MIT
> │ └── ice_helloworld.cpp
> └── ice_helloworld_0.1.bb
>
> (i copied COPYING.MIT to )every single place because of error below) and i 
> obtained:
>
> NOTE: Executing Tasks
> WARNING: ice_helloworld-helloworld-0.1 do_populate_lic: Could not copy 
> license file 
> /media/ice/slow_ext4/yocto_poky/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/ice_helloworld/helloworld-0.1/ice_helloworld-helloworld/COPYING.MIT
>  to 
> /media/ice/slow_ext4/yocto_poky/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/ice_helloworld/helloworld-0.1/license-destdir/ice_helloworld/COPYING.MIT:
>  [Errno 2] No such file or directory: 
> '/media/ice/slow_ext4/yocto_poky/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/ice_helloworld/helloworld-0.1/ice_helloworld-helloworld/COPYING.MIT'
> ERROR: ice_helloworld-helloworld-0.1 do_populate_lic: QA Issue: 
> ice_helloworld: LIC_FILES_CHKSUM points to an invalid file: 
> /media/ice/slow_ext4/yocto_poky/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/ice_helloworld/helloworld-0.1/ice_helloworld-helloworld/COPYING.MIT
>  [license-checksum]
> ERROR: ice_helloworld-helloworld-0.1 do_populate_lic: Fatal QA errors found, 
> failing task.
> ERROR: Logfile of failure stored in: 
> /media/ice/slow_ext4/yocto_poky/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/ice_helloworld/helloworld-0.1/temp/log.do_populate_lic.133477
> ERROR: Task 
> (/media/ice/slow_ext4/yocto_poky/meta-ice_layer/recipes-ice/ice_helloworld/ice_helloworld_0.1.bb:do_populate_lic)
>  failed with exit code '1'
> NOTE: Tasks Summary: Attempted 216 tasks of which 214 didn't need to be rerun 
> and 1 failed.
>
> my bb file is:
>
> SUMMARY = "Recipe to build the 'helloworld' in cpp"
> SECTION = "ice"
> LICENSE="MIT"
> #LICENSE_PATH += "${LAYERDIR}"
>
> PN = "ice_helloworld"
> PV = "0.1"
>
> SITE = "file://"
> PACKAGE_VERSION_MAJOR = "${@bb.data.getVar('PV',d,1).split('.')[0]}"
> PACKAGE_VERSION_MINOR = "${@bb.data.getVar('PV',d,1).split('.')[1]}"
>
> SRC_URI = "${SITE}${PN}.cpp"
> SRC_URI[md5sum] = "bc9dc64a44f9685d0310b94400a4631c"
> SRC_URI[sha256sum] = 
> "789e60072ea96371a35d5653d664b4c4b91e80ce2ea6d523d6caedab06a07a2a"
> LIC_FILES_CHKSUM = "${SITE}COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>
> do_compile() {
> ${CXX} ${PN}.cpp -o ${PN}
> }
>
> do_install() {
> install -d ${D}${bindir}
> install -m 0755 ${PN} ${D}${bindir}
> }
> what could be wrong here?
> --
> Kind regards,
> Sergey Ivanov
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#50244): https://lists.yoctoproject.org/g/yocto/message/50244
Mute This Topic: https://lists.yoctoproject.org/mt/76064802/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to