Trying to package kdelibs for the Guix distribution, which currently does not contain udev, the following problem occurs. Udev is of course not found: ... -- checking for module 'libudev' -- package 'libudev' not found -- Could NOT find UDev (missing: UDEV_INCLUDE_DIR UDEV_LIBS) -- Building Solid HAL backend. -- Building Solid UPower backend. -- Building Solid UDisks2 backend. -- Building Solid fstab backend. ... -- The following OPTIONAL packages have not been found: ... * UDev , UDev support for Solid , <http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html> Allows Solid to use UDev to provide information about devices on Linux ... Nevertheless, the build later fails: Linking CXX shared library ../../lib/libsolid.so cd /tmp/nix-build-kdelibs-4.13.0.drv-0/build/solid/solid && /gnu/store/rzfbvn6nkdcccgrcphl8hyqwcjqddhr5-cmake-2.8.12/bin/cmake -E cmake_link_script CMakeFiles/solid.dir/link.txt --verbose=1 /gnu/store/6z7k9ms4sf367c3phl7djhb740ly3dqi-gcc-4.8.2/bin/c++ -fPIC ... CMakeFiles/solid.dir/backends/udisks2/udisksopticaldisc.o: In function `Solid::Backends::UDisks2::OpticalDisc::~OpticalDisc()': /tmp/nix-build-kdelibs-4.13.0.drv-0/kdelibs-4.13.0/solid/solid/backends/udisks2/udisksopticaldisc.cpp:344: undefined reference to `UdevQt::Device::~Device()' (and further undefined references of this kind). Reproducible: Always Steps to Reproduce: 1. Compile kdelibs on a machine without udev, I suppose. 2. 3.
This bug is reported on libsolid which is the kdelibs4 version of the solid library. It is now in maintenance mode. If you think it should still be fixed in the KDE Frameworks 5 version of solid please move it to or report a bug on frameworks-solid.
A similar thing happens when compiling kf5 on Fedora, but installing systemd-devel solves the dependency without having to install udev (which doesn't exist)