I appreciate this video, it was a good example of dependencies. Before I didn't know that there was 2 types of dependencies. Now your video informs me well and now I know more about dependencies in Yocto. I appreciate your efforts for these live coding sessions and hope that you will make good rewards and income. Cheers and good luck!
@tomjordansantiago2383 Жыл бұрын
Hi, what's the difference of adding libanswer-example at the start, using '=+', of PACKAGES variable that adding it at the end using '+='? when I tried using '+=' the ask binary is still available (libanswer-example is still not added in IMAGE_INSTALL variable), but when using '=+' the binary is no more there.
@hoonchoi703 жыл бұрын
Nice presentation. Learn a lot. Tons of thanks!
@alican-mj4lr4 жыл бұрын
Thank you for the video. on the 16:40 RDEPENDS has _${PN} extension but DEPENDS don't. I could not understand why DEPENDS dont have it. You had said that, "DEPENDS are prepared for the recipe RDEPENDS are prepared for the packge ", on 16:39 you said RDEPENDs to package called libanswer. But libanswer is name of our recipe, so it was a bit confusing.
@TheYoctoProject4 жыл бұрын
"libanswer" is the name of the recipe and the name of the produced package. This is the the common case, that the main package shares the name of the recipe. So yes, this really applies: DEPENDS is for defining what the recipe needs to build RDEPENDS_${PN} is for defining what the package named $PN needs at runtime. Example, you have a recipe "aaa" that produces two packages "aaa-foo" and "aaa-bar", then you could need: RDEPENDS_${PN}-foo = "something" RDEPENDS_${PN}-bar = "elsething"
@mirzaavdic72354 жыл бұрын
@@TheYoctoProject Would this mean that if you leave RDEPENDS without a package suffix (_${PN}) that the selected runtime dependency will be defined for all packages that the recipe produces?
@TheYoctoProject4 жыл бұрын
@@mirzaavdic7235 good question, try and find out. (bitbake -e) but from my feeling I would rather guess that no package ends up with the RDEPEND.
@mirzaavdic72354 жыл бұрын
@@TheYoctoProject For people who are interested at the answer, at least at the SUMO version, the correct answer is: ERROR: Variable RDEPENDS is set as not being package specific, please fix this. [pkgvarcheck]
@milanshah66973 жыл бұрын
Let's say there is a case where "syslog-ng" package is providing eventlog as a part of library but my project already has eventlog. So when building the image, both syslog-ng and eventlog are trying to install libevtlog* libraries in /usr/lib/ directory. Now I can't remove eventlog package from my package. I want both of them to build but have an option to choose which library to use. So I want to split eventlog library from syslog-ng, what is the best option to do that?
@ericgorder13 жыл бұрын
I have a question: is += and =+ same thing in the recipe files? Thanks!
@alican-mj4lr4 жыл бұрын
Why do you prefer to create your recipes in the build directory?
@TheYoctoProject4 жыл бұрын
The recipe is not actually created in the build directory, but in the staging area of devtool (which just happens to live in the build). Once finished, one would commit the recipe to a layer outside the build directory, but I think that didn't get covered in the video.
@DynoosHD4 жыл бұрын
Where can I find all the options that i can use inside the recipe? Edit: found it. Chapter 14.1 in the reference manual
@abdallahrashed19474 жыл бұрын
how did you get the right answer in the first trail meanwhile you didn't link the recipe to the image , you only build the recipe itself ?
@TheYoctoProject4 жыл бұрын
It was a leftover image from the preparations for the video. I had built the image already to see if it works, then forgot to rebuild it without libanswer again.
@DynoosHD4 жыл бұрын
How do I know the missing runtime dependencies before I run it in the build.
@TheYoctoProject4 жыл бұрын
Often you actually don't know before and only find out the hard way. Unless it's your own code, then you hopefully know what it needs to work properly.
@abdallahrashed19474 жыл бұрын
a very great explanation and recapping
@TheYoctoProject4 жыл бұрын
Thanks a lot!
@asadboro15684 жыл бұрын
the man is starving for errors! everytime when when it builds with no errors he says he wasn't expecting that :D
@andysdroning5 жыл бұрын
Add a new package > devtool add libanswer github.com/LetoThe2nd/libanswer # Under build dir > bitbake libanswer > runqemu qemuarm example-image nographic Inside qemu > ask # Should add new package into image first # Actually an error is expected because image was not rebuilt > poweroff Reproduce expected error > vim example-image.bb # Under meta-live/recipes-example/images # Make update of IMAGE_INSTALL += “libanswer” > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # The expected error appears, a runtime dependency the answer is sh: bc: not found > poweroff Fix dependency > devtool edit-recipe libanswer # Under build dir # Right after line of DEPENDS = “boost” # Add RDEPENDS_${PN} = “bc” # Note that DEPENDS are prepared per recipe and RDEPENDS are per package > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # Should work now > poweroff Create a build dependency error > devtool edit-recipe libanswer # Comment out DEPENDS = “boost” > bitbake -c cleansstate libanswer && bitbake libanswer # Raise a dependency error in configure step Fix the error and add a new package > devtool edit-recipe libanswer # Uncomment out DEPENDS = “boost” > devtool edit-recipe libanswer # Right after inherit “cmake” # Add line PACKAGES =+ “${PN}-example” > bitbake libanswer > bitbake -e libanswer | less # Check variable PACKAGES should contain libanswer-example in addition to canonical packges > less conf/local.conf # Check what package format is used e.g. rpm > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # Still work, not as expected > poweroff Move binary file to newly created package > devtool edit-recipe libanswer # Right after PACKAGES =+ “${PN}-example” # Add line FILES_${PN}-example = “/usr/bin/ask” # I flattened 3 lines in the video into 1 above > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # See expected error -sh: ask: not found > ls /usr/lib # Confirm libanswer.so.0.0.1 is still there > poweroff Fix the error > vim example-image.bb # Under dir meta-live/recipes-example/images # Make an update IMAGE_INSTALL += “libanswer libanswer-example” > bitbake example-image > runqemu qemuarm example-image nographic Inside qemu > ask # Work again > poweroff Show recipe and variables > devtool edit-recipe libanswer # Show the recipe > bitbake -e libanswer | less # Check variables FILES_libanswer, FILES_libanswer-dev, FILES_libanswer-example, etc
@alexsong44333 жыл бұрын
Just found that "PACKAGES +=" is not equal to "PACKAGES =+". This difference made me suffer a lot. Crying laugh face.