Bug 102271

Summary: build: Add -Iinclude to libinput and its tools
Product: Wayland Reporter: Philip Withnall <bugzilla>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: bugzilla, peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: build: Add -Iinclude to libinput and its tools
build: Add -Iinclude to unit tests

Description Philip Withnall 2017-08-17 09:47:09 UTC
Various files use #include <linux/input.h> and, if the system input.h is too old, will fail to compile. Use the internal copy by adding -Iinclude to the build command lines. This was the case in the old autotools build system.
Comment 1 Philip Withnall 2017-08-17 09:47:39 UTC
Created attachment 133571 [details] [review]
build: Add -Iinclude to libinput and its tools
Comment 2 Peter Hutterer 2017-08-17 22:03:30 UTC
pushed as 5cf4b35b6b77da10573ef5194b97031c1c16a5bf, thanks
Comment 3 Philip Withnall 2017-08-18 08:15:55 UTC
Uff, the tests also need -Iinclude. I thought they didn’t, because they don’t rely on the particular #define which was failing everywhere else — they instead look for MT_TOOL_PALM, which also doesn’t exist in this particular build machine’s system headers.

Log here: https://jenkins.freedesktop.org/view/GNOME%20Coverity/job/coverity/job/coverity-scan-jhbuild/2087/console

Patch coming.

---

Log snippet:

../../checkout/libinput/test/test-touchpad.c: In function ‘touchpad_palm_detect_tool_palm’:
../../checkout/libinput/test/test-touchpad.c:1490:46: error: ‘MT_TOOL_PALM’ undeclared (first use in this function)
  litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_PALM);
                                              ^
../../checkout/libinput/test/test-touchpad.c:1490:46: note: each undeclared identifier is reported only once for each function it appears in
../../checkout/libinput/test/test-touchpad.c: In function ‘touchpad_palm_detect_tool_palm_on_off’:
../../checkout/libinput/test/test-touchpad.c:1511:46: error: ‘MT_TOOL_PALM’ undeclared (first use in this function)
  litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_PALM);
                                              ^
../../checkout/libinput/test/test-touchpad.c: In function ‘touchpad_palm_detect_tool_palm_tap’:
../../checkout/libinput/test/test-touchpad.c:1538:46: error: ‘MT_TOOL_PALM’ undeclared (first use in this function)
  litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_PALM);
                                              ^
[122/139] Compiling C object 'libinput-test-suite-runner@exe/test_test-tablet.c.o'.
ninja: build stopped: subcommand failed.
Comment 4 Philip Withnall 2017-08-18 08:16:17 UTC
Created attachment 133593 [details] [review]
build: Add -Iinclude to unit tests
Comment 5 Peter Hutterer 2017-08-20 22:30:07 UTC
Pushed as 14fa667e7ef911228610ad4daa7d7f9f299086f6, thanks

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.