Source: openocd Version: 0.12.0-1 Severity: important Dear Maintainer,
I am planning to have a transition for libgpiod. https://release.debian.org/transitions/html/auto-libgpiod.html Many APIs were changed in this transition. I tested libgpiod with openocd 0.12.0. As a result, it seems FTBFS. Please have a check. Feel free to let me know if any information is needed. Thanks. ===== /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./src -I./src -DPKGDATADIR=\"/usr/share/openocd\" -DBINDIR=\"/usr/bin\" -isystem /usr/include/libusb-1.0 -I/usr/include/libftdi1 -I/usr/include/libusb-1.0 -I/usr/include/hidapi -I/usr/include/libusb-1.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Wpointer-arith -Wundef -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/openocd-0.12.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o src/jtag/drivers/libocdjtagdrivers_la-ft232r.lo `test -f 'src/jtag/drivers/ft232r.c' || echo './'`src/jtag/drivers/ft232r.c src/jtag/drivers/linuxgpiod.c: In function 'linuxgpiod_read': src/jtag/drivers/linuxgpiod.c:51:18: error: implicit declaration of function 'gpiod_line_get_value'; did you mean 'gpiod_line_request_get_value'? [-Werror=implicit-function-declaration] 51 | retval = gpiod_line_get_value(gpiod_line[ADAPTER_GPIO_IDX_TDO]); | ^~~~~~~~~~~~~~~~~~~~ | gpiod_line_request_get_value src/jtag/drivers/linuxgpiod.c: In function 'linuxgpiod_write': src/jtag/drivers/linuxgpiod.c:84:26: error: implicit declaration of function 'gpiod_line_set_value'; did you mean 'gpiod_line_request_set_value'? [-Werror=implicit-function-declaration] 84 | retval = gpiod_line_set_value(gpiod_line[ADAPTER_GPIO_IDX_TDI], tdi); | ^~~~~~~~~~~~~~~~~~~~ | gpiod_line_request_set_value src/jtag/drivers/linuxgpiod.c: In function 'linuxgpiod_swdio_drive': src/jtag/drivers/linuxgpiod.c:131:9: error: implicit declaration of function 'gpiod_line_release'; did you mean 'gpiod_line_request_release'? [-Werror=implicit-function-declaration] 131 | gpiod_line_release(gpiod_line[ADAPTER_GPIO_IDX_SWDIO]); | ^~~~~~~~~~~~~~~~~~ | gpiod_line_request_release libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -I./src -DPKGDATADIR=\"/usr/share/openocd\" -DBINDIR=\"/usr/bin\" -isystem /usr/include/libusb-1.0 -I/usr/include/libftdi1 -I/usr/include/libusb-1.0 -I/usr/include/hidapi -I/usr/include/libusb-1.0 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Wpointer-arith -Wundef -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/openocd-0.12.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c src/jtag/drivers/ft232r.c -o src/jtag/drivers/libocdjtagdrivers_la-ft232r.o src/jtag/drivers/linuxgpiod.c:139:26: error: implicit declaration of function 'gpiod_line_request_output'; did you mean 'gpiod_line_request_get_fd'? [-Werror=implicit-function-declaration] 139 | retval = gpiod_line_request_output(gpiod_line[ADAPTER_GPIO_IDX_SWDIO], "OpenOCD", 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | gpiod_line_request_get_fd src/jtag/drivers/linuxgpiod.c:143:26: error: implicit declaration of function 'gpiod_line_request_input'; did you mean 'gpiod_line_request_get_fd'? [-Werror=implicit-function-declaration] 143 | retval = gpiod_line_request_input(gpiod_line[ADAPTER_GPIO_IDX_SWDIO], "OpenOCD"); | ^~~~~~~~~~~~~~~~~~~~~~~~ | gpiod_line_request_get_fd src/jtag/drivers/linuxgpiod.c: In function 'helper_get_line': src/jtag/drivers/linuxgpiod.c:283:19: error: 'GPIOD_LINE_REQUEST_DIRECTION_INPUT' undeclared (first use in this function); did you mean 'GPIOD_LINE_DIRECTION_INPUT'? 283 | int dir = GPIOD_LINE_REQUEST_DIRECTION_INPUT, flags = 0, val = 0, retval; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | GPIOD_LINE_DIRECTION_INPUT src/jtag/drivers/linuxgpiod.c:283:19: note: each undeclared identifier is reported only once for each function it appears in src/jtag/drivers/linuxgpiod.c:285:27: error: implicit declaration of function 'gpiod_chip_open_by_number' [-Werror=implicit-function-declaration] 285 | gpiod_chip[idx] = gpiod_chip_open_by_number(adapter_gpio_config[idx].chip_num); | ^~~~~~~~~~~~~~~~~~~~~~~~~ src/jtag/drivers/linuxgpiod.c:285:25: warning: assignment to 'struct gpiod_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 285 | gpiod_chip[idx] = gpiod_chip_open_by_number(adapter_gpio_config[idx].chip_num); | ^ src/jtag/drivers/linuxgpiod.c:292:27: error: implicit declaration of function 'gpiod_chip_get_line'; did you mean 'gpiod_chip_get_info'? [-Werror=implicit-function-declaration] 292 | gpiod_line[idx] = gpiod_chip_get_line(gpiod_chip[idx], adapter_gpio_config[idx].gpio_num); | ^~~~~~~~~~~~~~~~~~~ | gpiod_chip_get_info src/jtag/drivers/linuxgpiod.c:292:25: warning: assignment to 'struct gpiod_line *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 292 | gpiod_line[idx] = gpiod_chip_get_line(gpiod_chip[idx], adapter_gpio_config[idx].gpio_num); | ^ src/jtag/drivers/linuxgpiod.c:303:23: error: 'GPIOD_LINE_REQUEST_DIRECTION_OUTPUT' undeclared (first use in this function); did you mean 'GPIOD_LINE_DIRECTION_OUTPUT'? 303 | dir = GPIOD_LINE_REQUEST_DIRECTION_OUTPUT; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | GPIOD_LINE_DIRECTION_OUTPUT src/jtag/drivers/linuxgpiod.c:316:26: error: 'GPIOD_LINE_REQUEST_FLAG_OPEN_DRAIN' undeclared (first use in this function); did you mean 'GPIOD_LINE_DRIVE_OPEN_DRAIN'? 316 | flags |= GPIOD_LINE_REQUEST_FLAG_OPEN_DRAIN; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | GPIOD_LINE_DRIVE_OPEN_DRAIN src/jtag/drivers/linuxgpiod.c:319:26: error: 'GPIOD_LINE_REQUEST_FLAG_OPEN_SOURCE' undeclared (first use in this function); did you mean 'GPIOD_LINE_DRIVE_OPEN_SOURCE'? 319 | flags |= GPIOD_LINE_REQUEST_FLAG_OPEN_SOURCE; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | GPIOD_LINE_DRIVE_OPEN_SOURCE In file included from ./src/jtag/jtag.h:15, from ./src/jtag/interface.h:17, from src/jtag/drivers/linuxgpiod.c:18: src/jtag/drivers/linuxgpiod.c:334:53: error: implicit declaration of function 'gpiod_version_string' [-Werror=implicit-function-declaration] 334 | adapter_gpio_get_name(idx), gpiod_version_string()); | ^~~~~~~~~~~~~~~~~~~~ ./src/helper/log.h:121:70: note: in definition of macro 'LOG_WARNING' 121 | log_printf_lf(LOG_LVL_WARNING, __FILE__, __LINE__, __func__, expr) | ^~~~ src/jtag/drivers/linuxgpiod.c:333:29: warning: format '%s' expects argument of type 'char *', but argument 7 has type 'int' [-Wformat=] 333 | LOG_WARNING("linuxgpiod: ignoring request for pull-up on %s: not supported by gpiod v%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 334 | adapter_gpio_get_name(idx), gpiod_version_string()); | ~~~~~~~~~~~~~~~~~~~~~~ | | | int ./src/helper/log.h:121:70: note: in definition of macro 'LOG_WARNING' 121 | log_printf_lf(LOG_LVL_WARNING, __FILE__, __LINE__, __func__, expr) | ^~~~ src/jtag/drivers/linuxgpiod.c:333:103: note: format string is defined here 333 | LOG_WARNING("linuxgpiod: ignoring request for pull-up on %s: not supported by gpiod v%s", | ~^ | | | char * | %d src/jtag/drivers/linuxgpiod.c:341:29: warning: format '%s' expects argument of type 'char *', but argument 7 has type 'int' [-Wformat=] 341 | LOG_WARNING("linuxgpiod: ignoring request for pull-down on %s: not supported by gpiod v%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 342 | adapter_gpio_get_name(idx), gpiod_version_string()); | ~~~~~~~~~~~~~~~~~~~~~~ | | | int ./src/helper/log.h:121:70: note: in definition of macro 'LOG_WARNING' 121 | log_printf_lf(LOG_LVL_WARNING, __FILE__, __LINE__, __func__, expr) | ^~~~ src/jtag/drivers/linuxgpiod.c:341:105: note: format string is defined here 341 | LOG_WARNING("linuxgpiod: ignoring request for pull-down on %s: not supported by gpiod v%s", | ~^ | | | char * | %d src/jtag/drivers/linuxgpiod.c:348:26: error: 'GPIOD_LINE_REQUEST_FLAG_ACTIVE_LOW' undeclared (first use in this function) 348 | flags |= GPIOD_LINE_REQUEST_FLAG_ACTIVE_LOW; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/jtag/drivers/linuxgpiod.c:350:16: error: variable 'config' has initializer but incomplete type 350 | struct gpiod_line_request_config config = { | ^~~~~~~~~~~~~~~~~~~~~~~~~ src/jtag/drivers/linuxgpiod.c:351:18: error: 'struct gpiod_line_request_config' has no member named 'consumer' 351 | .consumer = "OpenOCD", | ^~~~~~~~ src/jtag/drivers/linuxgpiod.c:351:29: warning: excess elements in struct initializer 351 | .consumer = "OpenOCD", | ^~~~~~~~~ src/jtag/drivers/linuxgpiod.c:351:29: note: (near initialization for 'config') src/jtag/drivers/linuxgpiod.c:352:18: error: 'struct gpiod_line_request_config' has no member named 'request_type' 352 | .request_type = dir, | ^~~~~~~~~~~~ src/jtag/drivers/linuxgpiod.c:352:33: warning: excess elements in struct initializer 352 | .request_type = dir, | ^~~ src/jtag/drivers/linuxgpiod.c:352:33: note: (near initialization for 'config') src/jtag/drivers/linuxgpiod.c:353:18: error: 'struct gpiod_line_request_config' has no member named 'flags' 353 | .flags = flags, | ^~~~~ src/jtag/drivers/linuxgpiod.c:353:26: warning: excess elements in struct initializer 353 | .flags = flags, | ^~~~~ src/jtag/drivers/linuxgpiod.c:353:26: note: (near initialization for 'config') src/jtag/drivers/linuxgpiod.c:350:42: error: storage size of 'config' isn't known 350 | struct gpiod_line_request_config config = { | ^~~~~~ src/jtag/drivers/linuxgpiod.c:356:18: error: implicit declaration of function 'gpiod_line_request'; did you mean 'gpiod_line_request_get_fd'? [-Werror=implicit-function-declaration] 356 | retval = gpiod_line_request(gpiod_line[idx], &config, val); | ^~~~~~~~~~~~~~~~~~ | gpiod_line_request_get_fd src/jtag/drivers/linuxgpiod.c:350:42: warning: unused variable 'config' [-Wunused-variable] 350 | struct gpiod_line_request_config config = { | ^~~~~~ cc1: some warnings being treated as errors make[4]: *** [Makefile:3707: src/jtag/drivers/libocdjtagdrivers_la-linuxgpiod.lo] Error 1 make[4]: *** Waiting for unfinished jobs.... make[4]: Leaving directory '/build/openocd-0.12.0' make[3]: *** [Makefile:5013: all-recursive] Error 1 make[3]: Leaving directory '/build/openocd-0.12.0' make[2]: *** [Makefile:2113: all] Error 2 make[2]: Leaving directory '/build/openocd-0.12.0' dh_auto_build: error: make -j2 all pdf html returned exit code 2 make[1]: *** [debian/rules:62: override_dh_auto_build] Error 25 make[1]: Leaving directory '/build/openocd-0.12.0' make: *** [debian/rules:68: binary] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 I: copying local configuration E: Failed autobuilding of package I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /var/cache/pbuilder/build/3420889 and its subdirectories =====