GLib version?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GLib version?

Csahok Zoltan
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.

73,
Zoli



Reply | Threaded
Open this post in threaded view
|

Re: GLib version?

Nate Bargmann-4
* 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 (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GLib version?

Thomas Beierlein-4
In reply to this post by Csahok Zoltan
Hi Zoli,

Am Wed, 20 Nov 2019 19:48:12 +0100
schrieb Csahok Zoltan <[hidden email]>:

> I would like to use GLib version >=2.40 for set-related hash table
> functions (g_hash_table_add).

I tried the same back in 2015 while coding the focm.c contest module.

At that time 2.40 was just out for some months but not widely in use.
So I had to fall back to g_hash_table_replace with key and value the
same (see there).

In meantime nearly all distributions should provide an more actual
version of GLib.

>
> 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?

If we need 2.40 we should state so in the configure.ac.

73, de Tom


--
"Do what is needful!"
Ursula LeGuin: Earthsea
--


Reply | Threaded
Open this post in threaded view
|

Re: GLib version?

Csahok Zoltan
Hi Tom, hi Nate,

Thanks for the feedback. My conclusion is that it's safe to assume
that GLib >=2.40.0 is generally available.
Will change configure.ac accordingly (hard check).

I'm still wondering though where are the debian pkg dependencies specified
and how come Tlf 1.4.0 has different settings.

BTW in debian Tlf recommends sox and xplanet, but not cwdaemon.
Could this also be improved?


73,
Zoli

On Thu, Nov 21, 2019 at 06:53:49AM +0100, Thomas Beierlein wrote:

> Hi Zoli,
>
> Am Wed, 20 Nov 2019 19:48:12 +0100
> schrieb Csahok Zoltan <[hidden email]>:
>
> > I would like to use GLib version >=2.40 for set-related hash table
> > functions (g_hash_table_add).
>
> I tried the same back in 2015 while coding the focm.c contest module.
>
> At that time 2.40 was just out for some months but not widely in use.
> So I had to fall back to g_hash_table_replace with key and value the
> same (see there).
>
> In meantime nearly all distributions should provide an more actual
> version of GLib.
>
> >
> > 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?
>
> If we need 2.40 we should state so in the configure.ac.
>
> 73, de Tom
>
>
> --
> "Do what is needful!"
> Ursula LeGuin: Earthsea
> --
>