Bug 442785 - broken gd pkg-config/gdlib-config results
Summary: broken gd pkg-config/gdlib-config results
Alias: None
Product: Fedora
Classification: Fedora
Component: gd
Version: 8
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jiri Moskovcak
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-04-16 19:14 UTC by Juliano F. Ravasi
Modified: 2015-02-01 22:48 UTC (History)
2 users (show)

Fixed In Version: 2.0.35-3.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-07-09 02:53:40 UTC
Type: ---

Attachments (Terms of Use)

Description Juliano F. Ravasi 2008-04-16 19:14:17 UTC
Description of problem:
The list of link libraries returned by both `pkg-config gdlib --libs` and
`gdlib-config --libs` contains only the libraries used to link libgd itself, not
the libraries needed to link programs that make use gd, contrary to all other
packages that offer pkg-config modules or *-config helpers.

The output just misses a "-lgd" on the output.

Version-Release number of selected component (if applicable): 2.0.35

Steps to Reproduce:
1. pkg-config gdlib --libs
2. gdlib-config --libs

Actual results:
-lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm

Expected results:
-lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm -lgd

Compare with the results of:
  sdl-config --libs
  freetype-config --libs
  pkg-config glib-2.0 --libs 
  pkg-config libpng12 --libs

Note that all of them print the switch needed to link programs to the library,
among other dependencies. With gdlib it prints only the dependencies, and not
the actual -lgd library.

Comment 1 Rex Dieter 2008-04-17 14:20:37 UTC
I'd argue the "Expected results" should simply be:
Everything else is extraneous in the non-static linking case.

That said, there are exceptions to our expectations taht *config output what 
client programs expect, including mysql_config, pg_config (which report libs 
that mysql, postgresql were built with, not necessarily what client apps 
should use).

Comment 2 Rex Dieter 2008-04-17 14:22:10 UTC
For pkgconfig, the fix would be relatively easy, put everything except -lgd in 
a new tag in the *.pc file:
which is included only when pkg-config --static is used. 

Comment 3 Juliano F. Ravasi 2008-04-17 19:51:58 UTC
Yes, I just checked and really, -lgd is enough to pull all the link dependencies
needed by libgd.

This seems to be a problem on the libgd package itself:


gdlib-config is generated with @LIBS@ and @LIBICONV@ as provided by the libgd
configure script, used to compile and link libgd itself.

Comment 4 Jiri Moskovcak 2008-04-22 12:16:47 UTC
on my Fedora 8 $ pkg-config gdlib --libs returns -ldg (should be -lgd, but 
that's just typo). And I'll ask upstream about the output of glib-config.


Comment 5 Fedora Update System 2008-04-25 12:13:05 UTC
gd-2.0.35-3.fc8 has been submitted as an update for Fedora 8

Comment 6 Fedora Update System 2008-04-29 20:48:55 UTC
gd-2.0.35-3.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gd'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-3296

Comment 7 Juliano F. Ravasi 2008-05-13 21:41:32 UTC

The package in testing fixed all issues. Now it returns -lgd as expected (the
current F8 package is really returning -ldg, which breaks configure scripts
relying on it, so it is welcome to push the package to updates).


Comment 8 Fedora Update System 2008-07-09 02:53:38 UTC
gd-2.0.35-3.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

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