Bug 116914 - extra unneeded lib in Libs: in .pc file from gtkspell-devel
extra unneeded lib in Libs: in .pc file from gtkspell-devel
Product: Fedora
Classification: Fedora
Component: gtkspell (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthew Barnes
Depends On:
  Show dependency treegraph
Reported: 2004-02-26 08:23 EST by Kir Kolyshkin
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.0.11-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-24 10:37:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Kir Kolyshkin 2004-02-26 08:23:37 EST
Description of problem:
When building software that uses gtkspell, configure usually calls
'pkg-config --libs gtkspell-2.0' and adds the result to LIBS. The
problem is pkg-config returns -laspell among these:

# grep Libs /usr/lib/pkgconfig/gtkspell-2.0.pc
Libs: -L${libdir} -lgtkspell -laspell
# pkg-config --libs gtkspell-2.0
-Wl,--export-dynamic -lgtkspell -laspell -lgtk-x11-2.0 -lgdk-x11-2.0
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0

So, software is being build with libaspell, which is actually not
needed, because gtkspell library requires it anyway:
[root@kir src]# ldd /usr/lib/libgtkspell.so | grep aspell
        libaspell.so.15 => /usr/lib/libaspell.so.15 (0x40406000)

The problem is not that a problem, until you try to build an rpm from
software which uses gtkspell. The problem is resulting package depends
on exact libaspell file (in my case this is /usr/lib/libaspell.so.15).
But it should not depend on libaspell, since gtkspell already depends
on it!

The solution is to remove -laspell from Libs: line of
/usr/lib/pkgconfig/gtkspell-2.0.pc file. Packages builds and works
fine, and dependency on libaspell file is gone.

As I understand, Libs: line in .pc file should contains libraries that
are needed to build some software that uses that package, and not the
libraries that this very package was build with.

Version-Release number of selected component (if applicable):
$ rpm -q gtkspell

How reproducible:
Try to build rpm from some program that uses gtkspell (in my case this
is logjam from http://kir.vtx.ru/logjam/). Check its depencencies:

Actual results:
$ rpm -q --requires logjam | grep aspell

Expected results:
Package that uses gtkspell should not require libaspell.so

Additional info:
Comment 1 Kir Kolyshkin 2004-02-26 08:45:01 EST
Added Matt Wilson to Cc: as he is actual packager of gtkspell
Comment 2 Matthew Barnes 2006-05-17 10:14:01 EDT
Thanks for the bug report.  Sorry this has been in limbo for so long.  I just
recently took over packaging duties for gtkspell.

I have forwarded this bug to the upstream maintainer to get this take.
(Or at least I tried... gtkspell-devel-list seems inactive and I'm not sure if
Nathan Fredrickson is still the current maintainer.)

The tricky bit is that gtkspell links with the pspell library if the aspell
library is not available at configuration time.  But I think the gist of your
argument is still correct, so I will fix this locally if I don't hear back from

Note You need to log in before you can comment on or make changes to this bug.