Bug 334938

Summary: Kdelibs does not compile without udev
Product: [Unmaintained] solid Reporter: andreas
Component: libsolid-udisks2Assignee: Lukáš Tinkl <lukas>
Status: RESOLVED WORKSFORME    
Severity: normal CC: greg.martyn
Priority: NOR    
Version First Reported In: 4.13.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description andreas 2014-05-17 11:42:10 UTC
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.
Comment 1 Jonathan Riddell 2015-03-11 19:10:47 UTC
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.
Comment 2 Greg Martyn 2016-02-28 02:24:14 UTC
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)