I'm trying to compile libinput from source using the following script:
$> git clone https://gitlab.freedesktop.org/libinput/libinput
$> cd libinput
$> meson --prefix=/usr builddir/
$> ninja -C builddir/
$> sudo ninja -C builddir/ install
At the third line I get the following error, involving mtdev. I have mtdev-tools installed.
$ meson --prefix=/usr builddir/
The Meson build system
Version: 0.45.1
Source dir: /home/john/Downloads/libinput
Build dir: /home/john/Downloads/libinput/builddir
Build type: native build
Project name: libinput
Native C compiler: cc (gcc 7.4.0 "cc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Fetching value of define "static_assert": _Static_assert
Header <dirent.h> has symbol "versionsort": YES
Header <errno.h> has symbol "program_invocation_short_name": YES
Has header "xlocale.h": NO
Checking if "locale.h" links: YES
Header <sys/ptrace.h> has symbol "PTRACE_ATTACH": YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency libudev found: YES 237
meson.build:117:0: ERROR: Native dependency 'mtdev' not found
Meson uses pkg-config, which doesn't report mtdev.
$ pkg-config --list-all | grep mtdev
(No results)
I'm not sure if this is the problem, but I don't know how to get pkg-config to "see" mtdev, and I have no idea what else to do.
System: Ubuntu 18.04 LTS. I'm OK with upgrading to 19.04 if that would help.
You need to install the
libmtdev-dev
package:Meson and
pkg-config
are typically looking for the development files of libraries and systems (the header files*.h
and the development librarieslib*.so
andlib*.a
).In Ubuntu (and Debian, and distros derived from these two), development files are typically stored in packages with the
-dev
suffix. So you usually want to search for those packages when fixing build dependencies on Ubuntu.