Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 807334 - dev-libs/libgpiod: check for CONFIG_GPIO_CDEV_V1 in kernel configuration
Summary: dev-libs/libgpiod: check for CONFIG_GPIO_CDEV_V1 in kernel configuration
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-09 19:32 UTC by Marek Szuba
Modified: 2022-07-21 14:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Szuba archtester gentoo-dev 2021-08-09 19:32:03 UTC
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.
Comment 1 Larry the Git Cow gentoo-dev 2022-07-21 14:54:53 UTC
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(-)
Comment 2 Anthony Basile gentoo-dev 2022-07-21 14:55:35 UTC
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.