libpcap-dev and derivatives missing libpcap.pc

Bug #1865501 reported by Neil Horman on 2020-03-02
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libpcap
Unknown
Unknown
libpcap (Ubuntu)
Undecided
Unassigned
Trusty
Undecided
Unassigned
Bionic
Undecided
Sergio Durigan Junior
Disco
Undecided
Unassigned

Bug Description

[Impact]

Users of libpcap cannot make use of its pkg-config file in order to automate the building process of applications that use the library, because the file is not being installed on Ubuntu bionic.

[Test Case]

$ lxc launch ubuntu-daily:bionic libpcap-bug1865501
$ lxc shell libpcap-bug1865501
# apt update
# apt install libpcap-dev pkg-config -y
# pkg-config libpcap --libs

You will see an error like this:

Package libpcap was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcap.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpcap' found

[Regression Potential]

- The libpcap package will be rebuilt using newer dependencies on bionic, which might cause some unforeseen problem. The chances for this to happen are very small, though.

- Users who created their own pkg-config file as a workaround should not see any problems with the new file, as long as they are correctly providingthe right parameters in their own files.

[Original Description]

libpcap-dev (and its derivative packages libpcap0.8-dev) is missing the libpcap.pc file. The implication here is that any autoconf based project that uses the PKG_CHECK_MODULES macro to determine the install state of libpcap fails, as pkg-config can't find the install information

Related branches

Andreas Hasenack (ahasenack) wrote :

This was fixed in 1.9.0-2:

libpcap (1.9.0-2) unstable; urgency=medium

  [ Luca Boccassi ]
  * Install upstream pkg-config file (closes: #922219).

Ubuntu Eoan (19.10) and later have this fix. I assume you are running disco or earlier. But those versions do not have the pc file in the upstream source code, as that was added just in version 1.9.0.

So which ubuntu release are you running, and which version exactly of the libpcap packages do you have installed?

Changed in libpcap (Ubuntu):
status: New → Incomplete
Neil Horman (nhorman) wrote :

strictly speaking, I'm not running any specific release myself, I'ts the CI environment on github thats running it, and it appears to be running trusty:
https://travis-ci.org/nhorman/dropwatch/jobs/657253596/config

I can move it forward without issue, but Travis only currently supports Bionic as the latest LTS release, so if you can backport support for the pkgconfig file to there, I'd be good to go.

Bryce Harrington (bryce) wrote :

Here's the raw diff for 1.9.0-2

Only the chunks */debian/libpcap0.8-dev.install and */debian/patches/shared-lib.diff are needed.

no longer affects: libpcap (Ubuntu Trusty)
Bryce Harrington (bryce) wrote :

I've targeted this to disco as well as bionic for completeness, although sounds like disco won't be as important to fix.

Bryce Harrington (bryce) wrote :

[Ah how time gets away from me; Disco is already out of support.]

Changed in libpcap (Ubuntu):
status: Incomplete → New
Changed in libpcap (Ubuntu Disco):
status: New → Won't Fix
tags: added: patch
Paride Legovini (paride) on 2020-03-05
Changed in libpcap (Ubuntu Bionic):
status: New → Triaged
Paride Legovini (paride) on 2020-03-05
tags: added: server-next
Changed in libpcap (Ubuntu Trusty):
status: New → Won't Fix
Changed in libpcap (Ubuntu Bionic):
assignee: nobody → Sergio Durigan Junior (sergiodj)
Changed in libpcap (Ubuntu Bionic):
status: Triaged → In Progress
description: updated
Changed in libpcap (Ubuntu):
status: New → Fix Released

Hello Neil, or anyone else affected,

Accepted libpcap into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libpcap/1.8.1-6ubuntu1.18.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libpcap (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic

Verifying that the bug happens:

root@libpcap-bug1865501:~# pkg-config libpcap --libs
Package libpcap was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcap.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpcap' found

Enabling -proposed, updating the package and verifying that the bug is fixed:

root@libpcap-bug1865501:~# apt policy libpcap0.8
libpcap0.8:
  Installed: 1.8.1-6ubuntu1.18.04.2
  Candidate: 1.8.1-6ubuntu1.18.04.2
  Version table:
 *** 1.8.1-6ubuntu1.18.04.2 500
        500 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1.8.1-6ubuntu1.18.04.1 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     1.8.1-6ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages

root@libpcap-bug1865501:~# pkg-config libpcap --libs
-lpcap

Therefore, I am marking this bug as verified.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libpcap - 1.8.1-6ubuntu1.18.04.2

---------------
libpcap (1.8.1-6ubuntu1.18.04.2) bionic; urgency=medium

  * Install pkg-config file for libpcap (LP: #1865501).
    - d/p/set-package-name-with-ac-init.patch: Set the PACKAGE_NAME
      variable using autoconf's AC_INIT macro, so that we can use it
      in the libpcap.pc.in file.
    - d/p/use-m4-macro-to-get-version.patch: Use an M4 macro to
      execute a "cat" command and obtain the version from the VERSION
      file.
    - d/p/install-pkg-config-file.patch: New patch from upstream,
      which creates a libpcap.pc.in file and adjusts the Makefile to
      install it.
    - d/libpcap0.8-dev.install: Install libpcap.pc pkg-config file.
      Thanks to Luca Boccassi for the Debian patch (Closes #922219).

 -- Sergio Durigan Junior <email address hidden> Mon, 29 Jun 2020 17:49:04 -0400

Changed in libpcap (Ubuntu Bionic):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for libpcap has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.