2
votes

I'm having trouble compiling a program with gcc that includes glib.h on a Debian 9 i386 machine. gcc is telling me that my glib version does not meet the minimum value.

GLIB_VERSION_MIN_REQUIRED must be >= GLIB_VERSION_2_26

The GLIBC version on the machine is 2.24

# ldd --version
ldd (Debian GLIBC 2.24-11+deb9u3) 2.24

But I installed the -dev package and it says that 2.50.3-2 was installed

# apt install libglib2.0-dev
...
Get:1 http://ftp.us.debian.org/debian stretch/main i386 libglib2.0-dev i386 2.50.3-2 [3,091 kB]
...

However, the error persists. I was able to compile this project without problems on a Debian 9 x86_64 machine. What else needs installed for this to work?

1

1 Answers

4
votes

GLIB_VERSION_MIN_REQUIRED is not the same as the installed GLib version. GLIB_VERSION_MIN_REQUIRED is a macro which is defined by the program you’re trying to compile, to tell GLib the minimum version of GLib it depends on, so that GLib can warn you if the program uses symbols introduced in a later version of GLib. See its documentation.

The GLIB_VERSION_MIN_REQUIRED must be >= GLIB_VERSION_2_26 error message is emitted if GLIB_VERSION_MIN_REQUIRED is set to a version < 2.26. This is a bug in the program you’re trying to compile: find where it defines GLIB_VERSION_MIN_REQUIRED and bump that dependency to ≥ 2.26.

The GLIBC version on the machine is 2.24

# ldd --version
ldd (Debian GLIBC 2.24-11+deb9u3) 2.24

That’s irrelevant. GLib (a C utility library) is not the same thing as glibc (the system C runtime library).