Jens Geyer created THRIFT-6351:
----------------------------------

             Summary: Require GLib 2.48 in configure and CMake
                 Key: THRIFT-6351
                 URL: https://issues.apache.org/jira/browse/THRIFT-6351
             Project: Thrift
          Issue Type: Improvement
          Components: C glib - Library, Build Process
            Reporter: Jens Geyer
             Fix For: 0.26.0


The build checks for the C (GLib) library do not require the GLib version the 
library needs:

* {{configure.ac}} asks for {{glib-2.0 >= 2.0}} and {{gobject-2.0 >= 2.0}}.
* The three CMake calls {{find_package(GLIB ...)}}, in 
{{build/cmake/DefineOptions.cmake}}, {{lib/c_glib/CMakeLists.txt}} and 
{{test/c_glib/CMakeLists.txt}}, ask for no version at all.

The library has needed GLib 2.40 or later since 0.11.0: {{thrift_ssl_socket.c}} 
calls {{g_info()}}, which GLib added in 2.40. With an older GLib both build 
systems still enable c_glib, and programs linked against it then fail with an 
undefined reference to {{g_info}}.

{{LANGUAGES.md}} has listed GLib 2.48.2 as the minimum since 2018. Require 2.48 
in both build systems, so that the checks match the documented minimum:

* autotools: {{glib-2.0 >= 2.48}} and {{gobject-2.0 >= 2.48}}. With an older 
GLib, c_glib is left out of the build, as it is when GLib is missing.
* CMake: a {{GLIB_MINREV}} variable (2.48), modelled on the existing 
{{BOOST_MINREV}}, passed to all three {{find_package(GLIB ...)}} calls. With an 
older GLib the C (GLib) library is not built, and the configuration summary 
says "GLib 2.48 or later missing".

Nothing changes with GLib 2.48 or later.

_Drafted with AI assistance (Claude Opus 5); reviewed and posted by Jens Geyer._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to