Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 14886] Python ctypes find_library() not working correctly.
Date: Fri, 15 Jul 2022 00:47:21 +0000	[thread overview]
Message-ID: <bug-14886-163-LqkJMXHf6D@https.bugs.busybox.net/> (raw)
In-Reply-To: <bug-14886-163@https.bugs.busybox.net/>

https://bugs.busybox.net/show_bug.cgi?id=14886

--- Comment #3 from Pete Morici <pmorici@dev295.com> ---
    I was able to solve this by enabling the LDSO_CACHE_SUPPORT option in
uclibc via a configuration fragment and then patching the file
Lib/ctypes/util.py in the python3 package to change the mapping of "x86_64-64"
from "libc6,x86_64" to "libc0".  I wasn't able to find a way to generate the
cache file during the build process so you have to run ldconfig on first boot,
you could use and init script, before using Python to generate /etc/ls.so.cache
and then ctypes will work correctly.

    The crux of the issue is that, on Linux, Python's ctypes module just isn't
compatible with anything except glibc because is explicitly looks for "libc6"
and other glibc specific items in the output of ldconfig -p which is uses to
resolve paths to libraries loaded with ctypes.  If you are using uclibc, of
musl you are going to run into this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-07-15  0:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  6:58 [Buildroot] [Bug 14886] New: Python ctypes find_library() not working correctly bugzilla
2022-07-01 16:55 ` [Buildroot] [Bug 14886] " bugzilla
2022-07-11  6:44 ` bugzilla
2022-07-15  0:47 ` bugzilla [this message]
2022-07-18 22:06 ` bugzilla
2022-07-20  0:49 ` bugzilla
2022-07-20  0:59 ` bugzilla
2023-03-31 18:41 ` bugzilla
2024-06-15 15:03 ` bugzilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-14886-163-LqkJMXHf6D@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@uclibc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox