#1 Please check for minimum version of glib2

0.5 Version
Diab Jerius


I attempted to compile flom on an old Debian Lenny box. configure found the library, but didn't check that it was new enough, so that the eventual compiler failed:

/tmp/flom-0.5.0/src/flom_locker.c:68: undefined reference to `g_ptr_array_new_with_free_func'

I notice that configure.ac uses pkg-config directly, rather than pkg-config's autoconf macro (pkg.m4), which allows you to specify a minimum version for the required libraries. pkg.m4 is distributed with pkg-config.

Please consider using pkg.m4 and specifying a minimum required glib2.




  • Christian Ferrari

    Hi Diab,
    thank you for your feedback.
    I modified "configure.ac" to check glib2 version and added an AC_MSG_WARN message.
    This is now configure output when "glib2" is not at minimum tested level:

    checking for pkg-config... pkg-config
    checking if glib2 is pkg-config configured... yes
    checking glib2 version... configure: WARNING: installed glib-2.0 level (2.24.0) is under minimum tested level
    checking for gdb... gdb

    it's quite difficult to establish exact glib-2.0 minimum level because the number of used functions is quite high. I could insert an error message, but there could be a lot of "below minimum tested levels" that are OK.
    My current development system is Ubuntu 10.04 (quite old), but I test CentOS 5.6 and OpenSUSE 11.1 as well.

    I don't know pkg.m4, but if you sent me a patch I could try it.

    I commited the patch to git:

    commit f769ca115a31b6f390240b8c10133f14430698c3
    Author: Christian Ferrari tiian@users.sourceforge.net
    Date: Thu May 1 23:09:40 2014 +0200

    Fixing bug reported with ticket #1

    Could you try it and tell me if it works on your old Debian Lenny box?

    Thank you

  • Christian Ferrari

    • assigned_to: Christian Ferrari
    • Milestone: 0.3 Version --> 0.5 Version
  • Christian Ferrari

    Hi Diab,
    after some hacking I resolved the issue that blocked me from using "pkg.m4" macros.
    The last git commit contains this check:

    # checking glib-2.0 and gthread-2.0 availability and compatibility using
    # pkg-config
    PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.22 gthread-2.0 >= 2.22])
    #GLIB2_LIBS automatically set by PKG_CHECK_MODULES macro

    and removes previous pkg-config explicit invocation.
    Minimum level 2.22 was retrieved from this document https://developer.gnome.org/glib/2.26/api-index-2-22.html and relates to the function that blocked you (g_ptr_array_new_with_free_func). There's a chance some other function needs at least 2.24, the current level I use on development system.

    Hope this helps you, could you give me a feedback related to this code version?

    commit f14bfe326dfdc38dad159bf3c30c3932f5b015d7
    Author: Christian Ferrari <tiian@users.sourceforge.net>
    Date:   Fri May 2 17:09:08 2014 +0200
        Introduced minimum glib2 level to 2.22


  • Christian Ferrari

    • status: open --> pending
  • Christian Ferrari

    Release 0.5.1 incorporates the changes you requested.

  • Christian Ferrari

    • status: pending --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks