Bug#797800: libdevmapper-dev: Missing dependencies / brokenness in devmapper.pc

Andreas Henriksson andreas at fatal.se
Wed Sep 2 16:57:58 UTC 2015


Package: libdevmapper-dev
Version: 2.02.127-1
Severity: serious

Dear Maintainer,

There are a couple of problems with the dependencies of libdevmapper-dev
and/or the included devmapper.pc file.

The /usr/lib/x86_64-linux-gnu/pkgconfig/devmapper.pc file
states:
Requires.private:  libudev librt

This means packages build against/using devmapper.pc
will fail to configure. As an example it might look like this:

configure:6523: checking for LVM_DEPS
configure:6533: $PKG_CONFIG --exists --print-errors "polkit-gobject-1 >= 0.92
			     $POLKIT_REQUIREMENT
			     lvm2app
			     gudev-1.0 >= 164"
Package librt was not found in the pkg-config search path.
Perhaps you should add the directory containing `librt.pc'
to the PKG_CONFIG_PATH environment variable
Package 'librt', required by 'devmapper', not found
configure:6539: $? = 1
configure:6559: $PKG_CONFIG --exists --print-errors "polkit-gobject-1 >= 0.92
			     $POLKIT_REQUIREMENT
			     lvm2app
			     gudev-1.0 >= 164"
Package librt was not found in the pkg-config search path.
Perhaps you should add the directory containing `librt.pc'
to the PKG_CONFIG_PATH environment variable
Package 'librt', required by 'devmapper', not found
configure:6565: $? = 1
configure:6582: result: no



The solution is to include a dependency on the package shipping
the relevant .pc files, eg libudev.pc and librt.pc.

The first one is easily fixed since libudev.pc file is included in
libudev-dev. Just make libdevmapper-dev depend on libudev-dev.

The librt.pc file does not seem to be shipped by any package in Debian.
Likely the generation of devmapper.pc was not right, since the
the Requires.prive line seems to be generated according to:
http://sources.debian.net/src/lvm2/2.02.127-1/libdm/libdevmapper.pc.in/#L11

My suspicion is that @RT_PC@ should have ended up empty on Debian.

The configure.in script seems to be flawed by assuming that if there's
a librt.so, then there's also a librt.pc....
cf. AC_CHECK_LIB vs PKG_CHECK_MODULES.

As an alternative you might want to convince the glibc maintainers
to ship the/a librt.pc file.


Regards,
Andreas Henriksson

-- System Information:
Debian Release: 8.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the pkg-lvm-maintainers mailing list