Openembedded Core Discussions
 help / color / mirror / Atom feed
* [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

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