libglib2.0-dev needs a dependency on libffi-dev because its pkg-config file specifies -lffi

Bug #1772742 reported by Adam Novak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glib2.0 (Ubuntu)
New
Undecided
Unassigned

Bug Description

The pkg-config file at /usr/lib/x86_64-linux-gnu/pkgconfig/gobject-2.0.pc has "-lffi" in its "Libs.private". This means that when you ask pkg-config how to link statically against gobject-2.0, with "pkg-config --libs --static gobject-2.0", you get a series of linker flags that say you need to link against, among other things, libffi with "-lffi".

But the static library for libffi is in package libffi-dev, which libglib2.0-dev doesn't depend on. So if you actually try to use those linker flags and libffi-dev doesn't happen to be installed, your build will crash.

I think that libglib2.0-dev needs to be made to depend on libffi-dev (so that the library is always available). Alternately, if -lffi isn't actually needed to link against the static /usr/lib/x86_64-linux-gnu/libgobject-2.0.a, then -lffi needs to be removed from the pkg-config file so that builds don't go looking for it.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libglib2.0-dev 2.48.2-0ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-124.148-generic 4.4.117
Uname: Linux 4.4.0-124-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.17
Architecture: amd64
CurrentDesktop: XFCE
Date: Tue May 22 13:09:39 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-04-18 (1859 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: glib2.0
UpgradeStatus: Upgraded to xenial on 2018-02-26 (85 days ago)

Revision history for this message
Adam Novak (interfect) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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