Compilation errors on Pop!_OS 22.04 LTS
Hi, I was trying to compile the library but there are errors during compilation. I'm running Pop!_OS 22.04 LTS (based on Ubuntu 22.04 LTS) with X11. Unfortunately, I don't know what causes the issue.
Here's the output of meson build
:
The Meson build system
Version: 0.61.2
Source dir: /home/mat/tmp/libinput-config
Build dir: /home/mat/tmp/libinput-config/build
Build type: native build
Project name: libinput-config
Project version: undefined
C compiler for the host machine: cc (gcc 11.3.0 "cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0")
C linker for the host machine: cc ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency libinput found: YES 1.20.0
Run-time dependency libudev found: YES 249
Library dl found: YES
Build targets in project: 2
Here's the output of ninja
:
[1/8] Compiling C object libinput-config.so.p/src_keymap.c.o
FAILED: libinput-config.so.p/src_keymap.c.o
cc -Ilibinput-config.so.p -I. -I.. -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -MD -MQ libinput-config.so.p/src_keymap.c.o -MF libinput-config.so.p/src_keymap.c.o.d -o libinput-config.so.p/src_keymap.c.o -c ../src/keymap.c
In file included from ../src/keymap.c:3:
../src/config.h:57:40: error: field ‘dwtp’ has incomplete type
57 | config_option(elc(dwtp_state), dwtp, dwtp_set_enabled);
| ^~~~
../src/config.h:31:14: note: in definition of macro ‘config_option’
31 | type name;\
| ^~~~
[2/8] Compiling C object libinput-config.so.p/src_hooks_gestures.c.o
FAILED: libinput-config.so.p/src_hooks_gestures.c.o
cc -Ilibinput-config.so.p -I. -I.. -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -MD -MQ libinput-config.so.p/src_hooks_gestures.c.o -MF libinput-config.so.p/src_hooks_gestures.c.o.d -o libinput-config.so.p/src_hooks_gestures.c.o -c ../src/hooks/gestures.c
In file included from ../src/hooks/gestures.c:5:
../src/config.h:57:40: error: field ‘dwtp’ has incomplete type
57 | config_option(elc(dwtp_state), dwtp, dwtp_set_enabled);
| ^~~~
../src/config.h:31:14: note: in definition of macro ‘config_option’
31 | type name;\
| ^~~~
[3/8] Compiling C object libinput-config.so.p/src_hooks_init.c.o
FAILED: libinput-config.so.p/src_hooks_init.c.o
cc -Ilibinput-config.so.p -I. -I.. -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -MD -MQ libinput-config.so.p/src_hooks_init.c.o -MF libinput-config.so.p/src_hooks_init.c.o.d -o libinput-config.so.p/src_hooks_init.c.o -c ../src/hooks/init.c
In file included from ../src/hooks/init.c:5:
../src/config.h:57:40: error: field ‘dwtp’ has incomplete type
57 | config_option(elc(dwtp_state), dwtp, dwtp_set_enabled);
| ^~~~
../src/config.h:31:14: note: in definition of macro ‘config_option’
31 | type name;\
| ^~~~
[4/8] Compiling C object libinput-config.so.p/src_hooks_keyboard.c.o
FAILED: libinput-config.so.p/src_hooks_keyboard.c.o
cc -Ilibinput-config.so.p -I. -I.. -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -MD -MQ libinput-config.so.p/src_hooks_keyboard.c.o -MF libinput-config.so.p/src_hooks_keyboard.c.o.d -o libinput-config.so.p/src_hooks_keyboard.c.o -c ../src/hooks/keyboard.c
In file included from ../src/hooks/keyboard.c:5:
../src/config.h:57:40: error: field ‘dwtp’ has incomplete type
57 | config_option(elc(dwtp_state), dwtp, dwtp_set_enabled);
| ^~~~
../src/config.h:31:14: note: in definition of macro ‘config_option’
31 | type name;\
| ^~~~
[5/8] Compiling C object libinput-config.so.p/src_hooks_pointer.c.o
FAILED: libinput-config.so.p/src_hooks_pointer.c.o
cc -Ilibinput-config.so.p -I. -I.. -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -MD -MQ libinput-config.so.p/src_hooks_pointer.c.o -MF libinput-config.so.p/src_hooks_pointer.c.o.d -o libinput-config.so.p/src_hooks_pointer.c.o -c ../src/hooks/pointer.c
In file included from ../src/hooks/pointer.c:5:
../src/config.h:57:40: error: field ‘dwtp’ has incomplete type
57 | config_option(elc(dwtp_state), dwtp, dwtp_set_enabled);
| ^~~~
../src/config.h:31:14: note: in definition of macro ‘config_option’
31 | type name;\
| ^~~~
[6/8] Compiling C object libinput-config.so.p/src_override.c.o
FAILED: libinput-config.so.p/src_override.c.o
cc -Ilibinput-config.so.p -I. -I.. -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -MD -MQ libinput-config.so.p/src_override.c.o -MF libinput-config.so.p/src_override.c.o.d -o libinput-config.so.p/src_override.c.o -c ../src/override.c
In file included from ../src/override.c:5:
../src/config.h:57:40: error: field ‘dwtp’ has incomplete type
57 | config_option(elc(dwtp_state), dwtp, dwtp_set_enabled);
| ^~~~
../src/config.h:31:14: note: in definition of macro ‘config_option’
31 | type name;\
| ^~~~
../src/override.c:19:22: error: parameter 2 (‘b’) has incomplete type
19 | type b\
../src/override.c:19:22: note: in definition of macro ‘replace_function’
19 | type b\
| ^~
20 | ){\
|
../src/override.c: In function ‘libinput_device_config_dwtp_set_enabled’:
../src/override.c:27:56: error: type of formal parameter 2 is incomplete
27 | return libinput_config.name(a, b);\
| ^
../src/override.c:105:1: note: in expansion of macro ‘replace_function’
105 | replace_function(dwtp_set_enabled, dwtp, elc(dwtp_state));
| ^~~~~~~~~~~~~~~~
../src/override.c: In function ‘libinput_config_device’:
../src/override.c:35:25: error: type of formal parameter 2 is incomplete
35 | libinput_config.name\
| ^
../src/override.c:124:9: note: in expansion of macro ‘apply_config’
124 | apply_config(dwtp, dwtp_set_enabled);
| ^~~~~~~~~~~~
../src/override.c: In function ‘libinput_device_config_dwtp_set_enabled’:
../src/override.c:29:9: warning: control reaches end of non-void function [-Wreturn-type]
29 | }
| ^
../src/override.c:105:1: note: in expansion of macro ‘replace_function’
105 | replace_function(dwtp_set_enabled, dwtp, elc(dwtp_state));
| ^~~~~~~~~~~~~~~~
[7/8] Compiling C object libinput-config.so.p/src_main.c.o
FAILED: libinput-config.so.p/src_main.c.o
cc -Ilibinput-config.so.p -I. -I.. -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -MD -MQ libinput-config.so.p/src_main.c.o -MF libinput-config.so.p/src_main.c.o.d -o libinput-config.so.p/src_main.c.o -c ../src/main.c
In file included from ../src/main.c:5:
../src/config.h:57:40: error: field ‘dwtp’ has incomplete type
57 | config_option(elc(dwtp_state), dwtp, dwtp_set_enabled);
| ^~~~
../src/config.h:31:14: note: in definition of macro ‘config_option’
31 | type name;\
| ^~~~
../src/main.c: In function ‘libinput_config_init’:
../src/main.c:94:43: error: ‘LIBINPUT_CONFIG_DWTP_DISABLED’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_DWT_DISABLED’?
94 | keyword_value("disabled", config, LIBINPUT_CONFIG_##CONFIG##_DISABLED)\
| ^~~~~~~~~~~~~~~~
../src/main.c:87:42: note: in definition of macro ‘keyword_value’
87 | libinput_config.config = prop;\
| ^~~~
../src/main.c:109:17: note: in expansion of macro ‘fancy_binary_value’
109 | fancy_binary_value(config, CONFIG)\
| ^~~~~~~~~~~~~~~~~~
../src/main.c:253:17: note: in expansion of macro ‘fancy_binary_preset’
253 | fancy_binary_preset("dwtp", dwtp, DWTP)
| ^~~~~~~~~~~~~~~~~~~
../src/main.c:94:43: note: each undeclared identifier is reported only once for each function it appears in
94 | keyword_value("disabled", config, LIBINPUT_CONFIG_##CONFIG##_DISABLED)\
| ^~~~~~~~~~~~~~~~
../src/main.c:87:42: note: in definition of macro ‘keyword_value’
87 | libinput_config.config = prop;\
| ^~~~
../src/main.c:109:17: note: in expansion of macro ‘fancy_binary_value’
109 | fancy_binary_value(config, CONFIG)\
| ^~~~~~~~~~~~~~~~~~
../src/main.c:253:17: note: in expansion of macro ‘fancy_binary_preset’
253 | fancy_binary_preset("dwtp", dwtp, DWTP)
| ^~~~~~~~~~~~~~~~~~~
../src/main.c:95:42: error: ‘LIBINPUT_CONFIG_DWTP_ENABLED’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_DWT_ENABLED’?
95 | keyword_value("enabled", config, LIBINPUT_CONFIG_##CONFIG##_ENABLED)
| ^~~~~~~~~~~~~~~~
../src/main.c:87:42: note: in definition of macro ‘keyword_value’
87 | libinput_config.config = prop;\
| ^~~~
../src/main.c:109:17: note: in expansion of macro ‘fancy_binary_value’
109 | fancy_binary_value(config, CONFIG)\
| ^~~~~~~~~~~~~~~~~~
../src/main.c:253:17: note: in expansion of macro ‘fancy_binary_preset’
253 | fancy_binary_preset("dwtp", dwtp, DWTP)
| ^~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.