* On 2019 20 Nov 12:54 -0600, Csahok Zoltan wrote: > I would like to use GLib version >=2.40 for set-related hash table functions > (g_hash_table_add). > > A quick check of Debian buster shows that it contains GLib 2.58. > On the other hand, tlf in that release (1.3.2) requires only GLib 2.35.9. > Similar (or even worse) for sid: tlf 1.4.0 requires 2.30.0 for > non-alpha/powerpc, > whereas GLib 2.62 is deployed. > > configure.ac doesn't explicitly mention the required version, so this must > come from somewhere else. Could this and the Debian (and other distro) > packages > be fixed so that at least 2.40 is required? > > I hope this doesn't break anything.
I just checked Slackware 14.2, the last stable release, and it has the glib2 package at version 2.46.2. This release dates to 30 Jun 2016 so requiring 2.40 would be safe for both Slackware and Debian and derivatives of each. There are a couple of ways to handle the version. One is a hard requirement on >= 2.40 and fail the configure step if the found version is older. This is not ideal, IMO, but is the easiest. The other is to set a variable that will be written to config.h and test its value in the code. If glib is too old then fall back to the current behavior and if new enough then use the hash table. Also, perhaps print a configure warning that new behavior will be disabled in the first case. 73, Nate -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Web: https://www.n0nb.us Projects: https://github.com/N0NB GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
signature.asc
Description: PGP signature