Using gcc-8 xf86-input-libinput fails to build with the following error: ---- ~/src/xorg/git/xf86-input-libinput% make make all-recursive make[1]: Entering directory '/home/jos/src/xorg/git/xf86-input-libinput' Making all in src make[2]: Entering directory '/home/jos/src/xorg/git/xf86-input-libinput/src' CC xf86libinput.lo xf86libinput.c: In function ‘LibinputApplyConfigAccel’: xf86libinput.c:558:8: error: ‘LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE’? case LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE xf86libinput.c:558:8: note: each undeclared identifier is reported only once for each function it appears in xf86libinput.c: In function ‘LibinputApplyConfigAccelCurvePoints’: xf86libinput.c:793:6: error: ‘LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE’? LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE xf86libinput.c:797:3: error: implicit declaration of function ‘libinput_device_config_accel_set_curve_point’; did you mean ‘libinput_device_config_accel_set_profile’? [-Werror=implicit-function-declaration] libinput_device_config_accel_set_curve_point(device, p->x, p->fx); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libinput_device_config_accel_set_profile xf86libinput.c:797:3: warning: nested extern declaration of ‘libinput_device_config_accel_set_curve_point’ [-Wnested-externs] xf86libinput.c: In function ‘xf86libinput_handle_event’: xf86libinput.c:2279:2: warning: enumeration value ‘LIBINPUT_EVENT_SWITCH_TOGGLE’ not handled in switch [-Wswitch] switch (type) { ^~~~~~ xf86libinput.c: In function ‘xf86libinput_parse_accel_profile_option’: xf86libinput.c:2634:13: error: ‘LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE’? profile = LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE xf86libinput.c: In function ‘xf86libinput_parse_accel_curve_points_options’: xf86libinput.c:2768:19: error: ‘LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE’? if ((supported & LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE) == 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE xf86libinput.c: In function ‘LibinputSetPropertyAccelProfile’: xf86libinput.c:3991:15: error: ‘LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE’? profiles |= LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE xf86libinput.c: In function ‘LibinputSetPropertyAccelCurvePoints’: xf86libinput.c:4582:20: error: ‘LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE’? if ((supported & LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE) == 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE xf86libinput.c: In function ‘LibinputInitAccelProperty’: xf86libinput.c:4943:21: error: ‘LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE’? if (profile_mask & LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE xf86libinput.c: In function ‘LibinputInitAccelCurvePointsProperty’: xf86libinput.c:5617:19: error: ‘LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE’ undeclared (first use in this function); did you mean ‘LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE’? if ((supported & LIBINPUT_CONFIG_ACCEL_PROFILE_DEVICE_SPEED_CURVE) == 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE cc1: some warnings being treated as errors make[2]: *** [Makefile:510: xf86libinput.lo] Error 1 make[2]: Leaving directory '/home/jos/src/xorg/git/xf86-input-libinput/src' make[1]: *** [Makefile:523: all-recursive] Error 1 make[1]: Leaving directory '/home/jos/src/xorg/git/xf86-input-libinput' make: *** [Makefile:411: all] Error 2 -----
in your configure output, what does this line say: checking if libinput_device_config_accel_set_curve_point is available... no Yes or No? if the latter and it fails to build, there's something weird going on with the includes. AFAICT all the speed curve usages are behind #ifdefs and it builds fine here against older libinput.
(In reply to Peter Hutterer from comment #1) > in your configure output, what does this line say: > checking if libinput_device_config_accel_set_curve_point is available... no > > Yes or No? if the latter and it fails to build, there's something weird > going on with the includes. AFAICT all the speed curve usages are behind > #ifdefs and it builds fine here against older libinput. In my configure output: checking if libinput_device_config_accel_set_curve_point is available... yes It fails to build against the latest git version of libinput. xf86-input-libinput-0.27.1 builds fine!
something is wrong with the build system here because configure detects the new function is available but then fails picking it up during compile. The enum value is in libinput.h and should be picked up. Build with make V=1 and check if the include paths are correct. are you building into a custom prefix?
(In reply to Peter Hutterer from comment #3) > something is wrong with the build system here because configure detects the > new function is available but then fails picking it up during compile. The > enum value is in libinput.h and should be picked up. > > Build with make V=1 and check if the include paths are correct. are you > building into a custom prefix? Prefix is --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu It builds fine against libinput-1.10.6 but fails against the git version. It still doesn't build with make V=1. The include paths seem correct.
I really can't debug this from here, sorry, you'll need to chase this down yourself. The enum value it is complaining about is defined in libinput.h so if it's not finding it, it's picking up the wrong libinput.h. Or something else really whacky.
(In reply to Peter Hutterer from comment #5) > I really can't debug this from here, sorry, you'll need to chase this down > yourself. The enum value it is complaining about is defined in libinput.h so > if it's not finding it, it's picking up the wrong libinput.h. Or something > else really whacky. This issue is fixed, it was picking up the wrong libinput.h! I had two versions of libinput.h, one in /usr/include and an older one in /usr/local/include. After deleting the latter, it builds fine.
Thanks, changing the resolution for correctness, local config issues aren't officially FIXED upstream :)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.