Missing "Wl,--export-dynamic" when using pkgconfig

Bug #16586 reported by Wilfried Horn
4
Affects Status Importance Assigned to Milestone
libglade2 (Ubuntu)
Invalid
Medium
Adam Conrad

Bug Description

When linking a programm using "pkg-config libglade-2.0 --libs" the parameters
"Wl,--export-dynamic" are not. This failure leads to the effect that libglade
doesn't find signal handlers given in the main source file.

Revision history for this message
James Henstridge (jamesh) wrote :

There are a number of reasons not to include this in the "pkg-config --libs" output:

1. If you're linking a library, and are trying to reduce the exported symbols
(for ABI compatibility reasons, speeding up linking, etc), passing
--export-dynamic will cause all symbols to be exported, contrary to any linker
map files.

2. Not all libglade programs need it. It is only necessary if the program uses
the glade_xml_signal_autoconnect() function.

This issue has been noted in the libglade reference manual throughout the 2.0
series:
  http://developer.gnome.org/doc/API/2.0/libglade/libglade-notes.html
(towards the end of the page)

This problem seems to have been coming up recently because the "gtk+-2.0"
pkg-config module installed by gtk+-2.6 now depends on "gmodule-noexport-2.0"
(which doesn't include --export-dynamic in the link flags) rather than
"gmodule-2.0", like previous versions did.

Affected applications can be fixed by doing one of:
 1. add "gmodule-2.0" to the list of pkg-config modules they link against.
 2. if using libtool, pass "-export-dynamic" as a link flag.

Revision history for this message
Adam Conrad (adconrad) wrote :

I'm going to close this, based on jamesh's comments. If there is anything in
the archive that trips on this, please file bugs on those specific packages to
change how they link. If it's only private builds you're having issues with,
please see comment #1 in this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.