vsergeev/c-periphery

GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME missing for Debian 11 x86/x86_64

pezi opened this issue · 0 comments

pezi commented

Version 2.4.1 - no problem to build for Armbian/PI-OS.

Install the headers for the cmake tests
apt install linux-headers-$(uname -r)

Debian 11 runs into following problem.

oot@debian64:/home/pezi/c-periphery/build# cmake ..
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for GPIO_V2_LINES_MAX
-- Looking for GPIO_V2_LINES_MAX - found
-- Looking for GPIO_GET_LINEEVENT_IOCTL
-- Looking for GPIO_GET_LINEEVENT_IOCTL - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pezi/c-periphery/build
root@debian64:/home/pezi/c-periphery/build# make
Scanning dependencies of target periphery
[  3%] Building C object CMakeFiles/periphery.dir/src/gpio.c.o
[  7%] Building C object CMakeFiles/periphery.dir/src/gpio_cdev_v1.c.o
[ 10%] Building C object CMakeFiles/periphery.dir/src/gpio_cdev_v2.c.o
/home/pezi/c-periphery/src/gpio_cdev_v2.c: In function ‘_gpio_cdev_reopen’:
/home/pezi/c-periphery/src/gpio_cdev_v2.c:66:45: error: ‘GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME’ undeclared (first use in this function)
   66 |         flags |= (edge != GPIO_EDGE_NONE) ? c : 0;
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~