#1145539 at-spi2-core: atkversion.h missing G_BEGIN_DECLS/G_END_DECLS, breaks C++ consumers

Package:
at-spi2-core
Source:
at-spi2-core
Description:
Assistive Technology Service Provider Interface (dbus core)
Submitter:
Valentin Haudiquet
Date:
2026-08-25 15:19:05 UTC
Severity:
normal
Tags:
#1145539#5
Date:
2026-08-25 15:18:13 UTC
From:
To:
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