udev dependency is not checked before build
I have a quite fresh installation of Fedora 34. When building pipewire with meson, it misses libudev.h when compiling. I think a dependency check should be added for this.
$ meson compile
Found runner: ['/usr/bin/ninja']
ninja: Entering directory `.'
[0/1] Regenerating build files.
The Meson build system
Version: 0.56.2
Source dir: /home/nils/Development/pipewire
Build dir: /home/nils/Development/pipewire/builddir
Build type: native build
Project name: pipewire
Project version: 0.3.25
C compiler for the host machine: cc (gcc 11.0.1 "cc (GCC) 11.0.1 20210405 (Red Hat 11.0.1-0)")
C linker for the host machine: cc ld.bfd 2.35.1-41
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -fvisibility=hidden: YES (cached)
Compiler for C supports arguments -Werror=suggest-attribute=format: YES (cached)
Compiler for C supports arguments -Wsign-compare: YES (cached)
Compiler for C supports arguments -Wpointer-arith: YES (cached)
Compiler for C supports arguments -Wpointer-sign: YES (cached)
Compiler for C supports arguments -Wformat: YES (cached)
Compiler for C supports arguments -Wformat-security: YES (cached)
Compiler for C supports arguments -Wimplicit-fallthrough: YES (cached)
Compiler for C supports arguments -Wmissing-braces: YES (cached)
Compiler for C supports arguments -Wtype-limits: YES (cached)
Compiler for C supports arguments -Wvariadic-macros: YES (cached)
Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-pedantic: YES (cached)
Compiler for C supports arguments -Wold-style-declaration: YES (cached)
Compiler for C supports arguments -Wunused-result: YES (cached)
Compiler for C supports arguments -DFASTPATH: YES (cached)
C++ compiler for the host machine: c++ (gcc 11.0.1 "c++ (GCC) 11.0.1 20210405 (Red Hat 11.0.1-0)")
C++ linker for the host machine: c++ ld.bfd 2.35.1-41
Compiler for C++ supports arguments -fvisibility=hidden: YES (cached)
Compiler for C++ supports arguments -Werror=suggest-attribute=format: YES (cached)
Compiler for C++ supports arguments -Wsign-compare: YES (cached)
Compiler for C++ supports arguments -Wpointer-arith: YES (cached)
Compiler for C++ supports arguments -Wpointer-sign: NO (cached)
Compiler for C++ supports arguments -Wformat: YES (cached)
Compiler for C++ supports arguments -Wformat-security: YES (cached)
Compiler for C++ supports arguments -Wimplicit-fallthrough: YES (cached)
Compiler for C++ supports arguments -Wmissing-braces: YES (cached)
Compiler for C++ supports arguments -Wtype-limits: YES (cached)
Compiler for C++ supports arguments -Wvariadic-macros: YES (cached)
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES (cached)
Compiler for C++ supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C++ supports arguments -Wno-pedantic: YES (cached)
Compiler for C++ supports arguments -Wold-style-declaration: NO (cached)
Compiler for C++ supports arguments -Wunused-result: YES (cached)
Compiler for C supports arguments -msse: YES (cached)
Compiler for C supports arguments -msse2: YES (cached)
Compiler for C supports arguments -mssse3: YES (cached)
Compiler for C supports arguments -msse4.1: YES (cached)
Compiler for C supports arguments -mfma: YES (cached)
Compiler for C supports arguments -mavx: YES (cached)
Compiler for C supports arguments -mavx2: YES (cached)
Compiler for C supports arguments -mfpu=neon: NO (cached)
Library atomic found: YES
Checking if "8-byte __atomic_store_n without libatomic" links: YES (cached)
Has header "dlfcn.h" : YES (cached)
Has header "inttypes.h" : YES (cached)
Has header "memory.h" : YES (cached)
Has header "poll.h" : YES (cached)
Has header "stddef.h" : YES (cached)
Has header "stdint.h" : YES (cached)
Has header "stdio_ext.h" : YES (cached)
Has header "strings.h" : YES (cached)
Has header "string.h" : YES (cached)
Has header "sys/mount.h" : YES (cached)
Has header "sys/param.h" : YES (cached)
Has header "sys/poll.h" : YES (cached)
Has header "sys/prctl.h" : YES (cached)
Has header "sys/random.h" : YES (cached)
Has header "sys/socket.h" : YES (cached)
Has header "sys/stat.h" : YES (cached)
Has header "sys/times.h" : YES (cached)
Has header "sys/time.h" : YES (cached)
Has header "sys/types.h" : YES (cached)
Has header "sys/utsname.h" : YES (cached)
Has header "sys/vfs.h" : YES (cached)
Has header "sys/wait.h" : YES (cached)
Has header "pwd.h" : YES (cached)
Has header "ucontext.h" : YES (cached)
Has header "unistd.h" : YES (cached)
Has header "valgrind/valgrind.h" : NO (cached)
Checking for function "poll" : YES (cached)
Checking for function "pselect" : YES (cached)
Checking for function "posix_memalign" : YES (cached)
Checking for function "getpagesize" : YES (cached)
Checking for function "clock_gettime" : YES (cached)
Checking for type "ptrdiff_t" : YES (cached)
Header <string.h> has symbol "strndupa" : YES (cached)
Checking for function "mkstemp" : YES (cached)
Checking for function "memfd_create" : YES (cached)
Checking for function "getrandom" : YES (cached)
Dependency systemd found: YES 248 (cached)
Found pkg-config: /usr/bin/pkg-config (1.7.3)
Found CMake: /usr/bin/cmake (3.19.7)
Run-time dependency libsystemd found: NO (tried pkgconfig and cmake)
Configuring Makefile using configuration
Library m found: YES
Library rt found: YES
Library dl found: YES
Dependency threads found: YES unknown (cached)
Dependency dbus-1 found: YES 1.12.20 (cached)
sdl2-config found: NO
Run-time dependency sdl2 found: NO (tried pkgconfig and config-tool)
Run-time dependency ncursesw found: NO (tried pkgconfig and cmake)
Run-time dependency sndfile found: NO (tried pkgconfig and cmake)
Run-time dependency glib-2.0 found: NO (tried pkgconfig and cmake)
Run-time dependency alsa found: YES 1.2.4
Run-time dependency libudev found: NO (tried pkgconfig and cmake)
Dependency alsa found: YES 1.2.4 (cached)
Run-time dependency bluez found: NO (tried pkgconfig and cmake)
Run-time dependency sbc found: NO (tried pkgconfig and cmake)
Run-time dependency ldacbt-enc found: NO (tried pkgconfig and cmake)
Run-time dependency ldacbt-abr found: NO (tried pkgconfig and cmake)
Run-time dependency libopenaptx found: NO (tried pkgconfig and cmake)
Run-time dependency fdk-aac found: NO (tried pkgconfig and cmake)
Dependency libavcodec skipped: feature ffmpeg disabled
Dependency libavformat skipped: feature ffmpeg disabled
Run-time dependency jack found: NO (tried pkgconfig and cmake)
Dependency vulkan found: YES 1.2.162 (cached)
Has header "vulkan/vulkan.h" with dependency vulkan: YES (cached)
Run-time dependency camera found: NO (tried pkgconfig and cmake)
Configuring version.h using configuration
Configuring pipewire.conf using configuration
Configuring client.conf using configuration
Configuring client-rt.conf using configuration
Configuring jack.conf using configuration
Configuring pipewire-pulse.conf using configuration
Configuring pipewire-uninstalled.conf using configuration
Program ln found: YES (/usr/bin/ln)
Configuring bluez-monitor.conf using configuration
Configuring v4l2-monitor.conf using configuration
Configuring media-session.conf using configuration
Configuring alsa-monitor.conf using configuration
Configuring with-jack using configuration
Configuring with-pulseaudio using configuration
Configuring pipewire.service using configuration
Configuring pipewire-pulse.service using configuration
Configuring pipewire-media-session.service using configuration
Configuring config.h using configuration
Configuring pw-jack using configuration
Program doxygen skipped: feature docs disabled
Program xmltoman found: NO
Program pw-uninstalled.sh found: YES (/home/nils/Development/pipewire/pw-uninstalled.sh)
Build targets in project: 108
Found ninja-1.10.2 at /usr/bin/ninja
[4/362] Compiling C object spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o
FAILED: spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o
cc -Ispa/plugins/alsa/libspa-alsa.so.p -Ispa/plugins/alsa -I../spa/plugins/alsa -Ispa/include -I../spa/include -I. -I.. -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O2 -g -fvisibility=hidden -Werror=suggest-attribute=format -Wsign-compare -Wpointer-arith -Wpointer-sign -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wtype-limits -Wvariadic-macros -Wno-missing-field-initializers -Wno-unused-parameter -Wno-pedantic -Wold-style-declaration -Wunused-result -DFASTPATH -fPIC -D_GNU_SOURCE -DHAVE_ALSA_UCM -DHAVE_CONFIG_H -DHAVE_READLINK -MD -MQ spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o -MF spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o.d -o spa/plugins/alsa/libspa-alsa.so.p/alsa-udev.c.o -c ../spa/plugins/alsa/alsa-udev.c
../spa/plugins/alsa/alsa-udev.c:33:10: schwerwiegender Fehler: libudev.h: Datei oder Verzeichnis nicht gefunden
33 | #include <libudev.h>
| ^~~~~~~~~~~
Kompilierung beendet.
[9/362] Compiling C object spa/plugins/alsa/acp/libacp.a.p/alsa-mixer.c.o
ninja: build stopped: subcommand failed.