You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to install lgpio according to the docs, but unfortunately I am getting the following compile errors when I "make" the project. I also tried to use the commented CFLAGS in the Makefile, which did not help. I am building it on a raspi 4b running Ubuntu Server.
Here are the errors I am getting:
gcc -O3 -Wall -pthread -fpic -c -o lgCtx.o lgCtx.c
gcc -O3 -Wall -pthread -fpic -c -o lgDbg.o lgDbg.c
gcc -O3 -Wall -pthread -fpic -c -o lgErr.o lgErr.c
gcc -O3 -Wall -pthread -fpic -c -o lgGpio.o lgGpio.c
lgGpio.c:157:29: warning: ‘struct gpio_v2_line_request’ declared inside parameter list will not be visible outside of this definition or declaration
157 | lgChipObj_p chip, struct gpio_v2_line_request *req)
| ^~~~~~~~~~~~~~~~~~~~
In file included from lgGpio.c:44:
lgGpio.c: In function ‘xGpioHandleRequest’:
lgGpio.c:167:10: error: dereferencing pointer to incomplete type ‘struct gpio_v2_line_request’
167 | req->num_lines, req->config.flags, lgDbgInt2Str(req->num_lines,
| ^~
lgDbg.h:60:49: note: in definition of macro ‘LG_DBG’
60 | lgDbgTimeStamp(), FUNCTION , ## arg);
| ^~~
lgGpio.c:170:29: error: ‘GPIO_V2_GET_LINE_IOCTL’ undeclared (first use in this function); did you mean ‘GPIO_GET_LINEINFO_IOCTL’?
170 | status = ioctl(chip->fd, GPIO_V2_GET_LINE_IOCTL, req);
| ^~~~~~~~~~~~~~~~~~~~~~
| GPIO_GET_LINEINFO_IOCTL
lgGpio.c:170:29: note: each undeclared identifier is reported only once for each function it appears in
lgGpio.c:191:31: error: ‘GPIO_V2_LINE_FLAG_INPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
191 | if (req->config.flags & GPIO_V2_LINE_FLAG_INPUT)
| ^~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:194:31: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
194 | if (req->config.flags & GPIO_V2_LINE_FLAG_OUTPUT)
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c: In function ‘xMakeFlags’:
lgGpio.c:232:37: error: ‘GPIO_V2_LINE_FLAG_EDGE_RISING’ undeclared (first use in this function)
232 | if (s & LG_RISING_EDGE) f |= GPIO_V2_LINE_FLAG_EDGE_RISING;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:233:37: error: ‘GPIO_V2_LINE_FLAG_EDGE_FALLING’ undeclared (first use in this function)
233 | if (s & LG_FALLING_EDGE) f |= GPIO_V2_LINE_FLAG_EDGE_FALLING;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:234:37: error: ‘GPIO_V2_LINE_FLAG_ACTIVE_LOW’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_ACTIVE_LOW’?
234 | if (s & LG_SET_ACTIVE_LOW) f |= GPIO_V2_LINE_FLAG_ACTIVE_LOW;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_ACTIVE_LOW
lgGpio.c:235:37: error: ‘GPIO_V2_LINE_FLAG_OPEN_DRAIN’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_OPEN_DRAIN’?
235 | if (s & LG_SET_OPEN_DRAIN) f |= GPIO_V2_LINE_FLAG_OPEN_DRAIN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_OPEN_DRAIN
lgGpio.c:236:37: error: ‘GPIO_V2_LINE_FLAG_OPEN_SOURCE’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_OPEN_SOURCE’?
236 | if (s & LG_SET_OPEN_SOURCE) f |= GPIO_V2_LINE_FLAG_OPEN_SOURCE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_OPEN_SOURCE
lgGpio.c:237:37: error: ‘GPIO_V2_LINE_FLAG_BIAS_PULL_UP’ undeclared (first use in this function)
237 | if (s & LG_SET_PULL_UP) f |= GPIO_V2_LINE_FLAG_BIAS_PULL_UP;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:238:37: error: ‘GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN’ undeclared (first use in this function)
238 | if (s & LG_SET_PULL_DOWN) f |= GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:239:37: error: ‘GPIO_V2_LINE_FLAG_BIAS_DISABLED’ undeclared (first use in this function)
239 | if (s & LG_SET_PULL_NONE) f |= GPIO_V2_LINE_FLAG_BIAS_DISABLED;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:240:37: error: ‘GPIO_V2_LINE_FLAG_INPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
240 | if (s & LG_SET_INPUT) f |= GPIO_V2_LINE_FLAG_INPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:241:37: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
241 | if (s & LG_SET_OUTPUT) f |= GPIO_V2_LINE_FLAG_OUTPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c: In function ‘xMakeStatus’:
lgGpio.c:256:12: error: ‘GPIO_V2_LINE_FLAG_USED’ undeclared (first use in this function)
256 | if (f & GPIO_V2_LINE_FLAG_USED) s |= LG_GPIO_IS_KERNEL;
| ^~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:257:12: error: ‘GPIO_V2_LINE_FLAG_ACTIVE_LOW’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_ACTIVE_LOW’?
257 | if (f & GPIO_V2_LINE_FLAG_ACTIVE_LOW) s |= LG_GPIO_IS_ACTIVE_LOW;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_ACTIVE_LOW
lgGpio.c:258:12: error: ‘GPIO_V2_LINE_FLAG_INPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
258 | if (f & GPIO_V2_LINE_FLAG_INPUT) s |= LG_GPIO_IS_INPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:259:12: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
259 | if (f & GPIO_V2_LINE_FLAG_OUTPUT) s |= LG_GPIO_IS_OUTPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:260:12: error: ‘GPIO_V2_LINE_FLAG_EDGE_RISING’ undeclared (first use in this function)
260 | if (f & GPIO_V2_LINE_FLAG_EDGE_RISING) s |= LG_GPIO_IS_RISING_EDGE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:261:12: error: ‘GPIO_V2_LINE_FLAG_EDGE_FALLING’ undeclared (first use in this function)
261 | if (f & GPIO_V2_LINE_FLAG_EDGE_FALLING) s |= LG_GPIO_IS_FALLING_EDGE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:262:12: error: ‘GPIO_V2_LINE_FLAG_OPEN_DRAIN’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_OPEN_DRAIN’?
262 | if (f & GPIO_V2_LINE_FLAG_OPEN_DRAIN) s |= LG_GPIO_IS_OPEN_DRAIN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_OPEN_DRAIN
lgGpio.c:263:12: error: ‘GPIO_V2_LINE_FLAG_OPEN_SOURCE’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_OPEN_SOURCE’?
263 | if (f & GPIO_V2_LINE_FLAG_OPEN_SOURCE) s |= LG_GPIO_IS_OPEN_SOURCE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_OPEN_SOURCE
lgGpio.c:264:12: error: ‘GPIO_V2_LINE_FLAG_BIAS_PULL_UP’ undeclared (first use in this function)
264 | if (f & GPIO_V2_LINE_FLAG_BIAS_PULL_UP) s |= LG_GPIO_IS_PULL_UP;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:265:12: error: ‘GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN’ undeclared (first use in this function)
265 | if (f & GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN) s |= LG_GPIO_IS_PULL_DOWN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:266:12: error: ‘GPIO_V2_LINE_FLAG_BIAS_DISABLED’ undeclared (first use in this function)
266 | if (f & GPIO_V2_LINE_FLAG_BIAS_DISABLED) s |= LG_GPIO_IS_PULL_NONE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c: In function ‘xClaim’:
lgGpio.c:287:32: error: storage size of ‘req’ isn’t known
287 | struct gpio_v2_line_request req;
| ^~~
lgGpio.c:295:25: error: ‘GPIO_V2_LINES_MAX’ undeclared (first use in this function); did you mean ‘GPIOHANDLES_MAX’?
295 | if (size && (size <= GPIO_V2_LINES_MAX))
| ^~~~~~~~~~~~~~~~~
| GPIOHANDLES_MAX
lgGpio.c:308:33: error: ‘GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES’ undeclared (first use in this function)
308 | req.config.attrs[0].attr.id = GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:287:32: warning: unused variable ‘req’ [-Wunused-variable]
287 | struct gpio_v2_line_request req;
| ^~~
lgGpio.c: In function ‘xSetAsPwm’:
lgGpio.c:527:16: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
527 | chip, GPIO_V2_LINE_FLAG_OUTPUT, 1, &gpio, &zero);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c: In function ‘xWave’:
lgGpio.c:619:19: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
619 | chip, GPIO_V2_LINE_FLAG_OUTPUT, 1, &gpio, &zero);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c: In function ‘xWrite’:
lgGpio.c:667:31: error: storage size of ‘lv’ isn’t known
667 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:680:20: error: ‘GPIO_V2_LINE_SET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_SET_LINE_VALUES_IOCTL’?
680 | ioctl(GPIO->fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_SET_LINE_VALUES_IOCTL
lgGpio.c:667:31: warning: unused variable ‘lv’ [-Wunused-variable]
667 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘xGroupWrite’:
lgGpio.c:688:31: error: storage size of ‘lv’ isn’t known
688 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:703:20: error: ‘GPIO_V2_LINE_SET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_SET_LINE_VALUES_IOCTL’?
703 | ioctl(GPIO->fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_SET_LINE_VALUES_IOCTL
lgGpio.c:688:31: warning: unused variable ‘lv’ [-Wunused-variable]
688 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘lgGpioGetLineInfo’:
lgGpio.c:859:29: error: storage size of ‘linfo’ isn’t known
859 | struct gpio_v2_line_info linfo;
| ^~~~~
lgGpio.c:875:35: error: ‘GPIO_V2_GET_LINEINFO_IOCTL’ undeclared (first use in this function); did you mean ‘GPIO_GET_LINEINFO_IOCTL’?
875 | status = ioctl(chip->fd, GPIO_V2_GET_LINEINFO_IOCTL, &linfo);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIO_GET_LINEINFO_IOCTL
lgGpio.c:859:29: warning: unused variable ‘linfo’ [-Wunused-variable]
859 | struct gpio_v2_line_info linfo;
| ^~~~~
lgGpio.c: In function ‘lgGpioGetMode’:
lgGpio.c:898:29: error: storage size of ‘linfo’ isn’t known
898 | struct gpio_v2_line_info linfo;
| ^~~~~
lgGpio.c:913:35: error: ‘GPIO_V2_GET_LINEINFO_IOCTL’ undeclared (first use in this function); did you mean ‘GPIO_GET_LINEINFO_IOCTL’?
913 | status = ioctl(chip->fd, GPIO_V2_GET_LINEINFO_IOCTL, &linfo);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIO_GET_LINEINFO_IOCTL
lgGpio.c:898:29: warning: unused variable ‘linfo’ [-Wunused-variable]
898 | struct gpio_v2_line_info linfo;
| ^~~~~
lgGpio.c: In function ‘lgGpioClaimAlert’:
lgGpio.c:1086:32: error: storage size of ‘req’ isn’t known
1086 | struct gpio_v2_line_request req;
| ^~~
lgGpio.c:1108:49: error: ‘GPIO_V2_LINE_FLAG_INPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
1108 | flags = xMakeFlags(lFlags|eFlags) | GPIO_V2_LINE_FLAG_INPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:1117:38: error: ‘GPIO_V2_GET_LINE_IOCTL’ undeclared (first use in this function); did you mean ‘GPIO_GET_LINEINFO_IOCTL’?
1117 | status = ioctl(chip->fd, GPIO_V2_GET_LINE_IOCTL, &req);
| ^~~~~~~~~~~~~~~~~~~~~~
| GPIO_GET_LINEINFO_IOCTL
lgGpio.c:1086:32: warning: unused variable ‘req’ [-Wunused-variable]
1086 | struct gpio_v2_line_request req;
| ^~~
lgGpio.c: In function ‘lgGpioRead’:
lgGpio.c:1361:31: error: storage size of ‘lv’ isn’t known
1361 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:1385:38: error: ‘GPIO_V2_LINE_GET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_GET_LINE_VALUES_IOCTL’?
1385 | status = ioctl(GPIO->fd, GPIO_V2_LINE_GET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_GET_LINE_VALUES_IOCTL
lgGpio.c:1361:31: warning: unused variable ‘lv’ [-Wunused-variable]
1361 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘lgGpioWrite’:
lgGpio.c:1407:31: error: storage size of ‘lv’ isn’t known
1407 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:1429:26: error: ‘GPIO_V2_LINE_SET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_SET_LINE_VALUES_IOCTL’?
1429 | GPIO->fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_SET_LINE_VALUES_IOCTL
lgGpio.c:1407:31: warning: unused variable ‘lv’ [-Wunused-variable]
1407 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘lgGroupRead’:
lgGpio.c:1463:31: error: storage size of ‘lv’ isn’t known
1463 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:1481:41: error: ‘GPIO_V2_LINE_GET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_GET_LINE_VALUES_IOCTL’?
1481 | status = ioctl(GPIO->fd, GPIO_V2_LINE_GET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_GET_LINE_VALUES_IOCTL
lgGpio.c:1463:31: warning: unused variable ‘lv’ [-Wunused-variable]
1463 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘lgGroupWrite’:
lgGpio.c:1510:31: error: storage size of ‘lv’ isn’t known
1510 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:1538:41: error: ‘GPIO_V2_LINE_SET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_SET_LINE_VALUES_IOCTL’?
1538 | status = ioctl(GPIO->fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_SET_LINE_VALUES_IOCTL
lgGpio.c:1510:31: warning: unused variable ‘lv’ [-Wunused-variable]
1510 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘xClaim’:
lgGpio.c:329:1: warning: control reaches end of non-void function [-Wreturn-type]
329 | }
| ^
make: *** [: lgGpio.o] Error 1
If you need further info please let me know. Thanks guys!
The text was updated successfully, but these errors were encountered:
Hi guys,
I am trying to install lgpio according to the docs, but unfortunately I am getting the following compile errors when I "make" the project. I also tried to use the commented CFLAGS in the Makefile, which did not help. I am building it on a raspi 4b running Ubuntu Server.
Here are the errors I am getting:
gcc -O3 -Wall -pthread -fpic -c -o lgCtx.o lgCtx.c
gcc -O3 -Wall -pthread -fpic -c -o lgDbg.o lgDbg.c
gcc -O3 -Wall -pthread -fpic -c -o lgErr.o lgErr.c
gcc -O3 -Wall -pthread -fpic -c -o lgGpio.o lgGpio.c
lgGpio.c:157:29: warning: ‘struct gpio_v2_line_request’ declared inside parameter list will not be visible outside of this definition or declaration
157 | lgChipObj_p chip, struct gpio_v2_line_request *req)
| ^~~~~~~~~~~~~~~~~~~~
In file included from lgGpio.c:44:
lgGpio.c: In function ‘xGpioHandleRequest’:
lgGpio.c:167:10: error: dereferencing pointer to incomplete type ‘struct gpio_v2_line_request’
167 | req->num_lines, req->config.flags, lgDbgInt2Str(req->num_lines,
| ^~
lgDbg.h:60:49: note: in definition of macro ‘LG_DBG’
60 | lgDbgTimeStamp(), FUNCTION , ## arg);
| ^~~
lgGpio.c:170:29: error: ‘GPIO_V2_GET_LINE_IOCTL’ undeclared (first use in this function); did you mean ‘GPIO_GET_LINEINFO_IOCTL’?
170 | status = ioctl(chip->fd, GPIO_V2_GET_LINE_IOCTL, req);
| ^~~~~~~~~~~~~~~~~~~~~~
| GPIO_GET_LINEINFO_IOCTL
lgGpio.c:170:29: note: each undeclared identifier is reported only once for each function it appears in
lgGpio.c:191:31: error: ‘GPIO_V2_LINE_FLAG_INPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
191 | if (req->config.flags & GPIO_V2_LINE_FLAG_INPUT)
| ^~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:194:31: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
194 | if (req->config.flags & GPIO_V2_LINE_FLAG_OUTPUT)
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c: In function ‘xMakeFlags’:
lgGpio.c:232:37: error: ‘GPIO_V2_LINE_FLAG_EDGE_RISING’ undeclared (first use in this function)
232 | if (s & LG_RISING_EDGE) f |= GPIO_V2_LINE_FLAG_EDGE_RISING;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:233:37: error: ‘GPIO_V2_LINE_FLAG_EDGE_FALLING’ undeclared (first use in this function)
233 | if (s & LG_FALLING_EDGE) f |= GPIO_V2_LINE_FLAG_EDGE_FALLING;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:234:37: error: ‘GPIO_V2_LINE_FLAG_ACTIVE_LOW’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_ACTIVE_LOW’?
234 | if (s & LG_SET_ACTIVE_LOW) f |= GPIO_V2_LINE_FLAG_ACTIVE_LOW;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_ACTIVE_LOW
lgGpio.c:235:37: error: ‘GPIO_V2_LINE_FLAG_OPEN_DRAIN’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_OPEN_DRAIN’?
235 | if (s & LG_SET_OPEN_DRAIN) f |= GPIO_V2_LINE_FLAG_OPEN_DRAIN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_OPEN_DRAIN
lgGpio.c:236:37: error: ‘GPIO_V2_LINE_FLAG_OPEN_SOURCE’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_OPEN_SOURCE’?
236 | if (s & LG_SET_OPEN_SOURCE) f |= GPIO_V2_LINE_FLAG_OPEN_SOURCE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_OPEN_SOURCE
lgGpio.c:237:37: error: ‘GPIO_V2_LINE_FLAG_BIAS_PULL_UP’ undeclared (first use in this function)
237 | if (s & LG_SET_PULL_UP) f |= GPIO_V2_LINE_FLAG_BIAS_PULL_UP;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:238:37: error: ‘GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN’ undeclared (first use in this function)
238 | if (s & LG_SET_PULL_DOWN) f |= GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:239:37: error: ‘GPIO_V2_LINE_FLAG_BIAS_DISABLED’ undeclared (first use in this function)
239 | if (s & LG_SET_PULL_NONE) f |= GPIO_V2_LINE_FLAG_BIAS_DISABLED;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:240:37: error: ‘GPIO_V2_LINE_FLAG_INPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
240 | if (s & LG_SET_INPUT) f |= GPIO_V2_LINE_FLAG_INPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:241:37: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
241 | if (s & LG_SET_OUTPUT) f |= GPIO_V2_LINE_FLAG_OUTPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c: In function ‘xMakeStatus’:
lgGpio.c:256:12: error: ‘GPIO_V2_LINE_FLAG_USED’ undeclared (first use in this function)
256 | if (f & GPIO_V2_LINE_FLAG_USED) s |= LG_GPIO_IS_KERNEL;
| ^~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:257:12: error: ‘GPIO_V2_LINE_FLAG_ACTIVE_LOW’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_ACTIVE_LOW’?
257 | if (f & GPIO_V2_LINE_FLAG_ACTIVE_LOW) s |= LG_GPIO_IS_ACTIVE_LOW;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_ACTIVE_LOW
lgGpio.c:258:12: error: ‘GPIO_V2_LINE_FLAG_INPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
258 | if (f & GPIO_V2_LINE_FLAG_INPUT) s |= LG_GPIO_IS_INPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:259:12: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
259 | if (f & GPIO_V2_LINE_FLAG_OUTPUT) s |= LG_GPIO_IS_OUTPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:260:12: error: ‘GPIO_V2_LINE_FLAG_EDGE_RISING’ undeclared (first use in this function)
260 | if (f & GPIO_V2_LINE_FLAG_EDGE_RISING) s |= LG_GPIO_IS_RISING_EDGE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:261:12: error: ‘GPIO_V2_LINE_FLAG_EDGE_FALLING’ undeclared (first use in this function)
261 | if (f & GPIO_V2_LINE_FLAG_EDGE_FALLING) s |= LG_GPIO_IS_FALLING_EDGE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:262:12: error: ‘GPIO_V2_LINE_FLAG_OPEN_DRAIN’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_OPEN_DRAIN’?
262 | if (f & GPIO_V2_LINE_FLAG_OPEN_DRAIN) s |= LG_GPIO_IS_OPEN_DRAIN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_OPEN_DRAIN
lgGpio.c:263:12: error: ‘GPIO_V2_LINE_FLAG_OPEN_SOURCE’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_OPEN_SOURCE’?
263 | if (f & GPIO_V2_LINE_FLAG_OPEN_SOURCE) s |= LG_GPIO_IS_OPEN_SOURCE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_OPEN_SOURCE
lgGpio.c:264:12: error: ‘GPIO_V2_LINE_FLAG_BIAS_PULL_UP’ undeclared (first use in this function)
264 | if (f & GPIO_V2_LINE_FLAG_BIAS_PULL_UP) s |= LG_GPIO_IS_PULL_UP;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:265:12: error: ‘GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN’ undeclared (first use in this function)
265 | if (f & GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN) s |= LG_GPIO_IS_PULL_DOWN;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:266:12: error: ‘GPIO_V2_LINE_FLAG_BIAS_DISABLED’ undeclared (first use in this function)
266 | if (f & GPIO_V2_LINE_FLAG_BIAS_DISABLED) s |= LG_GPIO_IS_PULL_NONE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c: In function ‘xClaim’:
lgGpio.c:287:32: error: storage size of ‘req’ isn’t known
287 | struct gpio_v2_line_request req;
| ^~~
lgGpio.c:295:25: error: ‘GPIO_V2_LINES_MAX’ undeclared (first use in this function); did you mean ‘GPIOHANDLES_MAX’?
295 | if (size && (size <= GPIO_V2_LINES_MAX))
| ^~~~~~~~~~~~~~~~~
| GPIOHANDLES_MAX
lgGpio.c:308:33: error: ‘GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES’ undeclared (first use in this function)
308 | req.config.attrs[0].attr.id = GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lgGpio.c:287:32: warning: unused variable ‘req’ [-Wunused-variable]
287 | struct gpio_v2_line_request req;
| ^~~
lgGpio.c: In function ‘xSetAsPwm’:
lgGpio.c:527:16: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
527 | chip, GPIO_V2_LINE_FLAG_OUTPUT, 1, &gpio, &zero);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c: In function ‘xWave’:
lgGpio.c:619:19: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
619 | chip, GPIO_V2_LINE_FLAG_OUTPUT, 1, &gpio, &zero);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c: In function ‘xWrite’:
lgGpio.c:667:31: error: storage size of ‘lv’ isn’t known
667 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:680:20: error: ‘GPIO_V2_LINE_SET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_SET_LINE_VALUES_IOCTL’?
680 | ioctl(GPIO->fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_SET_LINE_VALUES_IOCTL
lgGpio.c:667:31: warning: unused variable ‘lv’ [-Wunused-variable]
667 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘xGroupWrite’:
lgGpio.c:688:31: error: storage size of ‘lv’ isn’t known
688 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:703:20: error: ‘GPIO_V2_LINE_SET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_SET_LINE_VALUES_IOCTL’?
703 | ioctl(GPIO->fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_SET_LINE_VALUES_IOCTL
lgGpio.c:688:31: warning: unused variable ‘lv’ [-Wunused-variable]
688 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘lgGpioGetLineInfo’:
lgGpio.c:859:29: error: storage size of ‘linfo’ isn’t known
859 | struct gpio_v2_line_info linfo;
| ^~~~~
lgGpio.c:875:35: error: ‘GPIO_V2_GET_LINEINFO_IOCTL’ undeclared (first use in this function); did you mean ‘GPIO_GET_LINEINFO_IOCTL’?
875 | status = ioctl(chip->fd, GPIO_V2_GET_LINEINFO_IOCTL, &linfo);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIO_GET_LINEINFO_IOCTL
lgGpio.c:859:29: warning: unused variable ‘linfo’ [-Wunused-variable]
859 | struct gpio_v2_line_info linfo;
| ^~~~~
lgGpio.c: In function ‘lgGpioGetMode’:
lgGpio.c:898:29: error: storage size of ‘linfo’ isn’t known
898 | struct gpio_v2_line_info linfo;
| ^~~~~
lgGpio.c:913:35: error: ‘GPIO_V2_GET_LINEINFO_IOCTL’ undeclared (first use in this function); did you mean ‘GPIO_GET_LINEINFO_IOCTL’?
913 | status = ioctl(chip->fd, GPIO_V2_GET_LINEINFO_IOCTL, &linfo);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIO_GET_LINEINFO_IOCTL
lgGpio.c:898:29: warning: unused variable ‘linfo’ [-Wunused-variable]
898 | struct gpio_v2_line_info linfo;
| ^~~~~
lgGpio.c: In function ‘lgGpioClaimAlert’:
lgGpio.c:1086:32: error: storage size of ‘req’ isn’t known
1086 | struct gpio_v2_line_request req;
| ^~~
lgGpio.c:1108:49: error: ‘GPIO_V2_LINE_FLAG_INPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
1108 | flags = xMakeFlags(lFlags|eFlags) | GPIO_V2_LINE_FLAG_INPUT;
| ^~~~~~~~~~~~~~~~~~~~~~~
| GPIOLINE_FLAG_IS_OUT
lgGpio.c:1117:38: error: ‘GPIO_V2_GET_LINE_IOCTL’ undeclared (first use in this function); did you mean ‘GPIO_GET_LINEINFO_IOCTL’?
1117 | status = ioctl(chip->fd, GPIO_V2_GET_LINE_IOCTL, &req);
| ^~~~~~~~~~~~~~~~~~~~~~
| GPIO_GET_LINEINFO_IOCTL
lgGpio.c:1086:32: warning: unused variable ‘req’ [-Wunused-variable]
1086 | struct gpio_v2_line_request req;
| ^~~
lgGpio.c: In function ‘lgGpioRead’:
lgGpio.c:1361:31: error: storage size of ‘lv’ isn’t known
1361 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:1385:38: error: ‘GPIO_V2_LINE_GET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_GET_LINE_VALUES_IOCTL’?
1385 | status = ioctl(GPIO->fd, GPIO_V2_LINE_GET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_GET_LINE_VALUES_IOCTL
lgGpio.c:1361:31: warning: unused variable ‘lv’ [-Wunused-variable]
1361 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘lgGpioWrite’:
lgGpio.c:1407:31: error: storage size of ‘lv’ isn’t known
1407 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:1429:26: error: ‘GPIO_V2_LINE_SET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_SET_LINE_VALUES_IOCTL’?
1429 | GPIO->fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_SET_LINE_VALUES_IOCTL
lgGpio.c:1407:31: warning: unused variable ‘lv’ [-Wunused-variable]
1407 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘lgGroupRead’:
lgGpio.c:1463:31: error: storage size of ‘lv’ isn’t known
1463 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:1481:41: error: ‘GPIO_V2_LINE_GET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_GET_LINE_VALUES_IOCTL’?
1481 | status = ioctl(GPIO->fd, GPIO_V2_LINE_GET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_GET_LINE_VALUES_IOCTL
lgGpio.c:1463:31: warning: unused variable ‘lv’ [-Wunused-variable]
1463 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘lgGroupWrite’:
lgGpio.c:1510:31: error: storage size of ‘lv’ isn’t known
1510 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c:1538:41: error: ‘GPIO_V2_LINE_SET_VALUES_IOCTL’ undeclared (first use in this function); did you mean ‘GPIOHANDLE_SET_LINE_VALUES_IOCTL’?
1538 | status = ioctl(GPIO->fd, GPIO_V2_LINE_SET_VALUES_IOCTL, &lv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| GPIOHANDLE_SET_LINE_VALUES_IOCTL
lgGpio.c:1510:31: warning: unused variable ‘lv’ [-Wunused-variable]
1510 | struct gpio_v2_line_values lv;
| ^~
lgGpio.c: In function ‘xClaim’:
lgGpio.c:329:1: warning: control reaches end of non-void function [-Wreturn-type]
329 | }
| ^
make: *** [: lgGpio.o] Error 1
If you need further info please let me know. Thanks guys!
The text was updated successfully, but these errors were encountered: