Package: at-spi2-core Version: 2.56.2-1+deb13u1 Severity: normal Tags: patch X-Debbugs-Cc: [email protected]
Dear Maintainer, The atkversion.h header shipped in libatk1.0-dev is missing G_BEGIN_DECLS/G_END_DECLS, causing link failures when the header is included from C++ code. The version functions declared in atkversion.h (atk_get_major_version, atk_get_minor_version, atk_get_micro_version, atk_get_binary_age, atk_get_interface_age) lack C linkage declarations. When atkversion.h is included from a C++ translation unit, the compiler generates mangled C++ symbols for these functions, which do not match the C exports in libatk-1.0.so. This results in linker errors such as: undefined reference to `atk_get_major_version()' This was fixed upstream in https://gitlab.gnome.org/GNOME/at-spi2-core/-/merge_requests/219 (merged 2025-12-09) and is available starting from upstream version 2.59.0. The fix is already included in trixie-backports (2.61.1-1~bpo13+1) but not in the current trixie stable. The attached patch adds G_BEGIN_DECLS after the #include <glib.h> and G_END_DECLS before the final #endif in atk/atkversion.h.in. This is the same 2-line fix as the upstream merge request. Could this be considered for a stable update to trixie? Regards, Valentin Haudiquet
Author: Robert Ancell <[email protected]> Date: Wed, 10 Dec 2025 11:02:20 +1300 Subject: Fix atk_get_major_version etc not linking on C++ Origin: upstream, commit:5ae24f981ddce448682d123fd71ff20329bdd014 Applied-Upstream: 2.59.0, commit:5ae24f981ddce448682d123fd71ff20329bdd014 These failed because the version header was missing extern "C" (via G_BEGIN_DECLS). . The atkversion.h header is missing G_BEGIN_DECLS/G_END_DECLS, causing link failures when the header is included from C++ code. The version functions (atk_get_major_version, atk_get_minor_version, etc.) are declared without C linkage, so C++ consumers get mangled symbols that do not match the C exports in libatk-1. --- a/atk/atkversion.h.in +++ b/atk/atkversion.h.in @@ -30,6 +30,8 @@ #include <glib.h> +G_BEGIN_DECLS + /** * ATK_MAJOR_VERSION: * @@ -473,4 +475,6 @@ guint atk_get_interface_age (void) G_GNUC_CONST; #define atk_binary_age atk_get_binary_age () #define atk_interface_age atk_get_interface_age () +G_END_DECLS + #endif /* __ATK_VERSION_H__ */

