Package: libvolume-id-dev Version: 0.114-2 Severity: normal Tags: patch User: [EMAIL PROTECTED] Usertags: crossbuilt
When cross building packages depending on libvolume-id, pkgconfig fails to parse the pc file generated by udev because the exec_prefix value is not defined: $ pkg-config /usr/arm-linux-gnu/lib/pkgconfig/libvolume_id.pc --libs libvolume_id Variable 'exec_prefix' not defined in '/usr/arm-linux-gnu/lib/pkgconfig/libvolume_id.pc' $ PKG_CONFIG_LIB_DIR=/usr/arm-linux-gnu/lib/pkgconfig/ pkg-config /usr/arm-linux-gnu/lib/pkgconfig/libvolume_id.pc --libs libvolume_id Variable 'exec_prefix' not defined in '/usr/arm-linux-gnu/lib/pkgconfig/libvolume_id.pc' The pc file is missing the first two lines: prefix= exec_prefix= The values for the missing variables are not particularly important, but pkg-config does require that the variables are specified so that it can work out how to calculate dependencies during the cross build. Short circuiting this step by hardcoding the value for libdir as /usr/lib prevents pkg-config from converting libdir to be /usr/arm-linux-gnu/lib etc. when cross compiling. The attached patch adds dummy values to the pc file which allow pkg-config to operate correctly: $ PKG_CONFIG_LIB_DIR=/usr/arm-linux-gnu/lib/pkgconfig/ pkg-config udev-0.114/extras/volume_id/lib/libvolume_id.pc --libs libvolume_id -lvolume_id Normal values for these two lines would be: prefix=/usr exec_prefix=${prefix} libdir is then recalculated in terms of exec_prefix (libdir= ${exec_prefix}/lib) so that the correct location can be determined when cross building: /usr/arm-linux-gnu/lib/ The patched pc file begins: $ cat libvolume_id.pc prefix=/usr exec_prefix=${prefix} libdir=/usr/lib includedir=/usr/include Thanks -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.22-2-amd64 (SMP w/1 CPU core) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages libvolume-id-dev depends on: ii libvolume-id0 0.114-2 libvolume_id shared library libvolume-id-dev recommends no packages. -- no debconf information -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
--- udev.old/extras/volume_id/lib/Makefile 2008-01-08 17:43:20.000000000 +0000 +++ udev-0.114/extras/volume_id/lib/Makefile 2008-01-08 18:08:37.000000000 +0000 @@ -91,6 +91,8 @@ libvolume_id.pc: $(E) " GENPC " $@ + $(Q) echo "prefix=${prefix}/usr" >> $@ + $(Q) echo "exec_prefix=\$${prefix}" >> $@ $(Q) echo "libdir=${usrlibdir}" >> $@ $(Q) echo "includedir=${includedir}" >> $@ $(Q) echo "" >> $@
signature.asc
Description: This is a digitally signed message part