Jens-G opened a new pull request, #3929:
URL: https://github.com/apache/thrift/pull/3929

   The build checks for the C (GLib) library did not require the GLib version 
the library needs. `configure.ac` asked for `glib-2.0 >= 2.0`, and the three 
CMake `find_package(GLIB …)` calls asked 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 enabled c_glib, and programs linked against it 
then failed with an undefined reference to `g_info`. `LANGUAGES.md` has listed 
2.48.2 as the minimum since 2018.
   
   This makes 2.48 the floor of both build systems, so 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:** `GLIB_MINREV` (2.48), modelled on `BOOST_MINREV`, is passed to 
all three `find_package(GLIB …)` calls. With an older GLib, `BUILD_C_GLIB` is 
off and the summary says `GLib 2.48 or later missing`.
   
   Nothing changes with GLib 2.48 or later.
   
   ### How it was checked
   
   GLib 2.38.2, 2.40.2 and 2.48.2 were built from the release tarballs 
(checksums verified) and installed side by side in the `thrift:jammy` image; 
2.72 is jammy's own GLib. `ldd` confirmed that the test programs ran against 
the GLib they were built with.
   
   | GLib | autotools, master | autotools, this PR | CMake, master | CMake, 
this PR |
   |---|---|---|---|---|
   | 2.38.2 | enabled; programs fail to link (`g_info`) | left out | enabled; 
programs fail to link (`g_info`) | off, "GLib 2.48 or later missing" |
   | 2.40.2 | enabled | left out | enabled | off, same message |
   | 2.48.2 | enabled | enabled; `lib/c_glib/test` 29/29 | enabled | enabled; 
ctest 43/43 |
   | 2.72 (jammy) | enabled | enabled | enabled | enabled; ctest 43/43 |
   
   On noble (GLib 2.80) CMake enables c_glib, and the tests give the same 
results as on master; the SCA job builds it there with autotools.
   
   Two failures showed up on master and on this branch alike, and this change 
does not touch them:
   - A CMake build with `WITH_CPP=OFF` does not link `test/c_glib`'s 
`test_server`: THRIFT-6224.
   - On noble, `testapplicationexception`, `testfdtransport` and 
`testthriftfdreadcheck` stop on GLib criticals: THRIFT-5680.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to