FTBFS: error: ‘const struct input_event’ has no member named ‘time’

Bug #2061591 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xf86-input-multitouch (Debian)
Fix Released
Unknown
xf86-input-multitouch (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/1067596:

Source: xf86-input-multitouch
Version: 1.0~rc3-2
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/fetch.php?pkg=xf86-input-
multitouch&arch=armel&ver=1.0%7Erc3-2%2Bb2&stamp=1711272573&raw=0

src/hwstate.c: In function ‘finish_packet’:
src/hwstate.c:43:24: error: ‘const struct input_event’ has no member named
‘time’
   43 | s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
      | ^~
src/hwstate.c:43:49: error: ‘const struct input_event’ has no member named
‘time’
   43 | s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
      | ^~

It also has multiple "warning: implicit declaration of function" which are not
errors because the package ignores compiler flags from dh_auto_build (which is
also a bug, not sure if RC or not).

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.7.9-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Revision history for this message
Benjamin Drung (bdrung) wrote :

/usr/include/linux/input.h says:

```
/*
 * The event structure itself
 * Note that __USE_TIME_BITS64 is defined by libc based on
 * application's request to use 64 bit time_t.
 */

struct input_event {
#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL__)
        struct timeval time;
#define input_event_sec time.tv_sec
#define input_event_usec time.tv_usec
#else
        __kernel_ulong_t __sec;
#if defined(__sparc__) && defined(__arch64__)
        unsigned int __usec;
        unsigned int __pad;
#else
        __kernel_ulong_t __usec;
#endif
#define input_event_sec __sec
#define input_event_usec __usec
#endif
        __u16 type;
        __u16 code;
        __s32 value;
};
```

Revision history for this message
Benjamin Drung (bdrung) wrote (last edit ):
Download full text (3.8 KiB)

I fixed passing CPPFLAGS to the Makefile (dh_auto_build -- OPTS="$(CPPFLAGS) $(CFLAGS)"), but it is still failing:

```
make[1]: Entering directory '<<PKGBUILDDIR>>'
dh_auto_build -- OPTS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=<<PKGBUILDDIR>>=/usr/src/xf86-input-multitouch-1.0~rc3-2ubuntu1"
        make -j4 "INSTALL=install --strip-program=true" "OPTS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=<<PKGBUILDDIR>>=/usr/src/xf86-input-multitouch-1.0~rc3-2ubuntu1"
make[2]: Entering directory '<<PKGBUILDDIR>>'
gcc -Iinclude -I/usr/include/xorg -I/usr/include/pixman-1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=<<PKGBUILDDIR>>=/usr/src/xf86-input-multitouch-1.0~rc3-2ubuntu1 -c src/capabilities.c -o obj/src/capabilities.o
gcc -Iinclude -I/usr/include/xorg -I/usr/include/pixman-1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=<<PKGBUILDDIR>>=/usr/src/xf86-input-multitouch-1.0~rc3-2ubuntu1 -c src/hwstate.c -o obj/src/hwstate.o
gcc -Iinclude -I/usr/include/xorg -I/usr/include/pixman-1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=<<PKGBUILDDIR>>=/usr/src/xf86-input-multitouch-1.0~rc3-2ubuntu1 -c src/mtstate.c -o obj/src/mtstate.o
gcc -Iinclude -I/usr/include/xorg -I/usr/include/pixman-1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=<<PKGBUILDDIR>>=/usr/src/xf86-input-multitouch-1.0~rc3-2ubuntu1 -c src/memory.c -o obj/src/memory.o
src/hwstate.c: In function ‘finish_packet’:
src/hwstate.c:43:24: error: ‘const struct input_event’ has no member named ‘time’
   43 | s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
      | ^~
src/hwstate.c:43:49: error: ‘const struct input_event’ has no member named ‘time’
   43 | s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
      | ^~
make[2]: *...

Read more...

Changed in xf86-input-multitouch (Ubuntu):
importance: Undecided → High
Changed in xf86-input-multitouch (Debian):
importance: Undecided → Unknown
Benjamin Drung (bdrung)
Changed in xf86-input-multitouch (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xf86-input-multitouch - 1.0~rc3-2.1

---------------
xf86-input-multitouch (1.0~rc3-2.1) unstable; urgency=medium

  * Non-maintainer upload
  [ Gianfranco Costamagna ]
  * Drop libmtdev1 runtime dependency

  [ Benjamin Drung ]
  * debian/rules: Pass CPPFLAGS and CFLAGS to make call
  * Port usage of struct input_event to input_event_*
    (Closes: #1067596, LP: #2061591)
  * Include headers to fix implicit function declaration

 -- Gianfranco Costamagna <email address hidden> Tue, 16 Apr 2024 23:27:03 +0200

Changed in xf86-input-multitouch (Ubuntu):
status: Fix Committed → Fix Released
Changed in xf86-input-multitouch (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.