All of lore.kernel.org
 help / color / mirror / Atom feed
* Issues with DEPENDS
@ 2025-10-21  1:02 Jared Weyer
  2025-10-23 10:39 ` [yocto] " Alexander Kanavin
  2025-10-23 11:27 ` Gyorgy Sarvari
  0 siblings, 2 replies; 4+ messages in thread
From: Jared Weyer @ 2025-10-21  1:02 UTC (permalink / raw)
  To: yocto@lists.yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 2555 bytes --]

Hi,


Hoping to get some help with an issue I have been having with DEPENDS. I'm sure I am missing something obvious, but I can't seem to figure out what is going on. Essentially, I have two recipes, I will call them recipe A and recipe B; recipe A has a build time dependency on recipe B. To troubleshoot the issue, I've reduced recipe A and B to very contrived examples, but the issue still persists.


Below is recipe B:

SUMMARY = "TI ARM-CGT-CLANG compiler tools"
HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm"
LICENSE = "CLOSED"

BBCLASSEXTEND = "native nativesdk"

# I don't believe I need this... but just in case
SYSROOT_DIRS_NATIVE += " \
    /usr/share/ti \
    /usr
"

FILES:${PN} += " \
   /usr \
"

do_install() {
?    install -d ${D}/usr/share/ti
    install -d ${D}/usr/

    echo test > ${S}/test.txt
    echo test2 > ${S}/test2.txt

    install -m 0755 ${S}/test.txt ${D}/usr/share/ti
    install -m 0755 ${S}/test2.txt ${D}/usr
}

INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"

?Below is recipe A:
??
SUMMARY = "TI MCU+ SDK for AM263Px"
HOMEPAGE = "https://www.ti.com/tool/MCU-PLUS-SDK-AM263PX"
LICENSE = "CLOSED"

BBCLASSEXTEND = "nativesdk native"

DEPENDS = " \
    ti-cgt-armllvm-native \ ### RECIPE B ###
    sysconfig-native \
"

FILES:${PN} += " \
    /usr/share \
"

do_install() {
    install -d ${D}/usr/share
    cp -r ${STAGING_DIR_NATIVE}/. ${D}/usr/share
}

My understanding is that adding the DEPENDS = "ti-cgt-armllvm-native" should install all files installed by ti-cgt-armllvm (recipe B) into the STAGING_DIR_NATIVE directory of recipe A; however, this is not occurring as there is no 'recipe-sysroot-native/usr/test2.txt' or 'recipe-sysroot-native/usr/share/ti/test.txt' file in recipe A staging directory.

The issue does seem to be with DEPENDS because recipe B does install the test files correctly when run independently. When looking into this further, I found that 'sysroot-components/x86_64/ti-cgt-armllvm-native' (recipe B sysroot components is empty):

tmp-aec/sysroots-components/x86_64/ti-cgt-armllvm-native/
??? sysroot-providers
    ??? ti-cgt-armllvm-native


My understanding is that this directory should contain the test files; however, I cannot figure out why it does not.

Does anyone see any obvious mistakes that I am making?

Apologies for the extensive email and thank you to anyone willing to help with this!!!

- Jared Weyer


[-- Attachment #2: Type: text/html, Size: 5194 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Issues with DEPENDS
  2025-10-21  1:02 Issues with DEPENDS Jared Weyer
@ 2025-10-23 10:39 ` Alexander Kanavin
  2025-10-23 11:27 ` Gyorgy Sarvari
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2025-10-23 10:39 UTC (permalink / raw)
  To: yocto, jweyer

All of this should work, but it's possible there's a simple mistake
somewhere. You need to verify every step from installation to
population of the sysroot:

1. For recipe B, are the needed files present in ${WORKDIR}/image?
2. For recipe B, are the needed files present in ${WORKDIR}/sysroot-destdir ?

(you might have to go several levels below these for reasons too
arcane to explain)

Alex

On Thu, 23 Oct 2025 at 12:29, Jared Weyer via lists.yoctoproject.org
<jweyer=aecontrols.com@lists.yoctoproject.org> wrote:
>
> Hi,
>
>
> Hoping to get some help with an issue I have been having with DEPENDS. I'm sure I am missing something obvious, but I can't seem to figure out what is going on. Essentially, I have two recipes, I will call them recipe A and recipe B; recipe A has a build time dependency on recipe B. To troubleshoot the issue, I've reduced recipe A and B to very contrived examples, but the issue still persists.
>
>
> Below is recipe B:
>
>
> SUMMARY = "TI ARM-CGT-CLANG compiler tools"
> HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm"
> LICENSE = "CLOSED"
>
> BBCLASSEXTEND = "native nativesdk"
>
> # I don't believe I need this... but just in case
> SYSROOT_DIRS_NATIVE += " \
>     /usr/share/ti \
>     /usr
> "
>
> FILES:${PN} += " \
>    /usr \
> "
>
> do_install() {
>
>     install -d ${D}/usr/share/ti
>
>     install -d ${D}/usr/
>
>     echo test > ${S}/test.txt
>     echo test2 > ${S}/test2.txt
>
>     install -m 0755 ${S}/test.txt ${D}/usr/share/ti
>     install -m 0755 ${S}/test2.txt ${D}/usr
>
> }
>
> INHIBIT_PACKAGE_STRIP = "1"
> INHIBIT_SYSROOT_STRIP = "1"
> INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
>
> Below is recipe A:
>
> SUMMARY = "TI MCU+ SDK for AM263Px"
> HOMEPAGE = "https://www.ti.com/tool/MCU-PLUS-SDK-AM263PX"
> LICENSE = "CLOSED"
>
> BBCLASSEXTEND = "nativesdk native"
>
> DEPENDS = " \
>     ti-cgt-armllvm-native \ ### RECIPE B ###
>     sysconfig-native \
> "
>
> FILES:${PN} += " \
>     /usr/share \
> "
>
> do_install() {
>     install -d ${D}/usr/share
>     cp -r ${STAGING_DIR_NATIVE}/. ${D}/usr/share
> }
>
> My understanding is that adding the DEPENDS = "ti-cgt-armllvm-native" should install all files installed by ti-cgt-armllvm (recipe B) into the STAGING_DIR_NATIVE directory of recipe A; however, this is not occurring as there is no 'recipe-sysroot-native/usr/test2.txt' or 'recipe-sysroot-native/usr/share/ti/test.txt' file in recipe A staging directory.
>
> The issue does seem to be with DEPENDS because recipe B does install the test files correctly when run independently. When looking into this further, I found that 'sysroot-components/x86_64/ti-cgt-armllvm-native' (recipe B sysroot components is empty):
>
> tmp-aec/sysroots-components/x86_64/ti-cgt-armllvm-native/
> └── sysroot-providers
>     └── ti-cgt-armllvm-native
>
>
> My understanding is that this directory should contain the test files; however, I cannot figure out why it does not.
>
> Does anyone see any obvious mistakes that I am making?
>
> Apologies for the extensive email and thank you to anyone willing to help with this!!!
>
> - Jared Weyer
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#65963): https://lists.yoctoproject.org/g/yocto/message/65963
> Mute This Topic: https://lists.yoctoproject.org/mt/115908178/1686489
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Issues with DEPENDS
  2025-10-21  1:02 Issues with DEPENDS Jared Weyer
  2025-10-23 10:39 ` [yocto] " Alexander Kanavin
@ 2025-10-23 11:27 ` Gyorgy Sarvari
  2025-10-23 15:57   ` Jared Weyer
  1 sibling, 1 reply; 4+ messages in thread
From: Gyorgy Sarvari @ 2025-10-23 11:27 UTC (permalink / raw)
  To: yocto, jweyer

On 10/21/25 03:02, Jared Weyer via lists.yoctoproject.org wrote:
>
>     install -m 0755 ${S}/test.txt ${D}/usr/share/ti
>     install -m 0755 ${S}/test2.txt ${D}/usr

I remember this, this is how I learned to use bitbake variables for all
paths, I spent at least 2 days debugging it some years ago.
When you do build for native, ${D} is pretty much the same as for
tagret, but ${datadir and ${prefix} are very different.

For target it looks like this:
prefix = /usr
datadir = /usr/share

For native, it looks like this:
prefix =
/home/mee/stuff/ptest-images/build/tmp/work/x86_64-linux/openssl-native/3.5.4/recipe-sysroot-native/usr
datadir =
/home/mee/stuff/ptest-images/build/tmp/work/x86_64-linux/openssl-native/3.5.4/recipe-sysroot-native/usr/share


Try in your recipe you should always use ${D}${datadir}, ${D}{prefix}
etc variables when installing files to avoid such issues.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Issues with DEPENDS
  2025-10-23 11:27 ` Gyorgy Sarvari
@ 2025-10-23 15:57   ` Jared Weyer
  0 siblings, 0 replies; 4+ messages in thread
From: Jared Weyer @ 2025-10-23 15:57 UTC (permalink / raw)
  To: Gyorgy Sarvari, yocto@lists.yoctoproject.org, Alexander Kanavin

Hi all,

Thanks for the input! I figured out that the issue was indeed related to the install directory. I have the following in recipe B:

do_install() {
    install -d ${D}${MCU_PLUS_SDK_AM263PX_INSTALL_DIR}
    cp -r ${B}/. ${D}${MCU_PLUS_SDK_AM263PX_INSTALL_DIR}
}

where MCU_PLUS_SDK_AM263PX_INSTALL_DIR came from two different include files:

# meta-ti/meta-ti-extras/recipes-ti/includes/ti-paths.inc
installdir = "${datadir}/ti"

# meta-aec/recipes-ti/includes/aec-ti-paths.inc
CU_PLUS_SDK_AM263PX_VERSION := "11.00.00.19"
MCU_PLUS_SDK_AM263PX_INSTALL_NAME := "mcu_plus_sdk_am263px_${MCU_PLUS_SDK_AM263PX_VERSION}"
MCU_PLUS_SDK_AM263PX_INSTALL_DIR = "${installdir}/${MCU_PLUS_SDK_AM263PX_INSTALL_NAME}"

The above works as expected; However, the bug was that I had the following:

MCU_PLUS_SDK_AM263PX_INSTALL_DIR := "${installdir}/${MCU_PLUS_SDK_AM263PX_INSTALL_NAME}"

I was using immediate expansion which causing issues only when the recipe was built as a dependency to another recipe. I believe this was because of the context shift causing ${datadir} to expand differently when the recipe was built independently, though I am still not entirely sure why it caused sysroot-components to be empty, I would have expected it to populate but with an incorrect path.

Anyways, thank you both for your input!

Thanks again,

- Jared

________________________________________
From: Gyorgy Sarvari <skandigraun@gmail.com>
Sent: Thursday, October 23, 2025 4:27 AM
To: yocto@lists.yoctoproject.org; Jared Weyer
Subject: Re: [yocto] Issues with DEPENDS

On 10/21/25 03:02, Jared Weyer via lists.yoctoproject.org wrote:
>
>     install -m 0755 ${S}/test.txt ${D}/usr/share/ti
>     install -m 0755 ${S}/test2.txt ${D}/usr

I remember this, this is how I learned to use bitbake variables for all
paths, I spent at least 2 days debugging it some years ago.
When you do build for native, ${D} is pretty much the same as for
tagret, but ${datadir and ${prefix} are very different.

For target it looks like this:
prefix = /usr
datadir = /usr/share

For native, it looks like this:
prefix =
/home/mee/stuff/ptest-images/build/tmp/work/x86_64-linux/openssl-native/3.5.4/recipe-sysroot-native/usr
datadir =
/home/mee/stuff/ptest-images/build/tmp/work/x86_64-linux/openssl-native/3.5.4/recipe-sysroot-native/usr/share


Try in your recipe you should always use ${D}${datadir}, ${D}{prefix}
etc variables when installing files to avoid such issues.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-23 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21  1:02 Issues with DEPENDS Jared Weyer
2025-10-23 10:39 ` [yocto] " Alexander Kanavin
2025-10-23 11:27 ` Gyorgy Sarvari
2025-10-23 15:57   ` Jared Weyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.