Doesn't this upgrade break python3-gpiod
(meta-oe/meta-python/recipes-devtools/python/python3-gpiod_2.2.1.bb)?

In world builds I'm seeing new build failure which looks like caused
by update libgpiod API:

gpiod/ext/chip.c: In function 'chip_path':
gpiod/ext/chip.c:43:37: error: implicit declaration of function
'gpiod_chip_get_path'; did you mean 'gpiod_chip_get_line'?
[-Wimplicit-function-declaration]
   43 |         return PyUnicode_FromString(gpiod_chip_get_path(self->chip));
      |                                     ^~~~~~~~~~~~~~~~~~~
      |                                     gpiod_chip_get_line
gpiod/ext/chip.c:43:37: error: passing argument 1 of
'PyUnicode_FromString' makes pointer from integer without a cast
[-Wint-conversion]
   43 |         return PyUnicode_FromString(gpiod_chip_get_path(self->chip));
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                     |
      |                                     int
In file included from
TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-gpiod/2.2.1/recipe-sysroot/usr/include/python3.13/Python.h:79,
                 from gpiod/ext/internal.h:8:
TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-gpiod/2.2.1/recipe-sysroot/usr/include/python3.13/unicodeobject.h:130:17:
note: expected 'const char *' but argument is of type 'int'
  130 |     const char *u              /* UTF-8 encoded string */
      |     ~~~~~~~~~~~~^
gpiod/ext/chip.c: In function 'chip_fd':
gpiod/ext/chip.c:48:32: error: implicit declaration of function
'gpiod_chip_get_fd'; did you mean 'gpiod_chip_get_line'?
[-Wimplicit-function-declaration]
   48 |         return PyLong_FromLong(gpiod_chip_get_fd(self->chip));
      |                                ^~~~~~~~~~~~~~~~~
      |                                gpiod_chip_get_line
gpiod/ext/chip.c: In function 'chip_get_info':
gpiod/ext/chip.c:82:16: error: implicit declaration of function
'gpiod_chip_get_info'; did you mean 'gpiod_chip_get_lines'?
[-Wimplicit-function-declaration]
   82 |         info = gpiod_chip_get_info(self->chip);
      |                ^~~~~~~~~~~~~~~~~~~
      |                gpiod_chip_get_lines
gpiod/ext/chip.c:82:14: error: assignment to 'struct gpiod_chip_info
*' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
   82 |         info = gpiod_chip_get_info(self->chip);
      |              ^
gpiod/ext/chip.c:87:38: error: implicit declaration of function
'gpiod_chip_info_get_name'; did you mean 'gpiod_chip_open_by_name'?
[-Wimplicit-function-declaration]
   87 |                                      gpiod_chip_info_get_name(info),
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                      gpiod_chip_open_by_name
gpiod/ext/chip.c:88:38: error: implicit declaration of function
'gpiod_chip_info_get_label'; did you mean 'gpiod_chip_open_by_label'?
[-Wimplicit-function-declaration]
   88 |                                      gpiod_chip_info_get_label(info),
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                      gpiod_chip_open_by_label
gpiod/ext/chip.c:89:38: error: implicit declaration of function
'gpiod_chip_info_get_num_lines'; did you mean
'gpiod_chip_get_all_lines'? [-Wimplicit-function-declaration]
   89 |
gpiod_chip_info_get_num_lines(info));
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                      gpiod_chip_get_all_lines
gpiod/ext/chip.c:90:10: error: implicit declaration of function
'gpiod_chip_info_free'; did you mean 'gpiod_chip_iter_free'?
[-Wimplicit-function-declaration]
   90 |          gpiod_chip_info_free(info);
      |          ^~~~~~~~~~~~~~~~~~~~
      |          gpiod_chip_iter_free
gpiod/ext/chip.c: At top level:
gpiod/ext/chip.c:94:40: warning: 'struct gpiod_line_info' declared
inside parameter list will not be visible outside of this definition
or declaration
   94 | static PyObject *make_line_info(struct gpiod_line_info *info)
      |                                        ^~~~~~~~~~~~~~~
gpiod/ext/chip.c: In function 'make_line_info':
gpiod/ext/chip.c:103:33: error: implicit declaration of function
'gpiod_line_info_get_offset'; did you mean 'gpiod_line_offset'?
[-Wimplicit-function-declaration]
  103 |                                 gpiod_line_info_get_offset(info),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 gpiod_line_offset
gpiod/ext/chip.c:104:33: error: implicit declaration of function
'gpiod_line_info_get_name'; did you mean 'gpiod_line_bulk_get_line'?
[-Wimplicit-function-declaration]
  104 |                                 gpiod_line_info_get_name(info),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                 gpiod_line_bulk_get_line
gpiod/ext/chip.c:105:33: error: implicit declaration of function
'gpiod_line_info_is_used'; did you mean 'gpiod_line_is_used'?
[-Wimplicit-function-declaration]
  105 |                                 gpiod_line_info_is_used(info) ?
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
      |                                 gpiod_line_is_used
gpiod/ext/chip.c:107:33: error: implicit declaration of function
'gpiod_line_info_get_consumer'; did you mean 'gpiod_line_consumer'?
[-Wimplicit-function-declaration]
  107 |                                 gpiod_line_info_get_consumer(info),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 gpiod_line_consumer
gpiod/ext/chip.c:108:33: error: implicit declaration of function
'gpiod_line_info_get_direction'; did you mean 'gpiod_line_direction'?
[-Wimplicit-function-declaration]
  108 |                                 gpiod_line_info_get_direction(info),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 gpiod_line_direction
gpiod/ext/chip.c:109:33: error: implicit declaration of function
'gpiod_line_info_is_active_low' [-Wimplicit-function-declaration]
  109 |                                 gpiod_line_info_is_active_low(info) ?
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:111:33: error: implicit declaration of function
'gpiod_line_info_get_bias'; did you mean 'gpiod_line_bulk_get_line'?
[-Wimplicit-function-declaration]
  111 |                                 gpiod_line_info_get_bias(info),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                 gpiod_line_bulk_get_line
gpiod/ext/chip.c:112:33: error: implicit declaration of function
'gpiod_line_info_get_drive'; did you mean 'gpiod_line_bulk_get_line'?
[-Wimplicit-function-declaration]
  112 |                                 gpiod_line_info_get_drive(info),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 gpiod_line_bulk_get_line
gpiod/ext/chip.c:113:33: error: implicit declaration of function
'gpiod_line_info_get_edge_detection' [-Wimplicit-function-declaration]
  113 |
gpiod_line_info_get_edge_detection(info),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:114:33: error: implicit declaration of function
'gpiod_line_info_get_event_clock' [-Wimplicit-function-declaration]
  114 |                                 gpiod_line_info_get_event_clock(info),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:115:33: error: implicit declaration of function
'gpiod_line_info_is_debounced'; did you mean
'gpiod_line_is_open_source'? [-Wimplicit-function-declaration]
  115 |                                 gpiod_line_info_is_debounced(info) ?
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 gpiod_line_is_open_source
gpiod/ext/chip.c:117:33: error: implicit declaration of function
'gpiod_line_info_get_debounce_period_us'
[-Wimplicit-function-declaration]
  117 |
gpiod_line_info_get_debounce_period_us(info));
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c: In function 'chip_get_line_info':
gpiod/ext/chip.c:133:24: error: implicit declaration of function
'gpiod_chip_watch_line_info'; did you mean 'gpiod_chip_get_lines'?
[-Wimplicit-function-declaration]
  133 |                 info = gpiod_chip_watch_line_info(self->chip, offset);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        gpiod_chip_get_lines
gpiod/ext/chip.c:133:22: error: assignment to 'struct gpiod_line_info
*' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
  133 |                 info = gpiod_chip_watch_line_info(self->chip, offset);
      |                      ^
gpiod/ext/chip.c:135:24: error: implicit declaration of function
'gpiod_chip_get_line_info'; did you mean 'gpiod_chip_get_lines'?
[-Wimplicit-function-declaration]
  135 |                 info = gpiod_chip_get_line_info(self->chip, offset);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
      |                        gpiod_chip_get_lines
gpiod/ext/chip.c:135:22: error: assignment to 'struct gpiod_line_info
*' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
  135 |                 info = gpiod_chip_get_line_info(self->chip, offset);
      |                      ^
gpiod/ext/chip.c:140:35: error: passing argument 1 of 'make_line_info'
from incompatible pointer type [-Wincompatible-pointer-types]
  140 |         info_obj = make_line_info(info);
      |                                   ^~~~
      |                                   |
      |                                   struct gpiod_line_info *
gpiod/ext/chip.c:94:57: note: expected 'struct gpiod_line_info *' but
argument is of type 'struct gpiod_line_info *'
   94 | static PyObject *make_line_info(struct gpiod_line_info *info)
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
gpiod/ext/chip.c:141:9: error: implicit declaration of function
'gpiod_line_info_free'; did you mean 'gpiod_line_iter_free'?
[-Wimplicit-function-declaration]
  141 |         gpiod_line_info_free(info);
      |         ^~~~~~~~~~~~~~~~~~~~
      |         gpiod_line_iter_free
gpiod/ext/chip.c: In function 'chip_unwatch_line_info':
gpiod/ext/chip.c:156:15: error: implicit declaration of function
'gpiod_chip_unwatch_line_info'; did you mean 'chip_unwatch_line_info'?
[-Wimplicit-function-declaration]
  156 |         ret = gpiod_chip_unwatch_line_info(self->chip, offset);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |               chip_unwatch_line_info
gpiod/ext/chip.c: In function 'chip_read_info_event':
gpiod/ext/chip.c:176:17: error: implicit declaration of function
'gpiod_chip_read_info_event'; did you mean 'chip_read_info_event'?
[-Wimplicit-function-declaration]
  176 |         event = gpiod_chip_read_info_event(self->chip);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 chip_read_info_event
gpiod/ext/chip.c:176:15: error: assignment to 'struct gpiod_info_event
*' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
  176 |         event = gpiod_chip_read_info_event(self->chip);
      |               ^
gpiod/ext/chip.c:181:16: error: implicit declaration of function
'gpiod_info_event_get_line_info' [-Wimplicit-function-declaration]
  181 |         info = gpiod_info_event_get_line_info(event);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:181:14: error: assignment to 'struct gpiod_line_info
*' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
  181 |         info = gpiod_info_event_get_line_info(event);
      |              ^
gpiod/ext/chip.c:183:35: error: passing argument 1 of 'make_line_info'
from incompatible pointer type [-Wincompatible-pointer-types]
  183 |         info_obj = make_line_info(info);
      |                                   ^~~~
      |                                   |
      |                                   struct gpiod_line_info *
gpiod/ext/chip.c:94:57: note: expected 'struct gpiod_line_info *' but
argument is of type 'struct gpiod_line_info *'
   94 | static PyObject *make_line_info(struct gpiod_line_info *info)
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
gpiod/ext/chip.c:185:17: error: implicit declaration of function
'gpiod_info_event_free'; did you mean 'gpiod_line_event_read'?
[-Wimplicit-function-declaration]
  185 |                 gpiod_info_event_free(event);
      |                 ^~~~~~~~~~~~~~~~~~~~~
      |                 gpiod_line_event_read
gpiod/ext/chip.c:190:33: error: implicit declaration of function
'gpiod_info_event_get_event_type' [-Wimplicit-function-declaration]
  190 |                                 gpiod_info_event_get_event_type(event),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:191:33: error: implicit declaration of function
'gpiod_info_event_get_timestamp_ns' [-Wimplicit-function-declaration]
  191 |
gpiod_info_event_get_timestamp_ns(event),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c: In function 'chip_line_offset_from_id':
gpiod/ext/chip.c:208:18: error: implicit declaration of function
'gpiod_chip_get_line_offset_from_name'
[-Wimplicit-function-declaration]
  208 |         offset = gpiod_chip_get_line_offset_from_name(self->chip, name);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c: In function 'make_request_config':
gpiod/ext/chip.c:223:19: error: implicit declaration of function
'gpiod_request_config_new' [-Wimplicit-function-declaration]
  223 |         req_cfg = gpiod_request_config_new();
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:223:17: error: assignment to 'struct
gpiod_request_config *' from 'int' makes pointer from integer without
a cast [-Wint-conversion]
  223 |         req_cfg = gpiod_request_config_new();
      |                 ^
gpiod/ext/chip.c:232:25: error: implicit declaration of function
'gpiod_request_config_free' [-Wimplicit-function-declaration]
  232 |                         gpiod_request_config_free(req_cfg);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:236:17: error: implicit declaration of function
'gpiod_request_config_set_consumer' [-Wimplicit-function-declaration]
  236 |                 gpiod_request_config_set_consumer(req_cfg, consumer);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:246:17: error: implicit declaration of function
'gpiod_request_config_set_event_buffer_size'
[-Wimplicit-function-declaration]
  246 |                 gpiod_request_config_set_event_buffer_size(req_cfg,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c: In function 'chip_request_lines':
gpiod/ext/chip.c:275:19: error: implicit declaration of function
'gpiod_chip_request_lines'; did you mean 'gpiod_chip_get_lines'?
[-Wimplicit-function-declaration]
  275 |         request = gpiod_chip_request_lines(self->chip,
req_cfg, line_cfg);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
      |                   gpiod_chip_get_lines
gpiod/ext/chip.c:275:17: error: assignment to 'struct
gpiod_line_request *' from 'int' makes pointer from integer without a
cast [-Wint-conversion]
  275 |         request = gpiod_chip_request_lines(self->chip,
req_cfg, line_cfg);
      |                 ^
gpiod/ext/chip.c:283:25: error: implicit declaration of function
'gpiod_request_config_get_event_buffer_size'
[-Wimplicit-function-declaration]
  283 |
gpiod_request_config_get_event_buffer_size(req_cfg));
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpiod/ext/chip.c:282:46: error: passing argument 1 of
'Py_gpiod_MakeRequestObject' from incompatible pointer type
[-Wincompatible-pointer-types]
  282 |         req_obj = Py_gpiod_MakeRequestObject(request,
      |                                              ^~~~~~~
      |                                              |
      |                                              struct gpiod_line_request *
gpiod/ext/internal.h:14:65: note: expected 'struct gpiod_line_request
*' but argument is of type 'struct gpiod_line_request *'
   14 | PyObject *Py_gpiod_MakeRequestObject(struct gpiod_line_request *request,
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
gpiod/ext/chip.c:285:17: error: implicit declaration of function
'gpiod_line_request_release'; did you mean 'gpiod_line_request_bulk'?
[-Wimplicit-function-declaration]
  285 |                 gpiod_line_request_release(request);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 gpiod_line_request_bulk
error: command 
'TOPDIR/BUILD/work/raspberrypi4_64-webos-linux/python3-gpiod/2.2.1/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-gcc'
failed with exit code 1

On Thu, Oct 24, 2024 at 4:19 PM Khem Raj via lists.openembedded.org
<[email protected]> wrote:
>
> Thanks for testing and Review Alexander.
>
> On Thu, Oct 24, 2024 at 7:10 AM Sverdlin, Alexander
> <[email protected]> wrote:
> >
> > Hello all,
> >
> > On Thu, 2024-10-24 at 15:51 +0200, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <[email protected]>
> > >
> > > This is a big update for libgpiod bringing in the D-Bus daemon and its
> > > command-line client. This is why the patch is pretty hefty. The majority
> > > of the line count comes from the removed patch that is now upstream but
> > > the v2.2 recipe also now contains a lot of bits and pieces that make the
> > > D-Bus daemon work both with system as well as sysvinit.
> > >
> > > The project now packages the systemd service and udev rules that allow
> > > the manager to run under its own user in a well sandboxed environment
> > > but the sysvsinit script is carried in the recipe as I don't want to
> > > put support for legacy systems in libgpiod repo.
> > >
> > > The patch also updates the ptests for libgpiod to run three new
> > > test-suites: one for GLib bindings, one for the command-line D-Bus
> > > client and finally one testing some daemon corner-cases not supported by
> > > the client.
> > >
> > > Build tested with various config options with systemd and sysvinit (the
> > > latter with glibc and musl) on 32- and 64-bit architectures.
> > >
> > > The complete changelog since v2.1 (taken verbatim from the NEWS file) is
> > > below:
> > >
> > > libgpiod v2.2
> > > =============
> > >
> > > New features:
> > > - add GObject bindings with introspection
> > > - add a D-Bus interface to libgpiod together with a daemon implementing 
> > > it and
> > >   a command-line client
> > > - split out the common shell test code for gpio-tools into a reusable test
> > >   harness for GPIO command-line tools
> > > - add minutes as a new supported time unit for tools and allow longer 
> > > periods
> > >   for timeouts, line holding, etc.
> > > - add a script for generating sdist and wheels for python bindings
> > > - migrate C++ tests to using Catch2 v3
> > >
> > > Improvements:
> > > - relicense C++ bindings under LGPL-2.1-or-later in order to make the 
> > > project
> > >   more attractive to users with GPL-3.0 restrictions
> > > - remove dependency on grep from tools' tests
> > > - make shell scripts pass shellcheck treewide
> > > - use ppoll() in tools to actually achieve the advertised microsecond
> > >   granularity of timeouts
> > > - documentation improvements
> > > - improve typing info in python bindings
> > > - improve __repr__() implementations in python bindings
> > > - make reconfiguring lines more flexible in python bindings by relaxing 
> > > the
> > >   requirement to carry the ordering of the config entries from the request
> > > - support casting of line.Value to bool in python bindings
> > > - various new test-cases for improved coverage treewide
> > > - align the test cases with the current kernel requirement for specifying
> > >   direction explicitly when reconfiguring lines
> > >
> > > Bug fixes:
> > > - fix C++ bindings build using slibtool
> > > - accept the new style automatic GPIO chip labels from gpio-sim in bash 
> > > tests
> > > - fix C++ tests with recent kernels which introduced stricter reconfigure
> > >   behavior
> > > - fix a use-after-free bug in python bindings
> > > - fix passing the event clock property to line requests in python bindings
> > > - fix a memory leak in tools
> > > - make sure the string buffers in line-info and chip-info are big enough 
> > > to not
> > >   truncate the strings they hold below the size accepted by the kernel
> > > - remove buggy and unnecessary flags sanitization from line-config
> > > - fix python bindings installation with Makefile build
> > > - sanitize the return values of GPIO ioctl()s which in some cases may be
> > >   erroneously positive
> > > - fix requesting lines by name with multiple entries in python bindings
> > >
> > > Signed-off-by: Bartosz Golaszewski <[email protected]>
> >
> > I admit I had to backport it to scarthgap to test (along with glib 2.80, 
> > etc),
> > but I didn't notice any problems and I'm able to start gpio-manager
> > (systemd service) and control it over gpiocli.
> >
> > Thanks a lot Bartosz!
> >
> > Reviewed-by: Alexander Sverdlin <[email protected]>
> > Tested-by: Alexander Sverdlin <[email protected]>
> >
> > > ---
> > > Changes in v3:
> > > - make dbus a runtime dependency for the 'dbus' and 'tests' PACKAGECONFIG
> > >   switches
> > > - make libgpiod-manager a runtime dependency for libgpiod-cli
> > >
> > > Changes in v2:
> > > - fix SRC_URI[sha256sum] value
> > >
> > >  ...cxx-Migrate-C-tests-to-use-Catch2-v3.patch | 530 ------------------
> > >  .../libgpiod/libgpiod-2.x/gpio-manager.init   |  76 +++
> > >  .../libgpiod/libgpiod-2.x/run-ptest           |  43 +-
> > >  .../libgpiod/libgpiod_2.1.3.bb                |  33 --
> > >  .../recipes-support/libgpiod/libgpiod_2.2.bb  |  99 ++++
> > >  5 files changed, 206 insertions(+), 575 deletions(-)
> > >  delete mode 100644 
> > > meta-oe/recipes-support/libgpiod/libgpiod-2.x/0001-bindings-cxx-Migrate-C-tests-to-use-Catch2-v3.patch
> > >  create mode 100644 
> > > meta-oe/recipes-support/libgpiod/libgpiod-2.x/gpio-manager.init
> > >  delete mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_2.1.3.bb
> > >  create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_2.2.bb
> >
> > --
> > Alexander Sverdlin
> > Siemens AG
> > www.siemens.com
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#113324): 
https://lists.openembedded.org/g/openembedded-devel/message/113324
Mute This Topic: https://lists.openembedded.org/mt/109190169/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to