Both the versions of libgpiod we have got in the tree and their Git master branch still use the (deprecated) version 1 of the GPIO character-device API. Using it on a system with CONFIG_GPIO_CDEV_V1 disabled results in highly obscure errors which do nothing to explain what exactly is wrong. For instance running 'gpioinfo' produces the error "error creating line iterator", and only having meticulously traced the execution flow of this tool in the source code can one find out that this is due the ioctl(GPIO_GET_LINEINFO_IOCTL) call in gpiod_line_update() (in lib/core.c) failing as unsupported. Therefore, it would IMHO make sense to warn the users in advance about the v1 API having been disabled.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9eaf32074191f03dc152ff9456b5c44db17a392 commit f9eaf32074191f03dc152ff9456b5c44db17a392 Author: Anthony G. Basile <blueness@gentoo.org> AuthorDate: 2022-07-21 14:54:23 +0000 Commit: Anthony G. Basile <blueness@gentoo.org> CommitDate: 2022-07-21 14:54:49 +0000 dev-libs/libgpiod: check for CONFIG_GPIO_CDEV_V1 in kernel config Closes: https://bugs.gentoo.org/807334 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Anthony G. Basile <blueness@gentoo.org> .../libgpiod/{libgpiod-1.6.3.ebuild => libgpiod-1.6.3-r1.ebuild} | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Thanks for catching this. Just for the records, I've only added this to 1.6.3 which I will stabilize now and then drop the older version.