After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 523907 - Use Requires.private in *.pc-file for pkg-config
Use Requires.private in *.pc-file for pkg-config
Status: RESOLVED NOTABUG
Product: libxml++
Classification: Bindings
Component: General
2.22.x
Other Linux
: Normal normal
: ---
Assigned To: Christophe de Vienne
Christophe de Vienne
Depends on:
Blocks:
 
 
Reported: 2008-03-22 21:29 UTC by Tobias Grimm
Modified: 2008-06-12 10:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tobias Grimm 2008-03-22 21:29:07 UTC
At the moment `pkg-config libxml++-2.6 --libs` returns:

   -lxml++-2.6 -lxml2 -lglibmm-2.4

...but there is usually no need to link agains libxml2 and libglibmm-2.4, when not linking statically.

Using Requires.private in the *.pc-File helps here:

    - Requires: libxml-2.0 glibmm-2.4
    + Requires.private: libxml-2.0 glibmm-2.4

This way, `pkg-config libxml++-2.6 --libs` returns:

    -lxml++-2.6 

and `pkg-config libxml++-2.6 --libs --static` returns:

    -lxml++-2.6 -lxml2 -lz -lm -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0

Tobias
Comment 1 Murray Cumming 2008-03-22 21:57:56 UTC
Could you submit a patch for this please, with a ChangeLog entry. I will apply it for libxml++ 2.23/24.
Comment 2 Daniel Macks 2008-03-23 01:19:19 UTC
Looking at the headers installed (i.e., 'make install') for libxml++ 2.20.0, I see #include for several glibmm/*.h headers. That means glibmm is part of the public interface, not just an implementation detail. Even for dynamic linking again libxml++, one would need glibmm installed in order to have those #include work. libxml-2.0 seems safe to move to .private, but not glibmm-2.4
Comment 3 Murray Cumming 2008-06-12 10:36:02 UTC
So, I guess this isn't a bug.