All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Marcus Hoffmann via buildroot <buildroot@buildroot.org>
Cc: Marcus Hoffmann <buildroot@bubu1.eu>,
	Paul Cercueil <paul@crapouillou.net>
Subject: Re: [Buildroot] [PATCH 1/2] package/libiio: fix python bindings without glibc utils
Date: Sat, 27 Dec 2025 16:57:02 +0100	[thread overview]
Message-ID: <20251227165702.5930b424@windsurf> (raw)
In-Reply-To: <20251222172638.839720-1-buildroot@bubu1.eu>

Hello Marcus,

On Mon, 22 Dec 2025 18:26:36 +0100
Marcus Hoffmann via buildroot <buildroot@buildroot.org> wrote:

> Libiio python bindings use ctypes and specifically the find_library()
> function from there to load the libiio.so shared library. This is not
> working unless glibc utils (specifically ldconfig) is installed to the
> target (alternatively the target would need gcc or binutils, for objdump
> or ld).
> 
> The easy fix here is to just bypass the find_library() machinery
> altogether as it's not needed on a buildroot system.
> 
> Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
> ---
>  ...-bindings-python-fix-library-loading.patch | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 package/libiio/0001-bindings-python-fix-library-loading.patch

Thanks, I have applied both patches. However I must admit that for
PATCH 1/2, I would probably have preferred to backport the on-going PR
on cpython, which fixes the problem for all cases, not just libiio.

Reading the discussion on the PR, I think it was improperly presented
as being needed for "musl", and used only for musl. I would suggest to
not present it as something musl-specific, but rather something that
makes the lookup for the C/C++ libraries more portable (and therefore
probably drop using ldconfig entirely). This would have addressed the
concern raised on the PR that this is musl specific, and musl is not a
supported platform, yadayadayada.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2025-12-27 15:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22 17:26 [Buildroot] [PATCH 1/2] package/libiio: fix python bindings without glibc utils Marcus Hoffmann via buildroot
2025-12-22 17:26 ` [Buildroot] [PATCH 2/2] support/testing: add libiio python bindings runtime test Marcus Hoffmann via buildroot
2026-01-07 17:50   ` Arnout Vandecappelle via buildroot
2025-12-24  1:39 ` [Buildroot] [PATCH 1/2] package/libiio: fix python bindings without glibc utils Fiona Klute via buildroot
2025-12-27 15:57 ` Thomas Petazzoni via buildroot [this message]
2025-12-30 23:18   ` Fiona Klute via buildroot
2026-01-07 17:50 ` Arnout Vandecappelle via buildroot

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=20251227165702.5930b424@windsurf \
    --to=buildroot@buildroot.org \
    --cc=buildroot@bubu1.eu \
    --cc=paul@crapouillou.net \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.