Could not run GLIB test program, checking why

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

This article is a part of the Troubleshooting collection.

Problem

The following message appears when running ./configure.

checking for GLIB - version >= 2.2.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: glib not found or too old; See http://wiki.zmanda.com/index.php/Installation for help

Solution

This can indicate any number of problems, and looking at config.log may help determine what happened. Note that config.log ends with many lines of variable dumps; go to the end of the file and scroll backward over these dumps until you see the logging begin. You will find something like the following:

configure:54118: gcc -o conftest -g -O2  -D_REENTRANT -D_PTHREADS -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
    -D_REENTRANT -D_GNU_SOURCE   conftest.c -lsocket -lnsl -lresolv  -lsocket -lnsl  -L/usr/local/lib -lgmodule-2.0 -ldl -lgobject-2.0
    -lgthread-2.0 -lpthread -lthread -lglib-2.0 -lintl -liconv   >&5
... (ERROR MESSAGES HERE) ...
configure:54124: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
... (LOTS MORE DEFINES) ...
| #define HAVE_LIBSOCKET 1
| /* end confdefs.h.  */
| 
| #include <glib.h>
| #include <stdio.h>
| 
| int
| main ()
| {
|  return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
|   ;
|   return 0;
| }
configure:54159: error: glib not found or too old; See http://wiki.zmanda.com/index.php/Installation for help

Some of the more common causes of this error are:

  • failure to install a devel package, e.g., glib2-devel
  • building Amanda with a different compiler toolchain than was used to build glib (this often happens on Solaris)
Personal tools