Skip to content

install error related to gpiod #78

@psi-jmonaco

Description

@psi-jmonaco

Hello,

Trying to install daqhats on rpi5 with current (as of 08 October 2025) Raspberry pi OS.

Followed instructions in order and get an error trying to make via the script. Relevant section of errors excerpted.

Seems to be an issue related to the version of libgpiod-dev available versus expected by daqhats.

Ideas appreciated.

gcc -I../include -I/opt/vc/include -I/usr/include -fPIC -Wall -Wextra -g -O2 -DENABLE_LOCALES=Off -MMD -c gpio.c -o build/gpio.o
gpio.c: In function ‘gpio_init’:
gpio.c:40:25: error: implicit declaration of function ‘gpiod_chip_open_by_name’; did you mean ‘gpiod_chip_info_get_name’? [-Wimplicit-function-declaration]
40 | if (NULL == (chip = gpiod_chip_open_by_name("gpiochip4")))
| ^~~~~~~~~~~~~~~~~~~~~~~
| gpiod_chip_info_get_name
gpio.c:40:23: error: assignment to ‘struct gpiod_chip *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
40 | if (NULL == (chip = gpiod_chip_open_by_name("gpiochip4")))
| ^
gpio.c:43:27: error: assignment to ‘struct gpiod_chip ’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
43 | if (NULL == (chip = gpiod_chip_open_by_name("gpiochip0")))
| ^
gpio.c:78:5: error: implicit declaration of function ‘gpiod_line_bulk_init’ [-Wimplicit-function-declaration]
78 | gpiod_line_bulk_init(&lines);
| ^~~~~~~~~~~~~~~~~~~~
gpio.c:79:26: error: implicit declaration of function ‘gpiod_chip_num_lines’; did you mean ‘gpiod_chip_request_lines’? [-Wimplicit-function-declaration]
79 | unsigned int count = gpiod_chip_num_lines(chip);
| ^~~~~~~~~~~~~~~~~~~~
| gpiod_chip_request_lines
gpio.c:82:35: error: implicit declaration of function ‘gpiod_chip_get_line’; did you mean ‘gpiod_chip_get_info’? [-Wimplicit-function-declaration]
82 | struct gpiod_line
line = gpiod_chip_get_line(chip, i);
| ^~~~~~~~~~~~~~~~~~~
| gpiod_chip_get_info
gpio.c:82:35: error: initialization of ‘struct gpiod_line *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
gpio.c:90:9: error: implicit declaration of function ‘gpiod_line_bulk_add’ [-Wimplicit-function-declaration]
90 | gpiod_line_bulk_add(&lines, line);
| ^~~~~~~~~~~~~~~~~~~
gpio.c: In function ‘gpio_close’:
gpio.c:109:39: error: invalid use of undefined type ‘struct gpiod_line_bulk’
109 | for (unsigned int i = 0; i < lines.num_lines; i++)
| ^
gpio.c:111:9: error: implicit declaration of function ‘gpiod_line_release’; did you mean ‘gpio_release’? [-Wimplicit-function-declaration]
111 | gpiod_line_release(lines.lines[i]);
| ^~~~~~~~~~~~~~~~~~
| gpio_release
gpio.c:111:33: error: invalid use of undefined type ‘struct gpiod_line_bulk’
111 | gpiod_line_release(lines.lines[i]);
| ^
gpio.c: In function ‘gpio_set_output’:
gpio.c:129:21: error: invalid use of undefined type ‘struct gpiod_line_bulk’
129 | if (pin >= lines.num_lines)
| ^
gpio.c:136:15: error: implicit declaration of function ‘gpiod_line_request_output’; did you mean ‘gpiod_line_request_get_fd’? [-Wimplicit-function-declaration]
136 | if (-1 == gpiod_line_request_output(lines.lines[pin], app_name, value))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| gpiod_line_request_get_fd

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions