mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Markus Heidelberg <M.Heidelberg@cab.de>
Cc: Markus Heidelberg via ptxdist <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] libgpiod: select HOST_SYSTEM_PYTHON3_DEV for Python bindings
Date: Tue, 27 May 2025 14:06:48 +0200	[thread overview]
Message-ID: <20250527120648.GN1537051@pengutronix.de> (raw)
In-Reply-To: <aDWhzCRuWODxN6NV@KAN23-025>

On Tue, May 27, 2025 at 11:28:23AM +0000, Markus Heidelberg wrote:
> On Sun, May 25, 2025 at 03:50:17PM +0200, Michael Olbrich wrote:
> > On Tue, May 20, 2025 at 02:21:51PM +0200, Markus Heidelberg via ptxdist wrote:
> > > python3-config has to exist, available in python3-dev Debian package.
> > > 
> > > Fixes the following error in libgpiod prepare stage:
> > > 
> > >   checking for python3-config... false
> > >   configure: error: python3-config not found - needed for python bindings
> > > 
> > > Signed-off-by: Markus Heidelberg <m.heidelberg@cab.de>
> > > ---
> > >  rules/libgpiod.in | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/rules/libgpiod.in b/rules/libgpiod.in
> > > index 94bff5164..012223ff1 100644
> > > --- a/rules/libgpiod.in
> > > +++ b/rules/libgpiod.in
> > > @@ -6,6 +6,7 @@ menuconfig LIBGPIOD
> > >  	select HOST_SYSTEM_PYTHON3
> > >  	select GCCLIBS_CXX	if LIBGPIOD_CXX
> > >  	select PYTHON3		if LIBGPIOD_PYTHON3
> > > +	select HOST_SYSTEM_PYTHON3_DEV	if LIBGPIOD_PYTHON3
> > 
> > No, this is wrong. The python3-config should come from the Python we use to
> > build stuff for the target, so host-python/python.
> > 
> > We do some hacky stuff to combine the host-python binary with target python
> > stuff to get a cross python to build stuff. Maybe that needs to be extended
> > so that libgpiod will find python3-config?
> 
> I guess python3-config from sysroot-cross should be used, but there is
> only python3.13-config. So I wonder whether
> 
> A) there is a symlink (or copy) missing:
>    sysroot-cross/usr/bin/python3-config -> python3.13-config
> 
> B) libgpiod's configure.ac has to be patched:
>    -python3-config
>    +python3.13-config

Try adding ac_cv_prog_has_python_config=python3.13-config to
LIBGPIOD_CONF_ENV. Does that help?

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2025-05-27 12:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 12:21 Markus Heidelberg via ptxdist
2025-05-25 13:50 ` Michael Olbrich
2025-05-27 11:28   ` Markus Heidelberg via ptxdist
2025-05-27 12:06     ` Michael Olbrich [this message]
2025-05-28 14:49       ` Markus Heidelberg via ptxdist
2025-05-30 13:25         ` [ptxdist] [PATCH v2] libgpiod: override location of python3-config Markus Heidelberg via ptxdist

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=20250527120648.GN1537051@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=M.Heidelberg@cab.de \
    --cc=ptxdist@pengutronix.de \
    /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