On Fri, 2021-03-05 at 00:13 +0000, Richard Purdie wrote:
On Thu, 2021-03-04 at 12:27 +0000, luca.boccassi@gmail.com wrote:
quoted
-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RDEPENDS_${PN}_append += " util-linux-libuuid"
+RDEPENDS_${PN}-dev_append += " util-linux-libuuid-dev"
The mysterious libgcov.a issues which appeared in builds when this patch
was added are due to the lines above. Changing them to:
RDEPENDS_${PN} += " util-linux-libuuid"
RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"
resolves the issue. To illustrate, have a look at "bitbake glibc -g" in
the task-depends.dot file before and after that change.
The problem is the native BBCLASSEXTEND code can't handle the
RDEPENDS_${PN}_append correctly and it means in the native case it
adds a dependency on util-linux-libuuid rather than a native
version.
Why does that cause the gcov error? Its because there are early toolchain
util-linux-native dependencies which ends up meaning glibc sees a libgcc
dependency. It usually uses libgcc-initial and that has overlapping files
with libgcc and libgcov.a is the first in the sorted list.
Again, we should have better errors for a native recipe depending upon
a target one and show better errors for this configuration issue. It
does at least explain the seemingly strange errors.
Thank you! Sent v7 as suggested after a quick rebuild check.
When to use '_append' vs '+=' is one of the things I'm never sure about
and invariably I get it wrong most of the times.
--
Kind regards,
Luca Boccassi