Search code examples
ubuntupkg-configcunit

missing version in cunit pkg-config configuration


I've installed on Ubuntu Trusty64 the libcunit1-dev package (2.1-2.dfsg-1). This comes with a pkg-config installed in /usr/lib/pkgconfig/cunit.pc.

However, it seems that once installed, pkg-config itself runs into issues:

vagrant@vagrant-ubuntu-trusty-64:~$ pkg-config --list-all
iso-codes        iso-codes - ISO country, language, script and currency codes and translations
tic              tic - ncurses 5.9 add-on library
icu-io           icu-io - International Components for Unicode: Stream and I/O Library
xkbcomp          xkbcomp - XKB keymap compiler
usbutils         usbutils - USB device database
udev             udev - udev
Package 'cunit' has no Version: field

Trying to compile software that uses cunit's pkg-config configurations fails also.

Looking into the cunit.pc file, there is indeed no version line.

prefix=/usr
exec_prefix=${prefix}
libdir={exec_prefix}/lib
includedir=${prefix}/include/CUnit

Name: CUnit
Description: The C Unit Test Library
Libs: -L${libdir} -lcunit
CFlags: -I${includedir}

Adding a version line like Version: 2.1.2, makes it work again. Considering other pc files have version lines, I assume this is a mandatory line.

My question: is this a bug in ubuntu (and/or debian), because I highly doubt I'm the first one encountering this (it seems to me that cunit / pkg-config is a widely used combi when compiling software), or is it something else i'm obviously missing here?


Solution

  • It seems to indeed be a bug in the cunit-dev debian package, which is reported at:

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782366