-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linuxgpio: add support for libgpiod v1.4 #1792
Conversation
…4 support (refs avrdudes#1782) This ancient libgpiod version is still shipped on Ubuntu 20.04 LTS. Add support for it by adding another helper. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Commit 8390909 introduced a regression with libgpiod versions below 2.0. Fix it by introducing a tiny helper function which returns the GPIO number (offset). Signed-off-by: Michael Heimpold <mhei@heimpold.de>
@mhei @stefanrueger and @mhei |
There are three warnings for
|
I think I know the reason already -- I have updated the documentation to add pkg-config as a dependancy for macOS but I have not updated the github action script. So I just pushed a commit to this PR. The issue was reported by @MCUdude here. |
Hmm, it still failed. Very strange. I think I encoutered such issue last time as well. Need to see if there is some change in macOS.
@MCUdude and @dl8dtl |
I think this PR is good to be merged to fix git main build regression for libgpiod under Linux. It is also good to fix #1782 that you have raised. As for macOS, I have created a new issue. |
First test with libgpiod git (version 2.2) -- this PR is good
Build log.
|
Second test -- with Raspberry Pi OS built-in libgpiod 1.6.3 version. This PR is good.
|
Take note git main will fail in this case -- so there is a regression in git main and this PR fixes the issue. This is also seen in github action build of git main. git main will fail with libgpiod 1.6.x
|
As mentioned in Issue #1782, git main will fail to build with older version of libgpiod, like version 1.4.x. git main will fail to build with libgpiod v1.4.x
|
This PR fixes Issue #1782 as well. Tested with libgpiod 1.4.4 release.
Build log: This PR is good with libgpiod v1.4.4 as well
</details. |
@stefanrueger @mhei and @stefanrueger However, the CMake build message may need to be improved. Maybe the first one message can be changed to
|
@mhei
cmake build is working fine.
BTW, I am actually fine with the configure message here. But I'd like @stefanrueger to comment as well.
Build log:
|
And the binary seems to work.
|
This PR has no issues with libgpiod git (version 2.2).
Build log.
|
@mhei and @stefanrueger Just a summary for my testing.
|
The standard cmake messages of pkg_check_modules might be confusing when being used as here, i.e. when searching for the highest compatible version. So suppress these standard messages and print manual ones instead. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Due to a copy and paste error, the required define for using libgpido at all was not set and thus the library was not used at all. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
We cannot print the exact version we detected, but we can give a hint about the "version class" at least. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
I agree that the standard cmake messages might be confusing. I tried to address this - not exactly the proposal of @mcuee, but should be good in my eyes. |
It is all good now. I am fine with the CMake and autotools configure messages as well. Tested the auto-tools build with libgpiod 1.4.4 version.
|
This PR is now good to be merged. |
I have just found out the root cause for macOS github action build, so I pused a fix as well. Now all github action check is good. |
I will take the liberty to merge this PR as it fixes both Linux and macOS github actions. |
I also updated the NEWS file, but I accidentally removed one space in the line |
This add a helper function which allows to compile against libgpiod v1.4
It also fixes a build regression with libgpiod versions < 2.0.