From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 10 Jul 2025 21:27:49 +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 1uZwvt-00G8fl-0G for lore@lore.pengutronix.de; Thu, 10 Jul 2025 21:27:49 +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 1uZwvs-0000RZ-PZ; Thu, 10 Jul 2025 21:27:48 +0200 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1uZwvW-0000Lo-Ha for ptxdist@pengutronix.de; Thu, 10 Jul 2025 21:27:27 +0200 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-74264d1832eso1929659b3a.0 for ; Thu, 10 Jul 2025 12:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752175644; x=1752780444; darn=pengutronix.de; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Hy7UnLVppCDtp86dOFP2ENl+PdO45Rm07k2M9cryr00=; b=TgfNKsSflq4ul6Iop3Bymq+oUrxCxGJIDb5s0NEvE4D/wDbpz2ZhIuewHYn44dWn/E vMKJ2T4H2p/dJml3k3WUYUbH5/RRR3AisX75kfQSTXsjZ8sM7KGh8NkKUo2tx86pavr0 kYW356DHs4/X6wn4P/btQnG4JNxPWRpPh6BLp+Vn9n3zK29x/m3FDGJy2eNInsCArV4Y Xy7IVAoazGy4AOblTRrk4PZahTq0dE5nKMxw8voywqxjQhjaEdtkJ77DabEnWKPhN3Yq h/XoVJ/5+MAp1+W2RLCvP36WjIroMtXc5bSW5j5MpmLWx6YQ/gM1eiOuXbgN+91qcHhH utzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752175644; x=1752780444; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Hy7UnLVppCDtp86dOFP2ENl+PdO45Rm07k2M9cryr00=; b=pE3l4DSoA15tL0NjNKPX7tmiNV5JFDhecbGEfQ1IYySXaZDRmBaC925UjMQhBIvROs w55xVSriawr5rzlMLnRVA70WpkYRXLxp6CqipTjNWADQ8gcCT0DkJQmUEGh3QVdDS/XD vJ6ijQPAYiGFmyzpKGkEmenESLfXW7sv9tPM9cR/5jGuBbqIvbTPXm3/SIWUtnJ+7G+m 1Gmqs0eBN6v4tsyEjG48KKlVp1uTGDSAwbI5bP4BOkdfuZvE4EimYMKQ1EWqoFWesSXx 1FSz8EHlKZyIOXX0y+aQ5W22crZBgeKACcwKk9oPuZqs9z3hPPI/3EYyNyL9QLjKWHjU 5pQQ== X-Gm-Message-State: AOJu0YxVJo7RN1QX9Zn+XL2JUbVReELYyKQZOR1A50nlgwJJbWkBgPw+ R+9iHJ0N9Al15/ysNoh8kegGwJfmY+cPofQvkBeXl80DqeqZSdJ1+2U/Wj4pK415pi3nXnU96Au SEXsEK3njN+0F9d+21R/hNtqZ6IrkSbu3DYR6QfXaUHSlviI= X-Gm-Gg: ASbGnctiVE1yTB9ZQbBV5+7Gko2LRyOcXM1qdeV47Yslj/I+Pzp72XagTl+d97WOpG5 2+WdarUmc3vewvIRsGXjfX7+dvw/B0cLGDiymuU/FRPQTWXPajWyyPEXonwv5JfTl0H9YXZOaJ6 QUQOOHUmonmfABRYA6PU3ovig1teVLC826heojtWbSPgs= X-Google-Smtp-Source: AGHT+IEWmq0Raq/lxQGW+QINRKOOXqWys/pF+WBatafqyo8HKrc5TWkQqudFEI94xHruOryYWvAb0nOk5FjZuplaDx4= X-Received: by 2002:a05:6a20:a108:b0:220:4750:1fb1 with SMTP id adf61e73a8af0-23135d64241mr376183637.4.1752175643997; Thu, 10 Jul 2025 12:27:23 -0700 (PDT) MIME-Version: 1.0 References: <20250709125101.483148-1-lapeddk@gmail.com> In-Reply-To: From: Lars Pedersen Date: Thu, 10 Jul 2025 21:27:11 +0200 X-Gm-Features: Ac12FXye-VcwUvyINP-luA2QUyJMZQJPEGk6hWLsQ9qp14SADhTD0LBm3qVKsXk Message-ID: To: Markus Heidelberg Content-Type: text/plain; charset="UTF-8" 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.3 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [PATCH] libgpiod: version bump 2.1.3 -> 2.2.2 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: , Reply-To: ptxdist@pengutronix.de Cc: "ptxdist@pengutronix.de" 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 Hi. Thanks for the feedback. On Thu, 10 Jul 2025 at 15:33, Markus Heidelberg wrote: > > On Wed, Jul 09, 2025 at 02:51:01PM +0200, Lars Alex Pedersen wrote: > > * Revert commit 0b38f33360be9221c1bca62f7023ffdcb9a9c0e5, since it has > > been fixed in release 2.2.2. > > * Add new options to install the dbus daemon with and without systemd. > > * Add gpio in group > > * Add gpio-manager user and group > > > > https://github.com/brgl/libgpiod/blob/v2.2.x/NEWS > > You could use the official upstream URL instead of the GitHub mirror: > https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/NEWS?h=v2.2.2 > > > Signed-off-by: Lars Alex Pedersen > > --- > > projectroot/etc/group | 2 ++ > > projectroot/etc/passwd | 1 + > > rules/libgpiod.in | 17 +++++++++++++++++ > > rules/libgpiod.make | 28 +++++++++++++++++++++++----- > > 4 files changed, 43 insertions(+), 5 deletions(-) > > > > > diff --git a/rules/libgpiod.make b/rules/libgpiod.make > > index 6272333b5..44f623b66 100644 > > --- a/rules/libgpiod.make > > +++ b/rules/libgpiod.make > > @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_LIBGPIOD) += libgpiod > > # > > # Paths and names > > # > > -LIBGPIOD_VERSION := 2.1.3 > > -LIBGPIOD_MD5 := dd37487da746569b7311b2c8fd2f907d > > +LIBGPIOD_VERSION := 2.2.2 > > +LIBGPIOD_MD5 := 11e80ef978c7dbffc6f16dbac412ce42 > > LIBGPIOD := libgpiod-$(LIBGPIOD_VERSION) > > LIBGPIOD_SUFFIX := tar.gz > > LIBGPIOD_URL := https://www.kernel.org/pub/software/libs/libgpiod/$(LIBGPIOD).$(LIBGPIOD_SUFFIX) > > @@ -45,15 +45,18 @@ LIBGPIOD_CONF_OPT := \ > > --disable-tests \ > > --disable-profiling \ > > --disable-examples \ > > + --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-bindings-glib \ > > + --disable-introspection \ > > Tab instead of space after "introspection". > > > + --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD)-systemd \ > > + --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-dbus \ > > It seems to be customary to sort the options to make > scripts/configure_helper.py silent, even if this script has a --sort > option. > > > --$(call ptx/endis, PTXCONF_LIBGPIOD_CXX)-bindings-cxx \ > > --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python \ > > --disable-bindings-rust > > > > LIBGPIOD_CONF_ENV := \ > > $(CROSS_ENV) \ > > - $(if $(PTXCONF_LIBGPIOD_PYTHON3), \ > > - ac_cv_path_PYTHON=$(CROSS_PYTHON3) \ > > - ac_cv_prog_has_python_config=python$(PYTHON3_MAJORMINOR)-config) > > Reversion of commit 0b38f33360be9221c1bca62f7023ffdcb9a9c0e5 went wrong, > only ac_cv_prog_has_python_config has to be removed, the other lines > joined into one. > > > + systemdsystemunitdir=/usr/lib/systemd/system > > + > > Whitespace error introduced, this blank line is superfluous anyway. > > > > > LIBGPIOD_LDFLAGS:= -Wl,-rpath-link,$(LIBGPIOD_DIR)/lib/.libs > > > > @@ -63,6 +66,8 @@ LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOGET) += gpioget > > LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOSET) += gpioset > > LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOMON) += gpiomon > > LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIONOTIFY) += gpionotify > > +LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON) += gpio-manager > > +LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON) += gpiocli > > > > # ---------------------------------------------------------------------------- > > # Target-Install > > @@ -84,6 +89,19 @@ $(STATEDIR)/libgpiod.targetinstall: > > /usr/bin/$$tool); \ > > done > > > > +ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON > > + @$(call install_tree, libgpiod, 0, 0, -, /usr/share/dbus-1/interfaces) > > + @$(call install_tree, libgpiod, 0, 0, -, /etc/dbus-1/system.d) > > + @$(call install_lib, libgpiod, 0, 0, 0644, libgpiodbus) > > + @$(call install_lib, libgpiod, 0, 0, 0644, libgpiod-glib) > > +endif > > +ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD > > + @$(call install_tree, libgpiod, 0, 0, -, /usr/lib/udev/rules.d) > > + @$(call install_alternative, libgpiod, 0, 0, 0644, \ > > + /usr/lib/systemd/system/gpio-manager.service) > > + @$(call install_link, libgpiod, ../gpio-manager.service, \ > > + /usr/lib/systemd/system/multi-user.target.wants/gpio-manager.service) > > +endif > > License information further above has to be extended for the new tools > and files. See "COPYING" and grep for "SPDX-License-Identifier" in > "dbus" directory. > > > ifdef PTXCONF_LIBGPIOD_CXX > > @$(call install_lib, libgpiod, 0, 0, 0644, libgpiodcxx) > > endif > > > > base-commit: 51f6fea554acb994e4f082af28077e82aab221cc > > -- > > 2.50.0 > > Do Python bindings build in your setup? Not for me and that was the > reason why I didn't yet update to v2.2.x. I didn't have enough time and > knowledge to handle this error (the wrong revert has been corrected > before invoking "ptxdist compile libgpiod"): > > make[4]: Entering directory '/home/.../build-target/libgpiod-2.2.2/bindings/python' > CFLAGS="-I/home/.../build-target/libgpiod-2.2.2/include/ -I/home/.../build-target/libgpiod-2.2.2/tests/gpiosim \ > -L/home/.../build-target/libgpiod-2.2.2/lib/.libs/ -L/home/.../build-target/libgpiod-2.2.2/tests/gpiosim/.libs/" \ > /home/.../sysroot-cross/usr/bin/python3.13 -m build > * Creating venv isolated environment... > > Traceback (most recent call last): > File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 375, in main > built = build_call( > args.srcdir, outdir, distributions, config_settings, not args.no_isolation, args.skip_dependency_check > ) > File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 235, in build_package_via_sdist > sdist = _build(isolation, builder, outdir, 'sdist', config_settings, skip_dependency_check) > File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 145, in _build > return _build_in_isolated_env(builder, outdir, distribution, config_settings) > File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 109, in _build_in_isolated_env > with _IsolatedEnvBuilder() as env: > ~~~~~~~~~~~~~~~~~~~^^ > File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/env.py", line 107, in __enter__ > executable, scripts_dir = _create_isolated_env_venv(self._path) > ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ > File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/env.py", line 279, in _create_isolated_env_venv > pip_distribution = next(iter(metadata.distributions(name='pip', path=[purelib]))) # type: ignore[no-untyped-call] > StopIteration > > ERROR > make[4]: *** [Makefile:720: all-local] Error 1 > > I found this related pybuild issue, but didn't get to a solution: > https://github.com/pypa/build/issues/266 I'll check our other suggestions, but this seems like the main issue. I got something working by patching libgpiod: --- a/bindings/python/Makefile.am +++ b/bindings/python/Makefile.am @@ -36,7 +36,7 @@ clean-local: all-local: python-tests CFLAGS="-I$(abs_top_srcdir)/include/ -I$(abs_top_srcdir)/tests/gpiosim \ -L$(abs_top_builddir)/lib/.libs/ -L$(abs_top_builddir)/tests/gpiosim/.libs/" \ - $(PYTHON) -m build + $(PYTHON) -m build --skip-dependency-check --wheel --no-isolation --- a/ptxdist/rules/libgpiod.in +++ b/ptxdist/rules/libgpiod.in @@ -3,12 +3,14 @@ menuconfig LIBGPIOD tristate prompt "libgpiod " - select HOST_SYSTEM_PYTHON3 - select DBUS if LIBGPIOD_DBUS_DAEMON - select LIBGUDEV if LIBGPIOD_DBUS_DAEMON - select GLIB if LIBGPIOD_DBUS_DAEMON - select GCCLIBS_CXX if LIBGPIOD_CXX - select PYTHON3 if LIBGPIOD_PYTHON3 + select HOST_PYTHON3 if LIBGPIOD_PYTHON3 + select HOST_PYTHON3_PYBUILD if LIBGPIOD_PYTHON3 + select HOST_PYTHON3_PIP if LIBGPIOD_PYTHON3 + select DBUS if LIBGPIOD_DBUS_DAEMON + select LIBGUDEV if LIBGPIOD_DBUS_DAEMON + select GLIB if LIBGPIOD_DBUS_DAEMON + select GCCLIBS_CXX if LIBGPIOD_CXX + select PYTHON3 if LIBGPIOD_PYTHON3 I guess the reason is something with that the python compile options from ptxdist in ptxd_make_world_compile.sh isn't being passed correctly, probably because it is a python3 build within a autoconf env. I don't know if this is the correct way to fix it. /Lars Pedersen > > Markus