Error in do_package with custom "hello-world" recipe

Hello,
I’m following this guide Custom meta layers, recipes and images in Yocto Project (hello-world examples) | Toradex Developer Center
to add an hello-world application to torazion-core-docker image, I’m using bsp version v5.7.2 dunfell branch.
I’m getting this error:

ERROR: hello-world-1.0.0-r0 do_package: QA Issue: hello-world: Files/directories were installed but not shipped in any package:
  /usr
  /usr/bin
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.

I have added:
FILES_${PN} = "
${bindir}/hello-world
"
at the end of the file, I have done a clean build, but it’s still failing.
any suggestion?
Regards,
Rocco

Greetings @RoccoBr,

Did you deviate from the instructions in any way? I just did a quick TorizonCore 5.7.2 build where I integrated the hello-world recipe exactly as given in the article, and I did not get this error, so I’m not sure why you are seeing this.

Well in any case, looking at the error you got it’s complaining about /usr and /usr/bin. You added ${bindir}/hello-world to FILES_*, but Yocto can be picky about this. You specified the full path leading to the binary hello-world, but this doesn’t recursively include /usr and /usr/bin in FILES_*. At least that’s my assumption of why it’s complaining.

Basically you can try adding /usr and /usr/bin to FILES_* and see if that gets Yocto to stop complaining.

As an example see the FILES_* variable in this recipe: meta-toradex-torizon/aktualizr-torizon_git.bb at dunfell-5.x.y · toradex/meta-toradex-torizon · GitHub

We included every directory along the full path as seen here:

  ${libdir}/sota/* \
  ${libdir}/sota/conf.d \
  ${libdir}/sota/conf.d/20-sota-device-cred.toml \
  ${libdir}/sota/conf.d/30-rollback.toml \

Best Regards,
Jeremias

hi @jeremias.tx ,
I have tried on another machine with a clean installation and I still get the error. I have attached my recipe, can you please have a look and tried to compile?
hello-world_rocco.zip (1.5 KB)

The recipe you shared isn’t the same recipe we provide in our documentation. Why did you deviate from our documentation?

Best Regards,
Jeremias

because I’m doing the webinar Getting Started With The Yocto Project And Embedded Linux and I’m following Mohammed’s instructions

You initially said you were following this guide: Custom meta layers, recipes and images in Yocto Project (hello-world examples) | Toradex Developer Center

Just replace your recipe with the hello-world recipe we have in our article exactly as given and it should work. I tried our recipe in our documentation and it works.

I’m not sure in what context the webinar’s instructions are given, but obviously it’s giving you errors.

Best Regards,
Jeremias

thanks Jeremias,
the recipe on the the website works, so there is definitely an issue with the recipe from the webinar

Glad I was able to help clarify. Like I said I’m not sure in what context the webinar recipe was given or meant to be used. But, on quick inspection it doesn’t look quite right to me.

Best Regards,
Jeremias

Hi @RoccoBr !

As a follow-up, we got in touch with Mohammed from MAB Lab and we looked closely into your recipe.

In the end you had a typo in your do_install task:

install -m 0755 HelloWorld ${D}{bindir}

You were missing the $ for the bindir variable.

Fixing it made your recipe work.

Also, as a side note, in your recipe you are using the do_configure task to compile instead of the do_compile task. This is not recommended.

Best regards,

1 Like

thanks @henrique.tx !
yeah, the do_configure task was my copy&paste error