Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 776604 - dev-libs/libmanette fails to build with 4.x kernel on struct input_event
Summary: dev-libs/libmanette fails to build with 4.x kernel on struct input_event
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-03-16 03:59 UTC by David Haller
Modified: 2021-04-18 15:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Define missing macros for input_event (libmanette-0.2.5-input_event.patch,634 bytes, patch)
2021-03-16 04:06 UTC, David Haller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Haller 2021-03-16 03:59:59 UTC
dev-libs/libmanette-0.2.5 fails build with:

FAILED: src/libmanette-0.2.so.0.p/manette-device.c.o
[..]
-o src/libmanette-0.2.so.0.p/manette-device.c.o -c ../libmanette-0.2.5/src/manette-device.c
../libmanette-0.2.5/src/manette-device.c: In function 'on_evdev_event':
../libmanette-0.2.5/src/manette-device.c:418:39: error: 'struct input_event' has no member named 'input_event_sec'
  418 |   manette_event.any.time = evdev_event->input_event_sec * 1000 +
      |                                       ^~
../libmanette-0.2.5/src/manette-device.c:419:39: error: 'struct input_event' has no member named 'input_event_usec'
  419 |                            evdev_event->input_event_usec / 1000;
      |                                       ^~
ninja: build stopped: subcommand failed.

Reproducible: Always

Steps to Reproduce:
1. build with a 4.x kernel, e.g. 4.14.x, works with 5.7.x



Somewhere between kernel 4.14.188 and 5.7.8 some defines were introduced into the kernel header include/uapi/linux/input.h which libmanette-0.2.5 uses. The fix is easy, see patch I'll attach (which could be done cleaner I guess).
Comment 1 David Haller 2021-03-16 04:06:24 UTC
Created attachment 691650 [details, diff]
Define missing macros for input_event

see include/uapi/linux/input.h for the code the patch is taken from
Comment 2 Matt Turner gentoo-dev 2021-04-18 15:29:17 UTC
Please send this as a merge request upstream to https://gitlab.gnome.org/aplazas/libmanette