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 124590 - Enforce ABI compatability at link time
Enforce ABI compatability at link time
Status: RESOLVED NOTABUG
Product: gtkmm
Classification: Bindings
Component: general
2.4
Other All
: Normal enhancement
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2003-10-14 17:30 UTC by Jonathan Brandmeyer
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Jonathan Brandmeyer 2003-10-14 17:30:43 UTC
I would like to see Gtkmm implement a mechanism for ensuring that programs
compiled against Gtkmm 2.2 (and in the future, 2.4), cannot be linked
against Gtk 1.x libraries without a link-time error.  If that isn't
practically possible, then an informative library initialization-time error
would be a decent fallback.  As it currently stands, you can link a Gtk 2
application against Gtk 1 libraries, or a mixture of both versions of the
libraries.  The program then crashes with a segmentation fault at runtime.
 This cause of this segfault is not always immediately apparent, even to
programmers.  As a somewhat public example, a few months ago, a build of
Evolution 1.2 was shipped on Debian Sid that was linked against both Glib 2
and 1.2 libraries.  Several days passed with many complaints before the
source of the crash was found.

Preferably, the reverse should also be true; Gtk 1 applications should fail
to link against Gtk 2 libs.

I really don't have any idea how to implement this kind of protection, but
I think I remember seeing some kind of ABI warning when linking GNU C++
programs against the wrong version of libstdc++.

Thanks,
Jonathan Brandmeyer
Comment 1 Murray Cumming 2003-10-15 06:54:29 UTC
It is very difficult to create this problem, and I would expect any 
such program to fail immediately. Also, it's a generic problem and 
not a gtkmm problem.