The case is: There is an ipk called A and another called B.
B has a runtime dependency to A (according to bitbake recipe of A)
However, a source file in B has #include <some_header_in_A>
This looks like a build dependency to me, but then I cannot explain to myself why the bitbake recipe functions with a runtime dependency.
Any help is appreciated, also a link to some explanatory tutorial.
Is runtime dependency possible by including a header file?
427 views Asked by lulijeta At
        	1
        	
        
	
                        
Recall my answer to your other question.
If T DEPENDS on P then T's
do_configuretask is made to depend on P'sdo_populate_sysroottask.If T RDEPENDS on P then T's
do_buildtask ia made to depend on P'sdo_package_writetask.So the fact that your B
RDEPENDSon your A means that A has already passed all stages right throughdo_package_writewhenBis built, includingdo_populate_sysroot. Therefore any headers that A exports to the sysroot will already be there when B is built, and the buildtime dependency will be satisfied.If B includes headers exported by A, this is is a buildtime dependency. But that does not exclude B also having a runtime dependency on A. In fact it is usually the case that if B is runtime-dependent on A then it is also buildtime-dependent on A, precisely because (for C/C++ packages) the runtime dependency usually means that building B needs headers from A.
If your recipe only specifies B
RDEPENDSon A, then it needs a tiny bit of luck to succeed. If it happened to be the case that B'sdo_configureincluded a check for the existence of the A headers, and all of the dependencies in play made it possible for B'sdo_configureto run before A'sdo_populate_sysrootwas finished, then that that check for the A headers could fail.For the recipe to be completely correct and safe, it should specify both that B
RDEPENDSon A and that BDEPENDSon A.