diff mbox series

[meta-ti,master/wrynose] libsdl2: Set runtime dependency for SDL2 tests

Message ID 20260625200942.1370480-1-a-christidis@ti.com
State Superseded
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,master/wrynose] libsdl2: Set runtime dependency for SDL2 tests | expand

Commit Message

Christidis, Antonios June 25, 2026, 8:09 p.m. UTC
From: Antonios Christidis <a-christidis@ti.com>

Set a runtime dependency on libsdl2 for the libsdl2-tests package.

Signed-off-by: Antonios Christidis <a-christidis@ti.com>
---
 meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc | 1 +
 1 file changed, 1 insertion(+)

Comments

PRC Automation June 25, 2026, 10:09 p.m. UTC | #1
meta-ti / na / 20260625200942.1370480-1-a-christidis

PRC Results: PASS

=========================================================
  check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed



=========================================================
  apply-yocto-patch: PASS
=========================================================
master
=====================
Summary:
- Patch Series: [meta-ti][master/wrynose][PATCH] libsdl2: Set runtime dependency for SDL2 tests
- Submitter: From: <a-christidis@ti.com>
From: Antonios Christidis <a-christidis@ti.com>
- Date: Date: Thu, 25 Jun 2026 15:09:42 -0500
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 7f0ac7f4890ba02f3360e13c43c389b97a126ebe

Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: master-wip
- Commit Author: Ryan Eatmon <reatmon@ti.com>
- Commit Subject: TEST: linux-ti-staging: Add testing dtbo and build command
- Commit SHA: 07bd4c181e2a400d4375ddad7a20fbba6578b133

Patches
----------------------------------------
All patches applied

wrynose
=====================
Summary:
- Patch Series: [meta-ti][master/wrynose][PATCH] libsdl2: Set runtime dependency for SDL2 tests
- Submitter: From: <a-christidis@ti.com>
From: Antonios Christidis <a-christidis@ti.com>
- Date: Date: Thu, 25 Jun 2026 15:09:42 -0500
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 7f0ac7f4890ba02f3360e13c43c389b97a126ebe

Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: wrynose-wip
- Commit Author: LCPD Automation Script <lcpdbld@list.ti.com>
- Commit Subject: CI/CD Auto-Merger: cicd.wrynose.202606241800
- Commit SHA: 937a0b45728e16c279a7dad65585da061526936a

Patches
----------------------------------------
All patches applied



=========================================================
  check-yocto-repo: PASS
=========================================================
master
=====================
PASS

wrynose
=====================
PASS



=========================================================
  yocto-check-layers: PASS
=========================================================
master - PASS
=====================
All checks passed

wrynose - PASS
=====================
All checks passed
Andrew Davis June 25, 2026, 10:38 p.m. UTC | #2
On 6/25/26 3:09 PM, Antonios Christidis via lists.yoctoproject.org wrote:
> From: Antonios Christidis <a-christidis@ti.com>
> 
> Set a runtime dependency on libsdl2 for the libsdl2-tests package.
> 

Any clue on why this isn't automatic? Do the application in the test
package not link to libsdl2?

Andrew

> Signed-off-by: Antonios Christidis <a-christidis@ti.com>
> ---
>   meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
> index 33ff0632..750a5603 100644
> --- a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
> +++ b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
> @@ -3,3 +3,4 @@ EXTRA_OECMAKE += "-DSDL_TESTS=ON \
>                    "
>   PACKAGE_BEFORE_PN = "${PN}-tests"
>   FILES:${PN}-tests += "${libexecdir} ${datadir}/installed-tests/SDL2"
> +RDEPENDS:${PN}-tests += "${PN}"
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#20098): https://lists.yoctoproject.org/g/meta-ti/message/20098
> Mute This Topic: https://lists.yoctoproject.org/mt/119980196/3619733
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Christidis, Antonios June 29, 2026, 2:50 p.m. UTC | #3
On 6/25/26 5:38 PM, Andrew Davis wrote:
> On 6/25/26 3:09 PM, Antonios Christidis via lists.yoctoproject.org wrote:
>> From: Antonios Christidis <a-christidis@ti.com>
>>
>> Set a runtime dependency on libsdl2 for the libsdl2-tests package.
>>
>
> Any clue on why this isn't automatic? Do the application in the test
> package not link to libsdl2?
>
This isn't automatic because a custom package is created using the 
PACKAGE_BEFORE_PN
variable, so I need to explicitly set its dependencies.

Currently, when SDL_TESTS is enabled, the test binaries have SDL2 libs 
statically
compiled in. However, I'm sending a revision to add support for dynamic 
linking instead.
This is needed because customers using the sysroots to cross-compile 
their applications
have the SDL2 libraries available in their build environment, but the 
binaries can't run
since those libraries don't exist in the target filesystem.

|

|

> Andrew
>
>> Signed-off-by: Antonios Christidis <a-christidis@ti.com>
>> ---
>>   meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc 
>> b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>> index 33ff0632..750a5603 100644
>> --- a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>> +++ b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>> @@ -3,3 +3,4 @@ EXTRA_OECMAKE += "-DSDL_TESTS=ON \
>>                    "
>>   PACKAGE_BEFORE_PN = "${PN}-tests"
>>   FILES:${PN}-tests += "${libexecdir} ${datadir}/installed-tests/SDL2"
>> +RDEPENDS:${PN}-tests += "${PN}"
>>
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#20098): 
>> https://lists.yoctoproject.org/g/meta-ti/message/20098
>> Mute This Topic: https://lists.yoctoproject.org/mt/119980196/3619733
>> Group Owner: meta-ti+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>
Andrew Davis June 29, 2026, 2:58 p.m. UTC | #4
On 6/29/26 9:50 AM, Antonios Christidis wrote:
> 
> On 6/25/26 5:38 PM, Andrew Davis wrote:
>> On 6/25/26 3:09 PM, Antonios Christidis via lists.yoctoproject.org wrote:
>>> From: Antonios Christidis <a-christidis@ti.com>
>>>
>>> Set a runtime dependency on libsdl2 for the libsdl2-tests package.
>>>
>>
>> Any clue on why this isn't automatic? Do the application in the test
>> package not link to libsdl2?
>>
> This isn't automatic because a custom package is created using the PACKAGE_BEFORE_PN
> variable, so I need to explicitly set its dependencies.
> 

Odd, wasn't aware that would mess up the automatic dependency tracking. So side
question then, why use `PACKAGE_BEFORE_PN`? What is special about this recipe
that the test package can't be a normally added sub-package?

> Currently, when SDL_TESTS is enabled, the test binaries have SDL2 libs statically
> compiled in. However, I'm sending a revision to add support for dynamic linking instead.
> This is needed because customers using the sysroots to cross-compile their applications
> have the SDL2 libraries available in their build environment, but the binaries can't run
> since those libraries don't exist in the target filesystem.

Sounds good. BTW, any idea why the tests statically linked with the library before?
Even if the library includes both dynamic and static libs, I would expect the default
to always be dynamic linking (saves space, upgradable, etc..)

Andrew

> 
> |
> 
> |
> 
>> Andrew
>>
>>> Signed-off-by: Antonios Christidis <a-christidis@ti.com>
>>> ---
>>>   meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>>> index 33ff0632..750a5603 100644
>>> --- a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>>> +++ b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>>> @@ -3,3 +3,4 @@ EXTRA_OECMAKE += "-DSDL_TESTS=ON \
>>>                    "
>>>   PACKAGE_BEFORE_PN = "${PN}-tests"
>>>   FILES:${PN}-tests += "${libexecdir} ${datadir}/installed-tests/SDL2"
>>> +RDEPENDS:${PN}-tests += "${PN}"
>>>
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> View/Reply Online (#20098): https://lists.yoctoproject.org/g/meta-ti/message/20098
>>> Mute This Topic: https://lists.yoctoproject.org/mt/119980196/3619733
>>> Group Owner: meta-ti+owner@lists.yoctoproject.org
>>> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
>>
Christidis, Antonios June 29, 2026, 4:34 p.m. UTC | #5
On 6/29/26 9:58 AM, Andrew Davis wrote:
> On 6/29/26 9:50 AM, Antonios Christidis wrote:
>>
>> On 6/25/26 5:38 PM, Andrew Davis wrote:
>>> On 6/25/26 3:09 PM, Antonios Christidis via lists.yoctoproject.org 
>>> wrote:
>>>> From: Antonios Christidis <a-christidis@ti.com>
>>>>
>>>> Set a runtime dependency on libsdl2 for the libsdl2-tests package.
>>>>
>>>
>>> Any clue on why this isn't automatic? Do the application in the test
>>> package not link to libsdl2?
>>>
>> This isn't automatic because a custom package is created using the 
>> PACKAGE_BEFORE_PN
>> variable, so I need to explicitly set its dependencies.
>>
>
> Odd, wasn't aware that would mess up the automatic dependency 
> tracking. So side
> question then, why use `PACKAGE_BEFORE_PN`? What is special about this 
> recipe
> that the test package can't be a normally added sub-package?
>
Normally the packaging rules for ${PN} are evaluated first in the 
do_package_split task. I use PACKAGE_BEFORE_PN for two reasons: it 
automatically creates the package, and it evaluates FILES:${PN}-tests 
before FILES:${PN}. Without this, test binaries would end up in the main 
package since both packages claim ${libexecdir}.

>> Currently, when SDL_TESTS is enabled, the test binaries have SDL2 
>> libs statically
>> compiled in. However, I'm sending a revision to add support for 
>> dynamic linking instead.
>> This is needed because customers using the sysroots to cross-compile 
>> their applications
>> have the SDL2 libraries available in their build environment, but the 
>> binaries can't run
>> since those libraries don't exist in the target filesystem.
>
> Sounds good. BTW, any idea why the tests statically linked with the 
> library before?
> Even if the library includes both dynamic and static libs, I would 
> expect the default
> to always be dynamic linking (saves space, upgradable, etc..)
>
The default build type for tests back in 2018 was expecting the test 
executables to dynamically link with libsdl2 until 
6cf4d0e43bf12de05374e07eb076a0c73b6f95b1 commit. The reasoning behind 
the switch is not documented within the commit unfortunately. I will ask 
the SDL community if they have any further info.

> Andrew
>
>>
>> |
>>
>> |
>>
>>> Andrew
>>>
>>>> Signed-off-by: Antonios Christidis <a-christidis@ti.com>
>>>> ---
>>>>   meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc 
>>>> b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>>>> index 33ff0632..750a5603 100644
>>>> --- a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>>>> +++ b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
>>>> @@ -3,3 +3,4 @@ EXTRA_OECMAKE += "-DSDL_TESTS=ON \
>>>>                    "
>>>>   PACKAGE_BEFORE_PN = "${PN}-tests"
>>>>   FILES:${PN}-tests += "${libexecdir} ${datadir}/installed-tests/SDL2"
>>>> +RDEPENDS:${PN}-tests += "${PN}"
>>>>
>>>>
>>>>
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>> Links: You receive all messages sent to this group.
>>>> View/Reply Online (#20098): 
>>>> https://lists.yoctoproject.org/g/meta-ti/message/20098
>>>> Mute This Topic: https://lists.yoctoproject.org/mt/119980196/3619733
>>>> Group Owner: meta-ti+owner@lists.yoctoproject.org
>>>> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub 
>>>> [afd@ti.com]
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>>
>>>
>
diff mbox series

Patch

diff --git a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
index 33ff0632..750a5603 100644
--- a/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
+++ b/meta-ti-test/recipes-graphics/libsdl2/libsdl2-ti.inc
@@ -3,3 +3,4 @@  EXTRA_OECMAKE += "-DSDL_TESTS=ON \
                  "
 PACKAGE_BEFORE_PN = "${PN}-tests"
 FILES:${PN}-tests += "${libexecdir} ${datadir}/installed-tests/SDL2"
+RDEPENDS:${PN}-tests += "${PN}"