Skip to contentSkip to conversation

package/libgpiod: bump to version 1.6.2

PATCH New Michael Nosthoff 2 participants 5 messages Feb 1, 2021 – Feb 2, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libgpiod: bump to version 1.6.2

Version 1.6.2 now builds against headers >= 4.8.x. (Previously 5.5 was required). Functionality might still be limited depending on the kernel version.

* altered note on updating
* disable building of tests

---
 package/libgpiod/libgpiod.hash | 2 +-
 package/libgpiod/libgpiod.mk   | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
package/libgpiod/libgpiod.hash +1 -1
index 0ea15869b0..7b691aaf5e 100644
@@ -1,4 +1,4 @@
 # From https://www.kernel.org/pub/software/libs/libgpiod/sha256sums.asc
-sha256  a041b06907c956dd1c77836cccf4d392af29b9fe09c8ad18449a6da707b5ba2d  libgpiod-1.4.5.tar.xz
+sha256  c601e71846f5ab140c83bc757fdd62a4fda24a9cee39cc5e99c96ec2bf1b06a9  libgpiod-1.6.2.tar.xz
 # Hash for license file
 sha256  ce64d5f7b49ea6d80fdb6d4cdee6839d1a94274f7493dc797c3b55b65ec8e9ed  COPYING
package/libgpiod/libgpiod.mk +4 -3
index 83d5abb002..72f8ae772c 100644
@@ -4,15 +4,16 @@
 #
 ################################################################################
 
-# be careful when bumping versions, newer branches (e.g. >= 1.6)
-# depend on pretty recent kernel headers
-LIBGPIOD_VERSION = 1.4.5
+# Be careful when bumping versions.
+# Dependency on kernel header versions may change.
+LIBGPIOD_VERSION = 1.6.2
 LIBGPIOD_SOURCE = libgpiod-$(LIBGPIOD_VERSION).tar.xz
 LIBGPIOD_SITE = https://www.kernel.org/pub/software/libs/libgpiod
 LIBGPIOD_LICENSE = LGPL-2.1+
 LIBGPIOD_LICENSE_FILES = COPYING
 LIBGPIOD_INSTALL_STAGING = YES
 LIBGPIOD_DEPENDENCIES = host-pkgconf
+LIBGPIOD_CONF_OPTS = --disable-tests
 
 ifeq ($(BR2_PACKAGE_LIBGPIOD_TOOLS),y)
 LIBGPIOD_CONF_OPTS += --enable-tools
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 package/libgpiod: bump to version 1.6.2

Quoted 28 lines · Michael Nosthoff

Version 1.6.2 now builds against headers >= 4.8.x. (Previously 5.5 was required). Functionality might still be limited depending on the kernel version.

* altered note on updating
* disable building of tests

---
 package/libgpiod/libgpiod.hash | 2 +-
 package/libgpiod/libgpiod.mk   | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
package/libgpiod/libgpiod.hash +1 -1
index 0ea15869b0..7b691aaf5e 100644
@@ -1,4 +1,4 @@
 # From https://www.kernel.org/pub/software/libs/libgpiod/sha256sums.asc
-sha256  a041b06907c956dd1c77836cccf4d392af29b9fe09c8ad18449a6da707b5ba2d  libgpiod-1.4.5.tar.xz
+sha256  c601e71846f5ab140c83bc757fdd62a4fda24a9cee39cc5e99c96ec2bf1b06a9  libgpiod-1.6.2.tar.xz
 # Hash for license file
 sha256  ce64d5f7b49ea6d80fdb6d4cdee6839d1a94274f7493dc797c3b55b65ec8e9ed  COPYING
package/libgpiod/libgpiod.mk +0 -0
index 83d5abb002..72f8ae772c 100644

package/libgpiod/libgpiod.mk line 8

Quoted 8 lines
package/libgpiod/libgpiod.mk +2 -3
@@ -4,15 +4,16 @@
 #
 ################################################################################
 
-# be careful when bumping versions, newer branches (e.g. >= 1.6)
-# depend on pretty recent kernel headers
-LIBGPIOD_VERSION = 1.4.5
+# Be careful when bumping versions.
+# Dependency on kernel header versions may change.

You can remove this comment - for v1.6.x I won't change the headers version requirement anymore and vor v2.x we'll start bundling the kernel header with the library. I also don't plan on making any new feature releases for the v1.x series.

package/libgpiod/libgpiod.mk line 17

Quoted 9 lines
package/libgpiod/libgpiod.mk +2 -0
+LIBGPIOD_VERSION = 1.6.2
 LIBGPIOD_SOURCE = libgpiod-$(LIBGPIOD_VERSION).tar.xz
 LIBGPIOD_SITE = https://www.kernel.org/pub/software/libs/libgpiod
 LIBGPIOD_LICENSE = LGPL-2.1+
 LIBGPIOD_LICENSE_FILES = COPYING
 LIBGPIOD_INSTALL_STAGING = YES
 LIBGPIOD_DEPENDENCIES = host-pkgconf
+LIBGPIOD_CONF_OPTS = --disable-tests
 

Maybe add an option to build them conditionally? Like yocto's ptest distro feature?

Bart

Quoted 5 lines
package/libgpiod/libgpiod.mk +0 -1
 ifeq ($(BR2_PACKAGE_LIBGPIOD_TOOLS),y)
 LIBGPIOD_CONF_OPTS += --enable-tools
--

2.25.1

#2 lore raw

PATCH 1/1 package/libgpiod: bump to version 1.6.2

Hi Bartosz,

Quoted 12 lines · Bartosz Golaszewski

package/libgpiod/libgpiod.mk line 8

Quoted 5 lines · Michael Nosthoff
package/libgpiod/libgpiod.mk +2 -1
-LIBGPIOD_VERSION = 1.4.5
+# Be careful when bumping versions.
+# Dependency on kernel header versions may change.

You can remove this comment - for v1.6.x I won't change the headers version requirement anymore and vor v2.x we'll start bundling the kernel header with the library. I also don't plan on making any new feature releases for the v1.x series.

perfect, then I'll drop that.

Quoted 4 lines
Quoted 4 lines

+LIBGPIOD_VERSION = 1.6.2
LIBGPIOD_SOURCE = libgpiod-$(LIBGPIOD_VERSION).tar.xz LIBGPIOD_SITE = https://www.kernel.org/pub/software/libs/libgpiod
LIBGPIOD_LICENSE = LGPL-2.1+

Quoted 9 lines
Quoted 5 lines

LIBGPIOD_LICENSE_FILES = COPYING
LIBGPIOD_INSTALL_STAGING = YES
LIBGPIOD_DEPENDENCIES = host-pkgconf
+LIBGPIOD_CONF_OPTS = --disable-tests

Maybe add an option to build them conditionally? Like yocto's ptest distro feature?

I'm not sure if this fits into buildroot's scope. What would be the benefit for the user? Maybe Thomas has an opinion on that? From the dependencies I see we currently don't have catch2 in BR. So this might be the showstopper atm.

Regards,
Michael

#3 lore raw

PATCH 1/1 package/libgpiod: bump to version 1.6.2

Bartosz,

I just noticed there is another build issue with the 1.6.2 release and I'm trying to get my head around how to best fix it.

When I make a clean build with C++ enabled the Buildroot build fails with this messages:

make[5]: Entering directory '/build/output/build/libgpiod-1.6.2/bindings/cxx/examples'
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiodetectcxx.o gpiodetectcxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiofindcxx.o gpiofindcxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiogetcxx.o gpiogetcxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpioinfocxx.o gpioinfocxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiomoncxx.o gpiomoncxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiosetcxx.o gpiosetcxx.cpp

/bin/bash ../../../libtool  --tag=CXX   --mode=link /build/output/host/bin/arm-none-linux-gnueabihf-g++  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -lgpiodcxx -L../../../bindings/cxx/  -o gpiofindcxx gpiofindcxx.o
/bin/bash ../../../libtool  --tag=CXX   --mode=link /build/output/host/bin/arm-none-linux-gnueabihf-g++  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -lgpiodcxx -L../../../bindings/cxx/  -o gpiodetectcxx gpiodetectcxx.o

libtool: link: /build/output/host/bin/arm-none-linux-gnueabihf-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o gpiofindcxx gpiofindcxx.o /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/li bgpiodcxx.so -L../../../bindings/cxx/ -Wl,-rpath -Wl,/build/output/build/libgpiod-1.6.2/bindings/cxx/.libs
/bin/bash ../../../libtool --tag=CXX --mode=link /build/output/host/bin/arm-none-linux-gnueabihf-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -lgpiodcxx -L../../../bindings/cxx/ -o gpioinfocxx gpioinfocxx.o
libtool: link: /build/output/host/bin/arm-none-linux-gnueabihf-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o gpiodetectcxx gpiodetectcxx.o /build/output/build/libgpiod-1.6.2/bindings/cxx/.lib s/libgpiodcxx.so -L../../../bindings/cxx/ -Wl,-rpath -Wl,/build/output/build/libgpiod-1.6.2/bindings/cxx/.libs /build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_bias'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_set_direction_output_bulk'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_set_config_bulk'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_set_direction_input_bulk'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_event_read_multiple'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_set_flags_bulk'
collect2: error: ld returned 1 exit status

When building regularly on a clean Linux system I don't have any troubles.
If I build on a Buildroot target which already has some version of libgpiod built it works. (e.g. when bumping the version without make clean).
So it seems that the build doesn't find the libgpiod.so that was just built inside the build directory. My guess is it has something to do with the libtools workarounds for cross-compiling (My knowledge of autotools/libtool is limited here.).

But before I dig deeper into why this fails my question would be: does the bindings/cpp/examples directory really need to be build? In the 1.4.x branch it was not built by default. Now it is changed to a "noinst" target. So it gets build but won't be deployed to the target anyways.

Maybe you have an Idea how this could be easily fixed. My (not so nice) solution for now would be to patch out the examples directory. But this is really a last ressort...

Regards,
Michael

#4 lore raw

PATCH 1/1 package/libgpiod: bump to version 1.6.2

Quoted 43 lines · Michael Nosthoff

Bartosz,

I just noticed there is another build issue with the 1.6.2 release and I'm trying to get my head around how to best fix it.

When I make a clean build with C++ enabled the Buildroot build fails with this messages:

make[5]: Entering directory '/build/output/build/libgpiod-1.6.2/bindings/cxx/examples'
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiodetectcxx.o gpiodetectcxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiofindcxx.o gpiofindcxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiogetcxx.o gpiogetcxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpioinfocxx.o gpioinfocxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiomoncxx.o gpiomoncxx.cpp
/build/output/host/bin/arm-none-linux-gnueabihf-g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../bindings/cxx/ -I../../../include -Wall -Wextra -g -std=gnu++11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o gpiosetcxx.o gpiosetcxx.cpp

/bin/bash ../../../libtool  --tag=CXX   --mode=link /build/output/host/bin/arm-none-linux-gnueabihf-g++  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -lgpiodcxx -L../../../bindings/cxx/  -o gpiofindcxx gpiofindcxx.o
/bin/bash ../../../libtool  --tag=CXX   --mode=link /build/output/host/bin/arm-none-linux-gnueabihf-g++  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -lgpiodcxx -L../../../bindings/cxx/  -o gpiodetectcxx gpiodetectcxx.o

libtool: link: /build/output/host/bin/arm-none-linux-gnueabihf-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o gpiofindcxx gpiofindcxx.o /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/li bgpiodcxx.so -L../../../bindings/cxx/ -Wl,-rpath -Wl,/build/output/build/libgpiod-1.6.2/bindings/cxx/.libs
/bin/bash ../../../libtool --tag=CXX --mode=link /build/output/host/bin/arm-none-linux-gnueabihf-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -lgpiodcxx -L../../../bindings/cxx/ -o gpioinfocxx gpioinfocxx.o
libtool: link: /build/output/host/bin/arm-none-linux-gnueabihf-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -o gpiodetectcxx gpiodetectcxx.o /build/output/build/libgpiod-1.6.2/bindings/cxx/.lib s/libgpiodcxx.so -L../../../bindings/cxx/ -Wl,-rpath -Wl,/build/output/build/libgpiod-1.6.2/bindings/cxx/.libs /build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_bias'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_set_direction_output_bulk'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_set_config_bulk'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_set_direction_input_bulk'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_event_read_multiple'
/build/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /build/output/build/libgpiod-1.6.2/bindings/cxx/.libs/libgpiodcxx.so: undefined reference to ` gpiod_line_set_flags_bulk'
collect2: error: ld returned 1 exit status

Quoted 7 lines

When building regularly on a clean Linux system I don't have any troubles.
If I build on a Buildroot target which already has some version of libgpiod built it works. (e.g. when bumping the version without make clean).
So it seems that the build doesn't find the libgpiod.so that was just built inside the build directory. My guess is it has something to do with the libtools workarounds for cross-compiling (My knowledge of autotools/libtool is limited here.).

But before I dig deeper into why this fails my question would be: does the bindings/cpp/examples directory really need to be build? In the 1.4.x branch it was not built by default. Now it is changed to a "noinst" target. So it gets build but won't be deployed to the target anyways.

It doesn't need to be built and in v2.0 we already have a flag to disable building examples (because, for example, the C++ examples in v2.0 depend on C++17 features). It would be useful however to fix the problem because it may manifest itself somewhere else too. I'll see about that as soon as I find some time.

Bart

Quoted 5 lines

Maybe you have an Idea how this could be easily fixed. My (not so nice) solution for now would be to patch out the examples directory. But this is really a last ressort...

Regards,
Michael