From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 28 May 2025 16:49:44 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uKI6C-001Dsb-0w for lore@lore.pengutronix.de; Wed, 28 May 2025 16:49:44 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uKI6C-00042U-30; Wed, 28 May 2025 16:49:44 +0200 Received: from mx07-007fc201.pphosted.com ([185.132.181.212]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uKI5s-0003xk-CL; Wed, 28 May 2025 16:49:25 +0200 Received: from pps.filterd (m0456228.ppops.net [127.0.0.1]) by mx07-007fc201.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54SEdCnm010025; Wed, 28 May 2025 16:49:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cab.de; h= content-id:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to; s= pp-2025; bh=B4hCVZsF+qwDCAjUjqdtd7lVteYTzPld8OMseJkCqUc=; b=nuBW yqKIj1a1FDTPEJfriHwQMMPpjdcaP959tA0CKXKwINfue25YUmZNxLWzkiwKRelT MPdjUsMX2nYkB5+ZXGVg/OofSQv+Xdqw4JFLyLe6FfDRfcC1lkwMJYn+axzM5NWU jzyhV+78A9QzHnzf6xKi6kQLxEUXxGiIoM2fDjFvi2cWnzEJI64645C746wIb0VL IWU9lhKT8p1QNU8O57SERWdb79kkfsbQ+tFEOtL+CAKvwx7rVdhQh44jO4eBijoa lQlShO9BnGRvOkOJ/Fjbza8GYbC6sIot1ejfdUIiAyBGS1Sm4KJreDXVVpCqo4sb qCXv6PU4xZz11n6AtQ== Received: from adranos.cab.de (adranos.cab.de [46.232.229.107]) by mx07-007fc201.pphosted.com (PPS) with ESMTPS id 46utmr1b4n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 May 2025 16:49:22 +0200 (MEST) Received: from Adranos.cab.de (10.10.1.54) by Adranos.cab.de (10.10.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 28 May 2025 16:49:35 +0200 Received: from Adranos.cab.de ([fe80::9298:8fc8:395c:3859]) by Adranos.cab.de ([fe80::9298:8fc8:395c:3859%7]) with mapi id 15.02.1748.010; Wed, 28 May 2025 16:49:35 +0200 To: Michael Olbrich , "ptxdist@pengutronix.de" Thread-Topic: [ptxdist] [PATCH] libgpiod: select HOST_SYSTEM_PYTHON3_DEV for Python bindings Thread-Index: AQHbyYHXQa8r8hyXoES0EJg5CYNLXrPjQ1qAgAL8+ICAAArIAIABv7+A Date: Wed, 28 May 2025 14:49:35 +0000 Message-ID: References: <20250520122151.168894-1-m.heidelberg@cab.de> <20250527120648.GN1537051@pengutronix.de> In-Reply-To: <20250527120648.GN1537051@pengutronix.de> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.10.3.180] Content-Type: text/plain; charset="us-ascii" Content-ID: <1A056809FD96C542BD750463305BC813@cab.de> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=G+gcE8k5 c=1 sm=1 tr=0 ts=68372272 cx=c_pps a=LmW7qmVeM6tFdl5svFU9Cg==:117 a=LmW7qmVeM6tFdl5svFU9Cg==:17 a=xqWC_Br6kY4A:10 a=kldc_9v1VKEA:10 a=kj9zAlcOel0A:10 a=dt9VzEwgFbYA:10 a=VwQbUJbxAAAA:8 a=Gh8gEdLz4tO_OhgZETgA:9 a=CjuIK1q_8ugA:10 X-Proofpoint-GUID: QjTB68-SY_kHSOSakeity7iVOqeh4W0V X-Proofpoint-ORIG-GUID: QjTB68-SY_kHSOSakeity7iVOqeh4W0V X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI4MDEyOCBTYWx0ZWRfX7iuX8z9jv0UK ypgw4q8bPVmTJXChJx5/mbrATYE7MBVxe1YWmJhGCEWYXX1ipigBfrZZD/Opr7p9zzcrWTDg6D8 MxTQ/wScMfvj3cZfTn6sC35mrcODwbiSM4wGqYadus04G/XBPSTp4g8UkKbOP9MR1On40dPYoEq ImjGsh+kzEDRi4GtPdNM40eWMuMgeit8E0TtdDFqwMRBxdljO0iQjw/7uF/04Gurt6D5ePgv4Ed 5rLC66Qeye8uXhW9tika2cQZZkZmvFpzCUT16lJ6meFxxOhPlHtgjIlNcFS2Yh/Tf4E0s0oDhhX xup1V5ojaiVUlUjt8KMhGpett1ITq7RB4TRuR5utXbtpH4Ud6cJ5/hUISALSLt9RGea3BF1AdZk j/4wThhG X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [PATCH] libgpiod: select HOST_SYSTEM_PYTHON3_DEV for Python bindings X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Markus Heidelberg via ptxdist Reply-To: ptxdist@pengutronix.de Cc: Markus Heidelberg Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false > 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 ptxdi= st wrote: > > > > python3-config has to exist, available in python3-dev Debian packag= e. > > > >=20 > > > > Fixes the following error in libgpiod prepare stage: > > > >=20 > > > > checking for python3-config... false > > > > configure: error: python3-config not found - needed for python bi= ndings > > > >=20 > > > > Signed-off-by: Markus Heidelberg > > > > --- > > > > rules/libgpiod.in | 1 + > > > > 1 file changed, 1 insertion(+) > > > >=20 > > > > 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 > > >=20 > > > No, this is wrong. The python3-config should come from the Python we = use to > > > build stuff for the target, so host-python/python. > > >=20 > > > 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 ex= tended > > > so that libgpiod will find python3-config? > >=20 > > I guess python3-config from sysroot-cross should be used, but there is > > only python3.13-config. So I wonder whether > >=20 > > A) there is a symlink (or copy) missing: > > sysroot-cross/usr/bin/python3-config -> python3.13-config > >=20 > > B) libgpiod's configure.ac has to be patched: > > -python3-config > > +python3.13-config >=20 > Try adding ac_cv_prog_has_python_config=3Dpython3.13-config to > LIBGPIOD_CONF_ENV. Does that help? Yes, that helps, libgpiod builds successfully then. However, finally I had a look into the libgpiod sources and noticed that python3-config is not used at all. Autotools aren't used anymore to build the Python bindings since v2: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/bindings/p= ython/Makefile.am?id=3Db7ba732e6a93313d4609c4d3ffb426996bf68d02 Later some Python leftover had been removed from configure.ac, but not the python3-config check: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?id=3D8aab= 09cb23b19799c058f3375afde5f07de03eef So it would probably be better to just remove the python3-config check. I'll submit a patch upstream and when accepted submit it to PTXdist. Markus=