Skip to contentSkip to conversation

nativesdk recipe fails to find cmake config file from another recipe/dependency #sdk

DISCUSSION Armando Hernandez 2 participants 3 messages Feb 21, 2020 – Feb 24, 2020

lore
Share & tools
lore
#0 lore raw

Hello,

I have two recipes (let's call them "recipe-A" and "recipe-B").
Both recipes extend the nativesdk class.
recipe-B depends on recipe-A
When building both recipes for target, everything goes well without any issues.
When building the nativesdk corresponding recipes, recipe-B fails during the task do_configure due to the fact that cmake cannot find the package configuration that corresponds to recipe-A.

On recipe-A.bbappend I have the following lines (recipe-A cmake config file "CommonAPIConfig.cmake" is located under /usr/lib/cmake/CommonAPI):
FILES_${PN}-dev_append_class-nativesdk = " ${includedir_native} ${libdir_native}"
BBCLASSEXTEND = "nativesdk"

Since suche cmake config files was not found, I created a recipe-B.bbappend file with the following content:
EXTRA_OECMAKE_append_class-nativesdk += "-DCMAKE_PREFIX_PATH:PATH=${libdir_native}/cmake/CommonAPI"

But I keep getting the same error.

Any hints?

Thank you in advance!

Armando Hernandez.

#1 lore raw
Quoted 13 lines · Armando Hernandez

Hello,

I have two recipes (let's call them "recipe-A" and "recipe-B").
Both recipes extend the nativesdk class.
recipe-B depends on recipe-A
When building both recipes for target, everything goes well without any issues.
When building the nativesdk corresponding recipes, recipe-B fails during the task do_configure due to the fact that cmake cannot find the package configuration that corresponds to recipe-A.

On recipe-A.bbappend I have the following lines (recipe-A cmake config file "CommonAPIConfig.cmake" is located under /usr/lib/cmake/CommonAPI):
FILES_${PN}-dev_append_class-nativesdk = " ${includedir_native} ${libdir_native}"
BBCLASSEXTEND = "nativesdk"

Quoted 7 lines

Since suche cmake config files was not found, I created a recipe-B.bbappend file with the following content:
EXTRA_OECMAKE_append_class-nativesdk += "-DCMAKE_PREFIX_PATH:PATH=${libdir_native}/cmake/CommonAPI"

But I keep getting the same error.

Any hints?

check DEPENDS how are they specified in recipes, it might get overwritten in some cases for extended
recipes if overrides are in use on depends. Secondly, check the build tree for failing recipe and see if
it has staged the content from other recipe which it depends on.

Quoted 5 lines

Thank you in advance!

Armando Hernandez.

#2 lore raw

Hello Raj, and thanks for your help.

I actually found out that my problem seems to be that the files of one of the dependency packages are not staged into ./build/tmp/sysroots-components/x86_64-nativesdk/<dependency-package-name>

In that path, I am missing the /usr folder with all its content (and I am guessing this is the reason of my error during the do_configure task - it cannot find the dependency's cmake config files).
(I just wanted to comment, that I only find a "/sysroot-providers" folder with two text files whose content is a string with the name of the package
- i.e. nativesdk-common-api-c++).

Currently I'm trying to find out why these files are not staged, but if you have any suggestion as of where to look at it'd be great.

Thanks again for your help!

Armando H.

Quoted 42 lines · Khem Raj
Quoted 7 lines · Armando Hernandez

Hello,

I have two recipes (let's call them "recipe-A" and "recipe-B"). Both recipes extend the nativesdk class.
recipe-B depends on recipe-A
When building both recipes for target, everything goes well without any

issues.

Quoted 1 line

When building the nativesdk corresponding recipes, recipe-B fails during

the task do_configure due to the fact that cmake cannot find the package configuration that corresponds to recipe-A.

Quoted 2 lines

On recipe-A.bbappend I have the following lines (recipe-A cmake config

file "CommonAPIConfig.cmake" is located under /usr/lib/cmake/CommonAPI):

Quoted 1 line

FILES_${PN}-dev_append_class-nativesdk = " ${includedir_native}

${libdir_native}"

Quoted 3 lines

BBCLASSEXTEND = "nativesdk"

Since suche cmake config files was not found, I created a

recipe-B.bbappend file with the following content:

Quoted 1 line

EXTRA_OECMAKE_append_class-nativesdk +=

"-DCMAKE_PREFIX_PATH:PATH=${libdir_native}/cmake/CommonAPI"

Quoted 5 lines

But I keep getting the same error.

Any hints?

check DEPENDS how are they specified in recipes, it might get overwritten in some cases for extended
recipes if overrides are in use on depends. Secondly, check the build tree for failing recipe and see if
it has staged the content from other recipe which it depends on.

Quoted 5 lines

Thank you in advance!

Armando Hernandez.