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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#212046):
https://lists.openembedded.org/g/openembedded-core/message/212046
Mute This Topic: https://lists.openembedded.org/mt/111283758/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-