Dependencies are not resolved correctly when building the SDK


asconcepcion
 

Hello,

We have a custom package recipe that has a build dependency with another one (defined in yocto with the DEPENDS variable). If we build an image that includes that package, bitbake will build the dependency before building the package, as expected. However, if we build the SDK associated to that image (with bitbake <image> -c populate_sdk), it will fail in building that package because of a missing dependency. Does anyone know what could be causing this behavior?

Thanks.


Anuj Mittal
 

On Wed, 2021-08-25 at 23:54 -0700, asconcepcion wrote:
Hello,

We have a custom package recipe that has a build dependency with
another one (defined in yocto with the DEPENDS variable). If we build
an image that includes that package, bitbake will build the
dependency
before building the package, as expected. However, if we build the
SDK
associated to that image (with bitbake <image> -c populate_sdk), it
will fail in building that package because of a missing dependency.
Does anyone know what could be causing this behavior?
Can that recipe for dependency package actually be built for nativesdk?

Thanks,

Anuj


asconcepcion
 

Hi Anuj,

Thanks for the tip. I added "BBCLASSEXTEND += "nativesdk"" to the recipe of the dependency package, but I still get the same error. Do you know if I could be missing something else?

Thanks.
Alejandro.


Anuj Mittal
 

On Thu, 2021-08-26 at 00:44 -0700, asconcepcion wrote:
Hi Anuj,

Thanks for the tip. I added "BBCLASSEXTEND += "nativesdk"" to the
recipe of the dependency package, but I still get the same error. Do
you know if I could be missing something else?
Please post the exact error that you're getting.

Thanks,

Anuj


asconcepcion
 

Please post the exact error that you're getting.
Sorry, I haven't posted the exact error because I thought it is quite specific to the recipe I'm building. My first question was also too vague, sorry for that. The problem is that it fails in building that package because of a missing file that should be populated by that dependency.

The error happens in the do_compile task:

| make[1]: *** No rule to make target 'm4_image.bin', needed by 'flash_linux_m40'.  Stop.                                                                                                                             
| make: *** [Makefile:23: flash_linux_m40] Error 2                                                                                                                                                                    
| WARNING: exit code 2 from a shell command.
So, the package expects that the file 'm4_image.bin' exists, and this file is generated by the dependency (it works well when building the yocto image, but not when building the SDK from scratch).

Thanks,
Alejandro