<div dir='auto'><div>Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">Am 07.04.2019 23:35 schrieb richard.purdie@linuxfoundation.org:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On Sun, 2019-04-07 at 21:18 +0200, Stefan Herbrechtsmeier wrote:
<br>
&gt; I'm working towards an integrated Node.js support without npm and
<br>
&gt; have a&nbsp; problem with a circular dependency of do_populate_sysroot for
<br>
&gt; the native build.
<br>
&gt; 
<br>
&gt; I have two recipes a.bb and b.bb which have no DEPENDS but a 
<br>
&gt; RDEPENDS_${PN} between each other. This is no problem for a cross
<br>
&gt; build but leads to the following error for the native build:
<br>
&gt; Task virtual:native:a.bb:do_populate_sysroot has circular dependency
<br>
&gt; on virtual:native:b.bb:do_populate_sysroot.
<br>
&gt; 
<br>
&gt; It looks like the problem comes from the following lines in 
<br>
&gt; native.bbclass and commit eea86c4f0a960d0094571a78dc0cf9d46d162a22:
<br>
&gt; RECIPERDEPTASK = "do_populate_sysroot"
<br>
&gt; do_populate_sysroot[rdeptask] = "${RECIPERDEPTASK}"
<br>
&gt; 
<br>
&gt; Is the rdeptask on the same task really needed or is it possible to
<br>
&gt; use&nbsp; an other task after do_populate_sysroot as sync task which run
<br>
&gt; time dependency on the other do_populate_sysroot task?
<br>

<br>
You're saying A runtime depends on B and B runtime depends on A.<br></p></blockquote></div></div></div><div dir="auto">Yes, only the run time depends on each other. This means the dependency doesn't exist during a native build of a or b.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">

<br>
The code is quite correctly therefore trying to install B into A's
<br>
sysroot since you might want to run it and also install A into B's
<br>
sysroot since that also depends on it and you may want to run that.<br></p></blockquote></div></div></div><div dir="auto">I don't understand this. The package a and b don't need the other package during build only package c which depends on one of them needs both packages.</div><div dir="auto"><br></div><div dir="auto">Does the native build evaluates all dependencies during the individual package build?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">
The dependency is therefore correct and you're trying to ask the system
<br>
to do something impossible.<br></p></blockquote></div></div></div><div dir="auto">How does it works for cross dependencies?</div><div dir="auto"><br></div><div dir="auto">Does the native build change rdepends into depends?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">

<br>
You likely need to decide that the native A doesn't really runtime
<br>
depend on native B or vice versa and break at least the native
<br>
dependency.<br></p></blockquote></div></div></div><div dir="auto">The problem is that I generate the recipies from npm packages and&nbsp;webassemblyjs has a lot of runtime cross dependencies between it's own npm packages. I don't know which package is rdepends by other packages and therefore need to keep the cross dependencies.</div><div dir="auto"><br></div><div dir="auto">Best regards</div><div dir="auto">&nbsp; Stefan</div><div dir="auto"><br></div></div>