* [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
@ 2025-02-20 3:57 changqing.li
2025-02-21 14:34 ` [OE-core] " Mathieu Dubois-Briand
2025-02-24 23:36 ` Jörg Sommer
0 siblings, 2 replies; 16+ messages in thread
From: changqing.li @ 2025-02-20 3:57 UTC (permalink / raw)
To: openembedded-core, joerg.sommer
From: Changqing Li <changqing.li@windriver.com>
In oe-core, function ldconfig_postinst_fragment use exist of
/sbin/ldconfig to decide if ldconfig is runned to generate the cache,
and function _run_ldconfig will run ldconfig to generate cache during
generate rootfs. ldconfig.service is actually not used since we have
generate ld.so.cache during do_rootfs, refer[1][2][3]. ldconfig
dependency is necessary when ldconfig not in DISTRO_FEATURES.
The reverted commit causes regression when ldconfig not in
DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
ctypes.util.find_library(name) can find the lib if it is installed, now,
since ldconfig is not installed, ctypes.util.find_library(name) cannot
find the lib even if it is installed.
Here is one usecase(gtk+3 lib is installed, ctypes.util.find_library
used to find the lib):
import wx.lib.wxcairo as wxcairo
File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/{}init{}.py", line 59, in <module>
from .wx_cairocffi import _ContextFromDC, _FontFaceFromFont
File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 189, in <module>
gdkLib = _findGDKLib()
File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 181, in _findGDKLib
return _findHelper([libname], 'gdk',
"Unable to find the GDK shared library")
File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 170, in _findHelper
raise RuntimeError(msg)
RuntimeError: Unable to find the GDK shared library
[1] https://git.openembedded.org/openembedded-core/tree/meta/classes-global/package.bbclass#n394
[2] https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/rootfs.py#n316
[3] https://github.com/systemd/systemd-stable/blob/v255-stable/units/ldconfig.service
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
meta/recipes-devtools/python/python3_3.13.2.bb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/python/python3_3.13.2.bb b/meta/recipes-devtools/python/python3_3.13.2.bb
index 52fac76c00..f64d67da89 100644
--- a/meta/recipes-devtools/python/python3_3.13.2.bb
+++ b/meta/recipes-devtools/python/python3_3.13.2.bb
@@ -477,9 +477,7 @@ FILES:${PN}-man = "${datadir}/man"
# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
RDEPENDS:libpython3:append:libc-glibc = " libgcc"
-RDEPENDS:${PN}-ctypes:append:libc-glibc = "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', '${MLPREFIX}ldconfig', '', d)} \
-"
+RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig"
RDEPENDS:${PN}-ptest = "\
${PN}-dev \
${PN}-modules \
--
2.34.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-20 3:57 [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set" changqing.li
@ 2025-02-21 14:34 ` Mathieu Dubois-Briand
2025-02-24 0:27 ` Changqing Li
[not found] ` <1826FD59DBA1FC0B.20721@lists.openembedded.org>
2025-02-24 23:36 ` Jörg Sommer
1 sibling, 2 replies; 16+ messages in thread
From: Mathieu Dubois-Briand @ 2025-02-21 14:34 UTC (permalink / raw)
To: changqing.li, openembedded-core, joerg.sommer
On Thu Feb 20, 2025 at 4:57 AM CET, Changqing Li via lists.openembedded.org wrote:
> From: Changqing Li <changqing.li@windriver.com>
>
> In oe-core, function ldconfig_postinst_fragment use exist of
> /sbin/ldconfig to decide if ldconfig is runned to generate the cache,
> and function _run_ldconfig will run ldconfig to generate cache during
> generate rootfs. ldconfig.service is actually not used since we have
> generate ld.so.cache during do_rootfs, refer[1][2][3]. ldconfig
> dependency is necessary when ldconfig not in DISTRO_FEATURES.
>
> The reverted commit causes regression when ldconfig not in
> DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
> ctypes.util.find_library(name) can find the lib if it is installed, now,
> since ldconfig is not installed, ctypes.util.find_library(name) cannot
> find the lib even if it is installed.
>
> Here is one usecase(gtk+3 lib is installed, ctypes.util.find_library
> used to find the lib):
> import wx.lib.wxcairo as wxcairo
> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/{}init{}.py", line 59, in <module>
> from .wx_cairocffi import _ContextFromDC, _FontFaceFromFont
> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 189, in <module>
> gdkLib = _findGDKLib()
> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 181, in _findGDKLib
> return _findHelper([libname], 'gdk',
> "Unable to find the GDK shared library")
> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 170, in _findHelper
> raise RuntimeError(msg)
> RuntimeError: Unable to find the GDK shared library
>
> [1] https://git.openembedded.org/openembedded-core/tree/meta/classes-global/package.bbclass#n394
> [2] https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/rootfs.py#n316
> [3] https://github.com/systemd/systemd-stable/blob/v255-stable/units/ldconfig.service
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
Hi,
Thanks for your patch. However, I believe this is introducing some
regression: I've got some ptest failures on the autobuilder:
AssertionError:
Failed ptests:
{'python3': ['test_timerfd_TFD_TIMER_ABSTIME', 'python3']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/992
You can get some more advanced about ptest failures in there:
https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/
Can you have a look at this issue please?
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-21 14:34 ` [OE-core] " Mathieu Dubois-Briand
@ 2025-02-24 0:27 ` Changqing Li
[not found] ` <1826FD59DBA1FC0B.20721@lists.openembedded.org>
1 sibling, 0 replies; 16+ messages in thread
From: Changqing Li @ 2025-02-24 0:27 UTC (permalink / raw)
To: Mathieu Dubois-Briand, openembedded-core, joerg.sommer
[-- Attachment #1: Type: text/plain, Size: 2943 bytes --]
On 2/21/25 22:34, Mathieu Dubois-Briand wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Thu Feb 20, 2025 at 4:57 AM CET, Changqing Li via lists.openembedded.org wrote:
>> From: Changqing Li<changqing.li@windriver.com>
>>
>> In oe-core, function ldconfig_postinst_fragment use exist of
>> /sbin/ldconfig to decide if ldconfig is runned to generate the cache,
>> and function _run_ldconfig will run ldconfig to generate cache during
>> generate rootfs. ldconfig.service is actually not used since we have
>> generate ld.so.cache during do_rootfs, refer[1][2][3]. ldconfig
>> dependency is necessary when ldconfig not in DISTRO_FEATURES.
>>
>> The reverted commit causes regression when ldconfig not in
>> DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
>> ctypes.util.find_library(name) can find the lib if it is installed, now,
>> since ldconfig is not installed, ctypes.util.find_library(name) cannot
>> find the lib even if it is installed.
>>
>> Here is one usecase(gtk+3 lib is installed, ctypes.util.find_library
>> used to find the lib):
>> import wx.lib.wxcairo as wxcairo
>> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/{}init{}.py", line 59, in <module>
>> from .wx_cairocffi import _ContextFromDC, _FontFaceFromFont
>> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 189, in <module>
>> gdkLib = _findGDKLib()
>> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 181, in _findGDKLib
>> return _findHelper([libname], 'gdk',
>> "Unable to find the GDK shared library")
>> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 170, in _findHelper
>> raise RuntimeError(msg)
>> RuntimeError: Unable to find the GDK shared library
>>
>> [1]https://git.openembedded.org/openembedded-core/tree/meta/classes-global/package.bbclass#n394
>> [2]https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/rootfs.py#n316
>> [3]https://github.com/systemd/systemd-stable/blob/v255-stable/units/ldconfig.service
>>
>> Signed-off-by: Changqing Li<changqing.li@windriver.com>
>> ---
> Hi,
>
> Thanks for your patch. However, I believe this is introducing some
> regression: I've got some ptest failures on the autobuilder:
>
> AssertionError:
> Failed ptests:
> {'python3': ['test_timerfd_TFD_TIMER_ABSTIME', 'python3']}
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/992
>
> You can get some more advanced about ptest failures in there:
>
> https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/
>
> Can you have a look at this issue please?
Sure. I will check this.
Regards
Changqing
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
[-- Attachment #2: Type: text/html, Size: 4476 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
[not found] ` <1826FD59DBA1FC0B.20721@lists.openembedded.org>
@ 2025-02-24 8:20 ` Changqing Li
2025-02-24 11:02 ` Mathieu Dubois-Briand
[not found] ` <18271FF8E1B74516.20721@lists.openembedded.org>
0 siblings, 2 replies; 16+ messages in thread
From: Changqing Li @ 2025-02-24 8:20 UTC (permalink / raw)
To: Mathieu Dubois-Briand, openembedded-core, joerg.sommer
[-- Attachment #1: Type: text/plain, Size: 5161 bytes --]
On 2/24/25 08:27, Changqing Li via lists.openembedded.org wrote:
>
>
> On 2/21/25 22:34, Mathieu Dubois-Briand wrote:
>> CAUTION: This email comes from a non Wind River email account!
>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On Thu Feb 20, 2025 at 4:57 AM CET, Changqing Li via lists.openembedded.org wrote:
>>> From: Changqing Li<changqing.li@windriver.com>
>>>
>>> In oe-core, function ldconfig_postinst_fragment use exist of
>>> /sbin/ldconfig to decide if ldconfig is runned to generate the cache,
>>> and function _run_ldconfig will run ldconfig to generate cache during
>>> generate rootfs. ldconfig.service is actually not used since we have
>>> generate ld.so.cache during do_rootfs, refer[1][2][3]. ldconfig
>>> dependency is necessary when ldconfig not in DISTRO_FEATURES.
>>>
>>> The reverted commit causes regression when ldconfig not in
>>> DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
>>> ctypes.util.find_library(name) can find the lib if it is installed, now,
>>> since ldconfig is not installed, ctypes.util.find_library(name) cannot
>>> find the lib even if it is installed.
>>>
>>> Here is one usecase(gtk+3 lib is installed, ctypes.util.find_library
>>> used to find the lib):
>>> import wx.lib.wxcairo as wxcairo
>>> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/{}init{}.py", line 59, in <module>
>>> from .wx_cairocffi import _ContextFromDC, _FontFaceFromFont
>>> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 189, in <module>
>>> gdkLib = _findGDKLib()
>>> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 181, in _findGDKLib
>>> return _findHelper([libname], 'gdk',
>>> "Unable to find the GDK shared library")
>>> File "/usr/lib/python3.13/site-packages/wx/lib/wxcairo/wx_cairocffi.py", line 170, in _findHelper
>>> raise RuntimeError(msg)
>>> RuntimeError: Unable to find the GDK shared library
>>>
>>> [1]https://git.openembedded.org/openembedded-core/tree/meta/classes-global/package.bbclass#n394
>>> [2]https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/rootfs.py#n316
>>> [3]https://github.com/systemd/systemd-stable/blob/v255-stable/units/ldconfig.service
>>>
>>> Signed-off-by: Changqing Li<changqing.li@windriver.com>
>>> ---
>> Hi,
>>
>> Thanks for your patch. However, I believe this is introducing some
>> regression: I've got some ptest failures on the autobuilder:
>>
>> AssertionError:
>> Failed ptests:
>> {'python3': ['test_timerfd_TFD_TIMER_ABSTIME', 'python3']}
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/992
>>
>> You can get some more advanced about ptest failures in there:
>>
>> https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/
>>
>> Can you have a look at this issue please?
>
> Sure. I will check this.
>
> Regards
>
> Changqing
>
Hi, Mathieu
I cannot reproduce this ptest failure on my host. No failure of
test_timerfd_TFD_TIMER_ABSTIME in log.do_testimage. and the result is:
RESULTS - parselogs.ParseLogsTest.test_get_context: PASSED (0.00s)
RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (2.71s) RESULTS
- ping.PingTest.test_ping: PASSED (0.02s) RESULTS -
ssh.SSHTest.test_ssh: PASSED (0.56s) RESULTS -
ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: SKIPPED (0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail:
EXPECTEDFAIL (4455.53s) SUMMARY: core-image-ptest-python3 () - Ran 6
tests in 4458.839s core-image-ptest-python3 - OK - All required tests
passed (successes=4, skipped=1, failures=0, errors=0) DEBUG: Python
function do_testimage finished
And I checked
https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/,
there is no AssertionError in log.do_testimage.2624139.20250221054435
<https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/log.do_testimage.2624139.20250221054435>.
So I checked test_timerfd_TFD_TIMER_ABSTIME, refer [1]. Seems like this
is not related to my changes.
My commit changes RDEPENDS for package pthon3-ctype, and this is
actually no influence for poky, since poky enable distro_feature
ldconfig by default.
There are some similar timerfd issue in upstream python, I guess maybe
this is an intermittent failure of python13
[1] https://github.com/python/cpython/blob/main/Lib/test/test_os.py#L4402
[2] https://github.com/python/cpython/issues/126112
Regards
Changqing
>> --
>> Mathieu Dubois-Briand, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
>>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#211834):https://lists.openembedded.org/g/openembedded-core/message/211834
> Mute This Topic:https://lists.openembedded.org/mt/111283758/3616873
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [changqing.li@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
[-- Attachment #2: Type: text/html, Size: 9312 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-24 8:20 ` Changqing Li
@ 2025-02-24 11:02 ` Mathieu Dubois-Briand
[not found] ` <18271FF8E1B74516.20721@lists.openembedded.org>
1 sibling, 0 replies; 16+ messages in thread
From: Mathieu Dubois-Briand @ 2025-02-24 11:02 UTC (permalink / raw)
To: Changqing Li, openembedded-core, joerg.sommer
On Mon Feb 24, 2025 at 9:20 AM CET, Changqing Li wrote:
>
> On 2/24/25 08:27, Changqing Li via lists.openembedded.org wrote:
> Hi, Mathieu
>
> I cannot reproduce this ptest failure on my host. No failure of
> test_timerfd_TFD_TIMER_ABSTIME in log.do_testimage. and the result is:
>
> RESULTS - parselogs.ParseLogsTest.test_get_context: PASSED (0.00s)
> RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (2.71s) RESULTS
> - ping.PingTest.test_ping: PASSED (0.02s) RESULTS -
> ssh.SSHTest.test_ssh: PASSED (0.56s) RESULTS -
> ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: SKIPPED (0.00s)
> RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail:
> EXPECTEDFAIL (4455.53s) SUMMARY: core-image-ptest-python3 () - Ran 6
> tests in 4458.839s core-image-ptest-python3 - OK - All required tests
> passed (successes=4, skipped=1, failures=0, errors=0) DEBUG: Python
> function do_testimage finished
>
> And I checked
> https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/,
>
>
> there is no AssertionError in log.do_testimage.2624139.20250221054435
> <https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/log.do_testimage.2624139.20250221054435>.
>
> So I checked test_timerfd_TFD_TIMER_ABSTIME, refer [1]. Seems like this
> is not related to my changes.
>
> My commit changes RDEPENDS for package pthon3-ctype, and this is
> actually no influence for poky, since poky enable distro_feature
> ldconfig by default.
>
> There are some similar timerfd issue in upstream python, I guess maybe
> this is an intermittent failure of python13
>
> [1] https://github.com/python/cpython/blob/main/Lib/test/test_os.py#L4402
>
> [2] https://github.com/python/cpython/issues/126112
>
> Regards
> Changqing
Hi Changqing,
Thanks for testing. This might be a intermittent failure, but I believe
we never saw this one before.
I will add back this patch in my branch and let's see how it goes!
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-20 3:57 [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set" changqing.li
2025-02-21 14:34 ` [OE-core] " Mathieu Dubois-Briand
@ 2025-02-24 23:36 ` Jörg Sommer
2025-02-25 2:02 ` Changqing Li
1 sibling, 1 reply; 16+ messages in thread
From: Jörg Sommer @ 2025-02-24 23:36 UTC (permalink / raw)
To: changqing.li; +Cc: openembedded-core
Changqing Li via lists.openembedded.org schrieb am Do 20. Feb, 11:57 (+0800):
> The reverted commit causes regression when ldconfig not in
> DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
> ctypes.util.find_library(name) can find the lib if it is installed,
Hello Changqing Li,
Did I understand correctly that gtk+3 was found before, indent of ldconfig
was in der DISTRO_FEATURES? But after the change, if fails.
Where is libgdk installed? In /usr/lib or somewhere else?
Bye, Jörg
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.de
Geschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-24 23:36 ` Jörg Sommer
@ 2025-02-25 2:02 ` Changqing Li
2025-02-25 5:33 ` Jörg Sommer
2025-02-27 22:32 ` Jörg Sommer
0 siblings, 2 replies; 16+ messages in thread
From: Changqing Li @ 2025-02-25 2:02 UTC (permalink / raw)
To: Jörg Sommer; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]
On 2/25/25 07:36, Jörg Sommer wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> Changqing Li via lists.openembedded.org schrieb am Do 20. Feb, 11:57 (+0800):
>> The reverted commit causes regression when ldconfig not in
>> DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
>> ctypes.util.find_library(name) can find the lib if it is installed,
> Hello Changqing Li,
>
> Did I understand correctly that gtk+3 was found before, indent of ldconfig
> was in der DISTRO_FEATURES? But after the change, if fails.
>
> Where is libgdk installed? In /usr/lib or somewhere else?
Hi,
libgtk is under /usr/lib. See:
root@qemux86-64:~# ldconfig -p | grep gtk-3
libgtk-3.so.0 (libc6,x86-64) => /usr/lib/libgtk-3.so.0
root@qemux86-64:~# python3
Python 3.13.2 (main, Feb 4 2025, 14:51:09) [GCC 14.2.0] on linux Type
"help", "copyright", "credits" or "license" for more information.
>>> from ctypes.util import find_library
>>> find_library('gtk-3')
'libgtk-3.so.0'
For the case that ldconfig is NOT in DISTRO_FEATURES, gtk+3 can be
found. After commit "python3-ctypes: depend on ldconfig only if
distro-feature set" is merged,
ldconfig is not installed, so ctypes.util.find_library cannot found gtk+3.
//Changqing
>
>
> Bye, Jörg
>
> --
> Navimatix GmbH T: 03641 - 327 99 0
> Tatzendpromenade 2 F: 03641 - 526 306
> 07745 Jenawww.navimatix.de
>
> Geschäftsführer: Steffen Späthe, Jan Rommeley
> Registergericht: Amtsgericht Jena, HRB 501480
[-- Attachment #2: Type: text/html, Size: 2838 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-25 2:02 ` Changqing Li
@ 2025-02-25 5:33 ` Jörg Sommer
2025-02-27 22:32 ` Jörg Sommer
1 sibling, 0 replies; 16+ messages in thread
From: Jörg Sommer @ 2025-02-25 5:33 UTC (permalink / raw)
To: Changqing Li; +Cc: openembedded-core
Changqing Li schrieb am Di 25. Feb, 10:02 (+0800):
> On 2/25/25 07:36, Jörg Sommer wrote:
> > CAUTION: This email comes from a non Wind River email account!
> > Do not click links or open attachments unless you recognize the sender and know the content is safe.
> >
> > Changqing Li via lists.openembedded.org schrieb am Do 20. Feb, 11:57 (+0800):
> > > The reverted commit causes regression when ldconfig not in
> > > DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
> > > ctypes.util.find_library(name) can find the lib if it is installed,
> > Hello Changqing Li,
> >
> > Did I understand correctly that gtk+3 was found before, indent of ldconfig
> > was in der DISTRO_FEATURES? But after the change, if fails.
> >
> > Where is libgdk installed? In /usr/lib or somewhere else?
> libgtk is under /usr/lib. See:
>
> root@qemux86-64:~# ldconfig -p | grep gtk-3
>
> libgtk-3.so.0 (libc6,x86-64) => /usr/lib/libgtk-3.so.0
Interesting. I expected a subdirectory of lib.
> root@qemux86-64:~# python3
>
> >>> from ctypes.util import find_library
> >>> find_library('gtk-3')
>
> 'libgtk-3.so.0'
Thanks. That is a nice test case.
> For the case that ldconfig is NOT in DISTRO_FEATURES, gtk+3 can be found.
> After commit "python3-ctypes: depend on ldconfig only if distro-feature set"
> is merged,
>
> ldconfig is not installed, so ctypes.util.find_library cannot found gtk+3.
Yes, this was the contradiction: Even through you removed ldconfig from
DISTRO_FEATURES, it got pulled in. I could not remove ldconfig (even through
our system with python works fine without it).
Kind regards, Jörg
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.de
Geschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
[not found] ` <18271FF8E1B74516.20721@lists.openembedded.org>
@ 2025-02-25 9:12 ` Mathieu Dubois-Briand
0 siblings, 0 replies; 16+ messages in thread
From: Mathieu Dubois-Briand @ 2025-02-25 9:12 UTC (permalink / raw)
To: mathieu.dubois-briand, Changqing Li, openembedded-core,
joerg.sommer
On Mon Feb 24, 2025 at 12:02 PM CET, Mathieu Dubois-Briand via lists.openembedded.org wrote:
> On Mon Feb 24, 2025 at 9:20 AM CET, Changqing Li wrote:
> >
> > On 2/24/25 08:27, Changqing Li via lists.openembedded.org wrote:
> > Hi, Mathieu
> >
> > I cannot reproduce this ptest failure on my host. No failure of
> > test_timerfd_TFD_TIMER_ABSTIME in log.do_testimage. and the result is:
> >
> > RESULTS - parselogs.ParseLogsTest.test_get_context: PASSED (0.00s)
> > RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (2.71s) RESULTS
> > - ping.PingTest.test_ping: PASSED (0.02s) RESULTS -
> > ssh.SSHTest.test_ssh: PASSED (0.56s) RESULTS -
> > ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: SKIPPED (0.00s)
> > RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail:
> > EXPECTEDFAIL (4455.53s) SUMMARY: core-image-ptest-python3 () - Ran 6
> > tests in 4458.839s core-image-ptest-python3 - OK - All required tests
> > passed (successes=4, skipped=1, failures=0, errors=0) DEBUG: Python
> > function do_testimage finished
> >
> > And I checked
> > https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/,
> >
> >
> > there is no AssertionError in log.do_testimage.2624139.20250221054435
> > <https://valkyrie.yocto.io/pub/non-release/20250221-33/testresults/qemux86-64-ptest/core-image-ptest-python3/log.do_testimage.2624139.20250221054435>.
> >
> > So I checked test_timerfd_TFD_TIMER_ABSTIME, refer [1]. Seems like this
> > is not related to my changes.
> >
> > My commit changes RDEPENDS for package pthon3-ctype, and this is
> > actually no influence for poky, since poky enable distro_feature
> > ldconfig by default.
> >
> > There are some similar timerfd issue in upstream python, I guess maybe
> > this is an intermittent failure of python13
> >
> > [1] https://github.com/python/cpython/blob/main/Lib/test/test_os.py#L4402
> >
> > [2] https://github.com/python/cpython/issues/126112
> >
> > Regards
> > Changqing
>
> Hi Changqing,
>
> Thanks for testing. This might be a intermittent failure, but I believe
> we never saw this one before.
>
> I will add back this patch in my branch and let's see how it goes!
Hi Changqing,
I confirm I added this back and now it's working. So it might be some
new AB-INT issue, nothing is wrong with your patch from the autobuilder
perspective.
Thanks for your time.
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-25 2:02 ` Changqing Li
2025-02-25 5:33 ` Jörg Sommer
@ 2025-02-27 22:32 ` Jörg Sommer
2025-02-28 2:56 ` Changqing Li
1 sibling, 1 reply; 16+ messages in thread
From: Jörg Sommer @ 2025-02-27 22:32 UTC (permalink / raw)
To: Changqing Li, Mathieu Dubois-Briand, Richard Purdie; +Cc: openembedded-core
Changqing Li schrieb am Di 25. Feb, 10:02 (+0800):
> On 2/25/25 07:36, Jörg Sommer wrote:
> > CAUTION: This email comes from a non Wind River email account!
> > Do not click links or open attachments unless you recognize the sender and know the content is safe.
> >
> > Changqing Li via lists.openembedded.org schrieb am Do 20. Feb, 11:57 (+0800):
> > > The reverted commit causes regression when ldconfig not in
> > > DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
> > > ctypes.util.find_library(name) can find the lib if it is installed,
> > Hello Changqing Li,
> >
> > Did I understand correctly that gtk+3 was found before, indent of ldconfig
> > was in der DISTRO_FEATURES? But after the change, if fails.
> >
> > Where is libgdk installed? In /usr/lib or somewhere else?
>
> Hi,
>
> libgtk is under /usr/lib. See:
>
> root@qemux86-64:~# ldconfig -p | grep gtk-3
>
> libgtk-3.so.0 (libc6,x86-64) => /usr/lib/libgtk-3.so.0
>
> root@qemux86-64:~# python3
>
> Python 3.13.2 (main, Feb 4 2025, 14:51:09) [GCC 14.2.0] on linux Type
> "help", "copyright", "credits" or "license" for more information.
>
> >>> from ctypes.util import find_library
>
> >>> find_library('gtk-3')
>
> 'libgtk-3.so.0'
I have reverted your patch and this works:
```
root@qemux86-64:~# python3 -c 'from ctypes.util import find_library; print(find_library("m"))'
libm.so.6
root@qemux86-64:~# python3 -c 'from ctypes.util import find_library; print(find_library("gtk-3"))'
libgtk-3.so.0
root@qemux86-64:~# ldconfig --version
ldconfig (GNU libc) 2.41
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Andreas Jaeger.
```
Here are my settings from local.conf:
```
EXTRA_IMAGE_FEATURES += "\
allow-empty-password allow-root-login empty-root-password \
ssh-server-openssh tools-debug \
"
INIT_MANAGER = "systemd"
DISTRO_FEATURES:append = " usrmerge"
IMAGE_INSTALL:append = " conserver-ptest"
PACKAGECONFIG:append:pn-systemd = " coredump"
IMAGE_INSTALL:append = " python3-ctypes gtk+3"
MACHINE ??= "qemux86-64"
DISTRO ??= "poky"
```
I have used poky with 40b5f61a8f and the revert and meta-openembedded with
0b83551ff2.
> For the case that ldconfig is NOT in DISTRO_FEATURES, gtk+3 can be found.
> After commit "python3-ctypes: depend on ldconfig only if distro-feature set"
> is merged,
>
> ldconfig is not installed, so ctypes.util.find_library cannot found gtk+3.
You can also install ld or gcc. But if you prefer ldconfig, you should set
this DISTRO_FEATURES. It's like x11 support, if you want it you have to set
the feature.
Quoting https://docs.yoctoproject.org/ref-manual/features.html:
| ldconfig: Include support for ldconfig and ld.so.conf on the target.
@Mathieu: I think you should revert the commit 0df1318e5c, because it pulls
in ldconfig even it is unselected in DISTRO_FEATURES. It leaves no way to
build without ldconfig (what was the intend of my commit).
Kind regards, Jörg
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.de
Geschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-27 22:32 ` Jörg Sommer
@ 2025-02-28 2:56 ` Changqing Li
2025-02-28 5:42 ` Jörg Sommer
0 siblings, 1 reply; 16+ messages in thread
From: Changqing Li @ 2025-02-28 2:56 UTC (permalink / raw)
To: Jörg Sommer, Mathieu Dubois-Briand, Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 4946 bytes --]
On 2/28/25 06:32, Jörg Sommer wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> Changqing Li schrieb am Di 25. Feb, 10:02 (+0800):
>> On 2/25/25 07:36, Jörg Sommer wrote:
>>> CAUTION: This email comes from a non Wind River email account!
>>> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>>>
>>> Changqing Li via lists.openembedded.org schrieb am Do 20. Feb, 11:57 (+0800):
>>>> The reverted commit causes regression when ldconfig not in
>>>> DISTRO_FEATURES, before, without ldconfig in DISTRO_FEATURES,
>>>> ctypes.util.find_library(name) can find the lib if it is installed,
>>> Hello Changqing Li,
>>>
>>> Did I understand correctly that gtk+3 was found before, indent of ldconfig
>>> was in der DISTRO_FEATURES? But after the change, if fails.
>>>
>>> Where is libgdk installed? In /usr/lib or somewhere else?
>> Hi,
>>
>> libgtk is under /usr/lib. See:
>>
>> root@qemux86-64:~# ldconfig -p | grep gtk-3
>>
>> libgtk-3.so.0 (libc6,x86-64) => /usr/lib/libgtk-3.so.0
>>
>> root@qemux86-64:~# python3
>>
>> Python 3.13.2 (main, Feb 4 2025, 14:51:09) [GCC 14.2.0] on linux Type
>> "help", "copyright", "credits" or "license" for more information.
>>
>>>>> from ctypes.util import find_library
>>>>> find_library('gtk-3')
>> 'libgtk-3.so.0'
> I have reverted your patch and this works:
>
> ```
> root@qemux86-64:~# python3 -c 'from ctypes.util import find_library; print(find_library("m"))'
> libm.so.6
> root@qemux86-64:~# python3 -c 'from ctypes.util import find_library; print(find_library("gtk-3"))'
> libgtk-3.so.0
>
> root@qemux86-64:~# ldconfig --version
> ldconfig (GNU libc) 2.41
> Copyright (C) 2024 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Written by Andreas Jaeger.
> ```
>
> Here are my settings from local.conf:
>
> ```
> EXTRA_IMAGE_FEATURES += "\
> allow-empty-password allow-root-login empty-root-password \
> ssh-server-openssh tools-debug \
> "
>
> INIT_MANAGER = "systemd"
> DISTRO_FEATURES:append = " usrmerge"
> IMAGE_INSTALL:append = " conserver-ptest"
> PACKAGECONFIG:append:pn-systemd = " coredump"
>
> IMAGE_INSTALL:append = " python3-ctypes gtk+3"
>
> MACHINE ??= "qemux86-64"
> DISTRO ??= "poky"
> ```
>
> I have used poky with 40b5f61a8f and the revert and meta-openembedded with
> 0b83551ff2.
This works because poky have ldconfig in DISTRO_FEATURES by default,
https://git.yoctoproject.org/poky/tree/meta/conf/bitbake.conf#n933
if remove ldconfig from DISTRO_FEATURES in local.conf, it will not work.
>> For the case that ldconfig is NOT in DISTRO_FEATURES, gtk+3 can be found.
>> After commit "python3-ctypes: depend on ldconfig only if distro-feature set"
>> is merged,
>>
>> ldconfig is not installed, so ctypes.util.find_library cannot found gtk+3.
> You can also install ld or gcc. But if you prefer ldconfig, you should set
> this DISTRO_FEATURES. It's like x11 support, if you want it you have to set
> the feature.
ctypes.util.find_library need ldconfig or ld or gcc to work. No matter
what the DISTRO_FEATURES is, we should make a package at least work once
it is installed.
python3-ctypes need rdepend at least one of ld, ldconfig, gcc, it should
be a hard dependency.
certainly,it doesn't have to be ldconfig. I am not sure depends on
binutils or gcc it better, since binutils and gcc are more big packges.
>
> Quotinghttps://docs.yoctoproject.org/ref-manual/features.html:
>
> | ldconfig: Include support for ldconfig and ld.so.conf on the target.
>
>
> @Mathieu: I think you should revert the commit 0df1318e5c, because it pulls
> in ldconfig even it is unselected in DISTRO_FEATURES. It leaves no way to
> build without ldconfig (what was the intend of my commit).
when ldconfig is disabled in DISTRO_FEATURES, if we don't want ldconfig
be pulled in, how about just not install the package that depend on
ldconfig, eg: python3-ctypes.
if revert my commit, and ldconfig is disabled in DISTRO_FEATURES, and
python3-ctype is installed, ctypes.util.find_library will not work.
I tried with my commit in oe-core, and
DISTRO_FEATURES_BACKFILL_CONSIDERED += "ldconfig" in local.conf:
boot core-image-minimal, ldconfig is not pulled.
root@qemux86-64:~# ldconfig --version -sh: ldconfig: command not found
root@qemux86-64:~#
Regards
Changqing
>
>
> Kind regards, Jörg
>
> --
> Navimatix GmbH T: 03641 - 327 99 0
> Tatzendpromenade 2 F: 03641 - 526 306
> 07745 Jenawww.navimatix.de
>
> Geschäftsführer: Steffen Späthe, Jan Rommeley
> Registergericht: Amtsgericht Jena, HRB 501480
[-- Attachment #2: Type: text/html, Size: 8709 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-28 2:56 ` Changqing Li
@ 2025-02-28 5:42 ` Jörg Sommer
2025-02-28 10:20 ` Richard Purdie
0 siblings, 1 reply; 16+ messages in thread
From: Jörg Sommer @ 2025-02-28 5:42 UTC (permalink / raw)
To: Changqing Li; +Cc: Mathieu Dubois-Briand, Richard Purdie, openembedded-core
Changqing Li schrieb am Fr 28. Feb, 10:56 (+0800):
> On 2/28/25 06:32, Jörg Sommer wrote:
> > ```
> > root@qemux86-64:~# python3 -c 'from ctypes.util import find_library; print(find_library("m"))'
> > libm.so.6
> > root@qemux86-64:~# python3 -c 'from ctypes.util import find_library; print(find_library("gtk-3"))'
> > libgtk-3.so.0
> >
> > root@qemux86-64:~# ldconfig --version
> > ldconfig (GNU libc) 2.41
> > Copyright (C) 2024 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions. There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > Written by Andreas Jaeger.
> > ```
> >
> > Here are my settings from local.conf:
> >
> > ```
> > EXTRA_IMAGE_FEATURES += "\
> > allow-empty-password allow-root-login empty-root-password \
> > ssh-server-openssh tools-debug \
> > "
> >
> > INIT_MANAGER = "systemd"
> > DISTRO_FEATURES:append = " usrmerge"
> > IMAGE_INSTALL:append = " conserver-ptest"
> > PACKAGECONFIG:append:pn-systemd = " coredump"
> >
> > IMAGE_INSTALL:append = " python3-ctypes gtk+3"
> >
> > MACHINE ??= "qemux86-64"
> > DISTRO ??= "poky"
> > ```
> >
> > I have used poky with 40b5f61a8f and the revert and meta-openembedded with
> > 0b83551ff2.
>
> This works because poky have ldconfig in DISTRO_FEATURES by default,
> https://git.yoctoproject.org/poky/tree/meta/conf/bitbake.conf#n933
>
> if remove ldconfig from DISTRO_FEATURES in local.conf, it will not work.
But you can't remove ldconfig if you need it. Why do you remove it?
If you want the ldconfig feature of python3-ctype, you have to enable
ldconfig. Or at least install the package.
Or should we downgrade the dependency to a recommendation?
> ctypes.util.find_library need ldconfig or ld or gcc to work. No matter what
> the DISTRO_FEATURES is, we should make a package at least work once it is
> installed.
In our image python3-ctype works without ldconfig.
> > Quotinghttps://docs.yoctoproject.org/ref-manual/features.html:
> >
> > | ldconfig: Include support for ldconfig and ld.so.conf on the target.
> >
> >
> > @Mathieu: I think you should revert the commit 0df1318e5c, because it pulls
> > in ldconfig even it is unselected in DISTRO_FEATURES. It leaves no way to
> > build without ldconfig (what was the intend of my commit).
>
> when ldconfig is disabled in DISTRO_FEATURES, if we don't want ldconfig be
> pulled in, how about just not install the package that depend on ldconfig,
> eg: python3-ctypes.
In our case python3-ctypes is a dependency of django.
> if revert my commit, and ldconfig is disabled in DISTRO_FEATURES, and
> python3-ctype is installed, ctypes.util.find_library will not work.
But then you need ldconfig. Either install it with IMAGE_INSTALL or include
it in DISTRO_FEATURES. I see this the same way like other DISTRO_FEATURES
for example pam: if you want to use pam with e.g. systemd you have to
include it in DISTRO_FEATURES.
Regards, Jörg
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.de
Geschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-28 5:42 ` Jörg Sommer
@ 2025-02-28 10:20 ` Richard Purdie
2025-02-28 10:35 ` Jörg Sommer
0 siblings, 1 reply; 16+ messages in thread
From: Richard Purdie @ 2025-02-28 10:20 UTC (permalink / raw)
To: Jörg Sommer, Changqing Li; +Cc: Mathieu Dubois-Briand, openembedded-core
On Fri, 2025-02-28 at 06:42 +0100, Jörg Sommer wrote:
> Changqing Li schrieb am Fr 28. Feb, 10:56 (+0800):
>
> But you can't remove ldconfig if you need it. Why do you remove it?
>
> If you want the ldconfig feature of python3-ctype, you have to enable
> ldconfig. Or at least install the package.
>
> Or should we downgrade the dependency to a recommendation?
>
> > ctypes.util.find_library need ldconfig or ld or gcc to work. No matter what
> > the DISTRO_FEATURES is, we should make a package at least work once it is
> > installed.
>
> In our image python3-ctype works without ldconfig.
>
> > > Quotinghttps://docs.yoctoproject.org/ref-manual/features.html:
> > >
> > > > ldconfig: Include support for ldconfig and ld.so.conf on the target.
> > >
> > >
> > > @Mathieu: I think you should revert the commit 0df1318e5c, because it pulls
> > > in ldconfig even it is unselected in DISTRO_FEATURES. It leaves no way to
> > > build without ldconfig (what was the intend of my commit).
> >
> > when ldconfig is disabled in DISTRO_FEATURES, if we don't want ldconfig be
> > pulled in, how about just not install the package that depend on ldconfig,
> > eg: python3-ctypes.
>
> In our case python3-ctypes is a dependency of django.
>
> > if revert my commit, and ldconfig is disabled in DISTRO_FEATURES, and
> > python3-ctype is installed, ctypes.util.find_library will not work.
>
> But then you need ldconfig. Either install it with IMAGE_INSTALL or include
> it in DISTRO_FEATURES. I see this the same way like other DISTRO_FEATURES
> for example pam: if you want to use pam with e.g. systemd you have to
> include it in DISTRO_FEATURES.
DISTRO_FEATURES are high level policy controls, not "this should be
included or excluded" controls. For example "pam" controls whether the
access control modules are configured/used, not whether libpam is or is
not included.
For ldconfig, as I remember, the distro config was about whether to
include "ldconfig" calls after installing libraries and whether to use
the ld cache.
Packages being installed or not is an image level decision, not distro
level.
In this case, perhaps we should drop the RDEPENDS to a RRECOMMENDS?
Cheers,
Richard
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-28 10:20 ` Richard Purdie
@ 2025-02-28 10:35 ` Jörg Sommer
2025-02-28 10:50 ` Richard Purdie
0 siblings, 1 reply; 16+ messages in thread
From: Jörg Sommer @ 2025-02-28 10:35 UTC (permalink / raw)
To: Changqing Li, Richard Purdie; +Cc: Mathieu Dubois-Briand, openembedded-core
Richard Purdie schrieb am Fr 28. Feb, 10:20 (+0000):
> On Fri, 2025-02-28 at 06:42 +0100, Jörg Sommer wrote:
> > Changqing Li schrieb am Fr 28. Feb, 10:56 (+0800):
> >
> > But you can't remove ldconfig if you need it. Why do you remove it?
> >
> > If you want the ldconfig feature of python3-ctype, you have to enable
> > ldconfig. Or at least install the package.
> >
> > Or should we downgrade the dependency to a recommendation?
> >
> > > ctypes.util.find_library need ldconfig or ld or gcc to work. No matter what
> > > the DISTRO_FEATURES is, we should make a package at least work once it is
> > > installed.
> >
> > In our image python3-ctype works without ldconfig.
> >
> > > > Quotinghttps://docs.yoctoproject.org/ref-manual/features.html:
> > > >
> > > > > ldconfig: Include support for ldconfig and ld.so.conf on the target.
> > > >
> > > >
> > > > @Mathieu: I think you should revert the commit 0df1318e5c, because it pulls
> > > > in ldconfig even it is unselected in DISTRO_FEATURES. It leaves no way to
> > > > build without ldconfig (what was the intend of my commit).
> > >
> > > when ldconfig is disabled in DISTRO_FEATURES, if we don't want ldconfig be
> > > pulled in, how about just not install the package that depend on ldconfig,
> > > eg: python3-ctypes.
> >
> > In our case python3-ctypes is a dependency of django.
> >
> > > if revert my commit, and ldconfig is disabled in DISTRO_FEATURES, and
> > > python3-ctype is installed, ctypes.util.find_library will not work.
> >
> > But then you need ldconfig. Either install it with IMAGE_INSTALL or include
> > it in DISTRO_FEATURES. I see this the same way like other DISTRO_FEATURES
> > for example pam: if you want to use pam with e.g. systemd you have to
> > include it in DISTRO_FEATURES.
>
> DISTRO_FEATURES are high level policy controls, not "this should be
> included or excluded" controls. For example "pam" controls whether the
> access control modules are configured/used, not whether libpam is or is
> not included.
But it controls if other packages (e.g. systemd) enable pam support or not.
The same goes with ldconfig: Should ldconfig support in the packages be
enabled (which would pull-in ldconfig as dependency).
> For ldconfig, as I remember, the distro config was about whether to
> include "ldconfig" calls after installing libraries and whether to use the
> ld cache.
If the feature is only about enabling code in the postinst script, than we
should find a better description of the feature
| ldconfig: Include support for ldconfig and ld.so.conf on the target.
https://docs.yoctoproject.org/ref-manual/features.html
> Packages being installed or not is an image level decision, not distro
> level.
Yes, that's also my understanding. But enabling some features (e.g. x11
support) leads to recipes set DEPENDS on libs and this leads to the
installation of some packages. So DISTRO_FEATURES influence indirectly what
gets into the image.
> In this case, perhaps we should drop the RDEPENDS to a RRECOMMENDS?
This would be helpful to remove ldconfig, if django is installed.
But the main question is still open: Why should I want ldconfig and remove
it from DISTRO_FEATURES? What is this use case?
Regards Jörg
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.de
Geschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-28 10:35 ` Jörg Sommer
@ 2025-02-28 10:50 ` Richard Purdie
2025-03-03 3:30 ` Changqing Li
0 siblings, 1 reply; 16+ messages in thread
From: Richard Purdie @ 2025-02-28 10:50 UTC (permalink / raw)
To: Jörg Sommer, Changqing Li; +Cc: Mathieu Dubois-Briand, openembedded-core
On Fri, 2025-02-28 at 11:35 +0100, Jörg Sommer wrote:
> Richard Purdie schrieb am Fr 28. Feb, 10:20 (+0000):
> > DISTRO_FEATURES are high level policy controls, not "this should be
> > included or excluded" controls. For example "pam" controls whether the
> > access control modules are configured/used, not whether libpam is or is
> > not included.
>
> But it controls if other packages (e.g. systemd) enable pam support or not.
> The same goes with ldconfig: Should ldconfig support in the packages be
> enabled (which would pull-in ldconfig as dependency).
>
> > For ldconfig, as I remember, the distro config was about whether to
> > include "ldconfig" calls after installing libraries and whether to use the
> > ld cache.
>
> If the feature is only about enabling code in the postinst script, than we
> should find a better description of the feature
I think the description needs improving and I think we'd take patches
to do that.
> > ldconfig: Include support for ldconfig and ld.so.conf on the target.
>
> https://docs.yoctoproject.org/ref-manual/features.html
>
> > Packages being installed or not is an image level decision, not distro
> > level.
>
> Yes, that's also my understanding. But enabling some features (e.g. x11
> support) leads to recipes set DEPENDS on libs and this leads to the
> installation of some packages. So DISTRO_FEATURES influence indirectly what
> gets into the image.
The key word is indirectly. Where things have a hard dependency on
something, they do include that dependency and it isn't conditional on
a distro feature.
In this case, the usage is tangential to what the DISTRO_FEATURE was
designed for (ld cache). I do agree ldconfig is optional so RRECOMMENDS
seems better than a hard RDEPENDS though.
> > In this case, perhaps we should drop the RDEPENDS to a RRECOMMENDS?
>
> This would be helpful to remove ldconfig, if django is installed.
>
> But the main question is still open: Why should I want ldconfig and remove
> it from DISTRO_FEATURES? What is this use case?
It is being used to control whether the ld cache is being used or not.
That has to be done at a distro wide policy level. Whether ldconfig
makes it into the image or not is an indirect effect.
We can control the inclusion of ldconfig for ctypes at a package/image
level, it isn't a distro config level issue.
Cheers,
Richard
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [OE-core] [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set"
2025-02-28 10:50 ` Richard Purdie
@ 2025-03-03 3:30 ` Changqing Li
0 siblings, 0 replies; 16+ messages in thread
From: Changqing Li @ 2025-03-03 3:30 UTC (permalink / raw)
To: Richard Purdie, Jörg Sommer; +Cc: Mathieu Dubois-Briand, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2744 bytes --]
On 2/28/25 18:50, Richard Purdie wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Fri, 2025-02-28 at 11:35 +0100, Jörg Sommer wrote:
>> Richard Purdie schrieb am Fr 28. Feb, 10:20 (+0000):
>>> DISTRO_FEATURES are high level policy controls, not "this should be
>>> included or excluded" controls. For example "pam" controls whether the
>>> access control modules are configured/used, not whether libpam is or is
>>> not included.
>> But it controls if other packages (e.g. systemd) enable pam support or not.
>> The same goes with ldconfig: Should ldconfig support in the packages be
>> enabled (which would pull-in ldconfig as dependency).
>>
>>> For ldconfig, as I remember, the distro config was about whether to
>>> include "ldconfig" calls after installing libraries and whether to use the
>>> ld cache.
>> If the feature is only about enabling code in the postinst script, than we
>> should find a better description of the feature
> I think the description needs improving and I think we'd take patches
> to do that.
>
>>> ldconfig: Include support for ldconfig and ld.so.conf on the target.
>> https://docs.yoctoproject.org/ref-manual/features.html
>>
>>> Packages being installed or not is an image level decision, not distro
>>> level.
>> Yes, that's also my understanding. But enabling some features (e.g. x11
>> support) leads to recipes set DEPENDS on libs and this leads to the
>> installation of some packages. So DISTRO_FEATURES influence indirectly what
>> gets into the image.
> The key word is indirectly. Where things have a hard dependency on
> something, they do include that dependency and it isn't conditional on
> a distro feature.
>
> In this case, the usage is tangential to what the DISTRO_FEATURE was
> designed for (ld cache). I do agree ldconfig is optional so RRECOMMENDS
> seems better than a hard RDEPENDS though.
I will send a patch to update RDEPENDS -> RRECOMMENDS
Thanks
Changqing
>
>>> In this case, perhaps we should drop the RDEPENDS to a RRECOMMENDS?
>> This would be helpful to remove ldconfig, if django is installed.
>>
>> But the main question is still open: Why should I want ldconfig and remove
>> it from DISTRO_FEATURES? What is this use case?
> It is being used to control whether the ld cache is being used or not.
> That has to be done at a distro wide policy level. Whether ldconfig
> makes it into the image or not is an indirect effect.
>
> We can control the inclusion of ldconfig for ctypes at a package/image
> level, it isn't a distro config level issue.
>
> Cheers,
>
> Richard
>
>
[-- Attachment #2: Type: text/html, Size: 4712 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2025-03-03 3:30 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-20 3:57 [PATCH] Revert "python3-ctypes: depend on ldconfig only if distro-feature set" changqing.li
2025-02-21 14:34 ` [OE-core] " Mathieu Dubois-Briand
2025-02-24 0:27 ` Changqing Li
[not found] ` <1826FD59DBA1FC0B.20721@lists.openembedded.org>
2025-02-24 8:20 ` Changqing Li
2025-02-24 11:02 ` Mathieu Dubois-Briand
[not found] ` <18271FF8E1B74516.20721@lists.openembedded.org>
2025-02-25 9:12 ` Mathieu Dubois-Briand
2025-02-24 23:36 ` Jörg Sommer
2025-02-25 2:02 ` Changqing Li
2025-02-25 5:33 ` Jörg Sommer
2025-02-27 22:32 ` Jörg Sommer
2025-02-28 2:56 ` Changqing Li
2025-02-28 5:42 ` Jörg Sommer
2025-02-28 10:20 ` Richard Purdie
2025-02-28 10:35 ` Jörg Sommer
2025-02-28 10:50 ` Richard Purdie
2025-03-03 3:30 ` Changqing Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox