Closed mcampbellizo closed 4 years ago
I believe I've got to the bottom of this. rauc
and rauc-native
share a base *.inc
file. In there the dependencies are set to the following:
DEPENDS = "openssl glib-2.0 glib-2.0-native"
This would normally be okay if using BBCLASSEXTEND = "native"
to generate the native recipe, however, the native rauc has its own recipe, rauc-native.bb
, that includes rauc.inc
and inherits native.bbclass directly. The behavior of native.bbclass is subtly different in an explicit native recipe and one virtually created with BBCLASSEXTEND
. When using BBCLASSEXTEND
it will automagically remap all entries in DEPENDS
to their *-native
counterpart. In the explicit recipe case this step is skipped and the writer of the recipe is expected to explicitly depend on the native versions of the recipes where it makes sense.
An easy and targeted fix would be to use class overrides in rauc.inc
to take care of the native case explicitly.
DEPENDS = "openssl glib-2.0 glib-2.0-native"
DEPENDS_class-native = "openssl-native glib-2.0-native"
It's worth noting that in the nativesdk
case dependency remapping happens uncondtionally regardless of whether it is an explicit nativesdk recipe or one created with BBCLASSEXTEND
. This is why we don't need a DEPENDS_class-nativesdk = ...
.
If this all sounds sane I can whip up a PR for that fix tomorrow.
I think the target package shouldn't need a dependency on glib-2.0-native.
Looks like it is needed, the native glib tools are used to do the D-Bus binding code generation. With out it you get this error:
ERROR: rauc-1.2-r0 do_compile: oe_runmake failed
ERROR: rauc-1.2-r0 do_compile: Execution of '/workspaces/izo-yocto/build-tonos-r1/tmp/work/cortexa9t2hf-neon-modus-linux-gnueabi/rauc/1.2-r0/temp/run.do_compile.1440714' failed with exit code 1:
gdbus-codegen \
--generate-c-code rauc-installer-generated \
--c-namespace R \
--interface-prefix de.pengutronix.rauc. \
../rauc-1.2/src/rauc-installer.xml
/bin/bash: line 1: gdbus-codegen: command not found
Makefile:2397: recipe for target 'rauc-installer-generated.c' failed
make: *** [rauc-installer-generated.c] Error 127
make: *** Waiting for unfinished jobs....
WARNING: exit code 1 from a shell command.
@mcampbellizo Yes, glib-2.0-native dependency is required for the exact reason you described. I try to have an eye on your fix tomorrow, thanks!
I cannot reproduce the warnings but can confirm that the native package preserves the dependency on targe glib, which is clearly unnecessary. Good catch!
Thanks! I believe the warning is related to the state of the shared state cache, so it might take some tinkering to get it to where the warning happens.
When building the
rauc-native
recipe on zeus I get the warnings at the end of this issue. I spent a couple hours trying to get to the bottom of it and am stumped. The best I have is that removinginherit native
causes this to go away. Obviously that kills the point of the recipe, but there might be a clue in there. I'm not sure whatnative.bbclass
would be causing this.I found this bug in upstream OpenEmbedded that is similar but not exactly the same. I'm not sure how to check for sure, but I don't think any key tasks are getting set to
noexec
. Due to eithernative.bbclass
or any of the rauc recipe itself.One last note, I am running an in-house distro that is based off Poky, so it's possible this is related to our changes, but it would still be inserting that we only see this with
rauc-native
and no other native recipes. Would love to hear if anyone has seen this before or has any thoughts before I spin up a clean build against Poky.