Gyorgy Sarvari schrieb am Mi 20. Nov, 19:56 (+0100):
> Isn't ldconfig a must for python3-ctypes? It[0] seems to call the ldconfig
> binary directly. I'd expect the package to break (at least for some
> usecases) without ldconfig.
> 
> [0]: 
> https://github.com/python/cpython/blob/6c1a4fb6d400827155fd70e48d682e35397731a1/Lib/ctypes/util.py#L224

This code in line 224 should not be used on Yocto Linux, because of the
condition in line 205

    if sys.platform.startswith(("freebsd", "openbsd", "dragonfly")):

In line 282 the Linux function starts:

        def _findSoname_ldconfig(name):
…
            try:
                with subprocess.Popen(['/sbin/ldconfig', '-p'],
                                      stdin=subprocess.DEVNULL,
                                      stderr=subprocess.DEVNULL,
                                      stdout=subprocess.PIPE,
                                      env={'LC_ALL': 'C', 'LANG': 'C'}) as p:
                    res = re.search(regex, p.stdout.read())
                    if res:
                        return os.fsdecode(res.group(1))
            except OSError:
                pass

According to GitHub's code search this is the only usage that provides a
proper fallback:

        def find_library(name):
            # See issue #9998
            return _findSoname_ldconfig(name) or \
                   _get_soname(_findLib_gcc(name)) or 
_get_soname(_findLib_ld(name))


I would say, the Python code support the non-ldconfig case.

>From you other post:

> Actually looking at it a bit more, it seems to recover from missing
> ldconfig, and it tries other ways. Sorry for the spam, please ignore.

No, I think you provided valuable information they help to clarify the
requirements for ldconfig. Thanks.


But I'm not a Python expert. At least, I can tell our system works without
ldconfig, but maybe we never trigger the interesting code paths.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64319): https://lists.yoctoproject.org/g/yocto/message/64319
Mute This Topic: https://lists.yoctoproject.org/mt/109687333/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to