Bug 442785 - broken gd pkg-config/gdlib-config results
broken gd pkg-config/gdlib-config results
Product: Fedora
Classification: Fedora
Component: gd (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jiri Moskovcak
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-04-16 15:14 EDT by Juliano F. Ravasi
Modified: 2015-02-01 17:48 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.0.35-3.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-08 22:53:40 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 Juliano F. Ravasi 2008-04-16 15:14:17 EDT
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 10:20:37 EDT
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 10:22:10 EDT
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 15:51:58 EDT
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 08:16:47 EDT
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 08:13:05 EDT
gd-2.0.35-3.fc8 has been submitted as an update for Fedora 8
Comment 6 Fedora Update System 2008-04-29 16:48:55 EDT
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 17:41:32 EDT

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-08 22:53:38 EDT
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.