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 523910 - Use Requires.private in *.pc-file for pkg-config
Use Requires.private in *.pc-file for pkg-config
Product: glibmm
Classification: Bindings
Component: general
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
Depends on:
Reported: 2008-03-22 22:08 UTC by Tobias Grimm
Modified: 2008-03-25 02:34 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Tobias Grimm 2008-03-22 22:08:21 UTC
Please describe the problem:
At the moment `pkg-config glibmm-2.4.pc --libs` returns:

   -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 

...but there is usually no need to link against the extra libs when not linking statically.

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

    - Requires: gobject-2.0 sigc++-2.0
    + Requires.private: gobject-2.0 sigc++-2.0

This way, `pkg-config glibmm-2.4.pc --libs` returns:


and `pkg-config glibmm-2.4.pc --libs --static` returns:

    -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0


Steps to reproduce:
Compile something with "pkg-config glibmm-2.4.pc --libs"

Actual results:
The resulting executable will be linked against libgobject-2.0 and linsigc-2.0, even if it doesn't use any symbols from these libs.

Expected results:

Does this happen every time?

Other information:
Comment 1 Daniel Macks 2008-03-23 17:07:00 UTC
Public headers of glibmm #include headers of glib and sigc++: those packages are required even when compiling in a dynamic environment.
Comment 2 Jonathon Jongsma 2008-03-25 02:34:53 UTC
yeah, I really don't think that we can do that.  These libraries are exposed in the glibmm headers.