Menu

#96 gobject-introspection is always needed by configure

closed-fixed
None
5
2012-06-07
2012-01-09
Pacho Ramos
No

gobject-introspection is always needed by configure, even when I try to build it with --disable-introspection, if gobject-introspection is not present, configure fails with:

checking whether to enable gobject-introspection... ./configure: line 15401: syntax error near unexpected token `0.6.14\'
./configure: line 15401: ` GOBJECT_INTROSPECTION_CHECK(0.6.14)\'

Please note I am already applying patch for bug 3414011

Thanks for fixing this

Discussion

  • Pacho Ramos

    Pacho Ramos - 2012-01-09

    config.log.xz

     
  • Pacho Ramos

    Pacho Ramos - 2012-01-09
    • assigned_to: nobody --> fpaquet
     
  • Fredy Paquet

    Fredy Paquet - 2012-01-09

    Hi

    Please fetch the current version of gtkextra-3 from CVS.
    This problem has been fixed about 2 weeks ago.

    I would very much appreciate if you could confirm it to work or wether there is a new bug in it.

    fp

     
  • Alexandre Rostovtsev

    The issue is that the GOBJECT_INTROSPECTION_CHECK macro requires introspection.m4 from gobject-introspection; as a result, users who do not have gobject-introspection installed and then run autoreconf will experience configure failure.

    Not sure whether to really consider this a bug, but as a convenience to users, you may want to consider bundling introspection.m4 with the gtkextra-3 sources.

     
  • Alexandre Rostovtsev

    Unfortunately, the problem is still present in the latest gtkextra-3 cvs checkout. When a missing autoconf m4 macro results in a bash syntax error, wrapping it in an if/else/fi does not help.

    To reproduce:

    $ sudo mv /usr/share/aclocal/introspection.m4 /tmp/
    $ autoreconf
    $ ./configure --disable-introspection
    [...]
    checking for GTK... yes
    checking whether to enable glade integration... no
    checking whether to enable gobject-introspection... ./configure: line 15470: syntax error near unexpected token `0.6.14'
    ./configure: line 15470: ` GOBJECT_INTROSPECTION_CHECK(0.6.14)'
    configure failed

     
  • Alexandre Rostovtsev

    I apologize, my comment from a few minutes ago was due to me misunderstanding the format of sourceforge's bug mail; I misread today's spam message as fpaquet's comment from 2012-01-09.

     
  • Fredy Paquet

    Fredy Paquet - 2012-05-07

    Hello Alexandre
    No problem, thank you for your suggestions,
    i will add introspection.m4 to the distribution as soon as i find some time to do it.

    I will take this from the latest introspection distribution, which means i have to update first.

    fp

     
  • Fredy Paquet

    Fredy Paquet - 2012-05-07
    • status: open --> open-accepted
     
  • Fredy Paquet

    Fredy Paquet - 2012-06-03

    Hello tetromino, Hello Alexandre

    Sorry for the delay.
    I've added m4/introspection.m4 to the CVS distribution today.

    But I couldn't verify that it's working like this (I have GI installed here).

    Maybe you could give it another try to confirm that it's ok like this.
    fp

     
  • Fredy Paquet

    Fredy Paquet - 2012-06-03
    • status: open-accepted --> pending-fixed
     
  • Alexandre Rostovtsev

    > Sorry for the delay.
    > I've added m4/introspection.m4 to the CVS distribution today.
    >
    > But I couldn't verify that it's working like this (I have GI installed
    > here).
    >
    > Maybe you could give it another try to confirm that it's ok like this.

    Thanks! Unfortunately, you need two small changes to tell the build system to actually use files in the m4/ directory: AC_CONFIG_MACRO_DIR([m4]) in configure.in, and calling aclocal with "-I m4" in autogen.sh; otherwise, the error still occurs. I can't figure out how to attach files to this bug (permissions problem, maybe?), so I am pasting the patch inline:

    Index: configure.in

    RCS file: /cvsroot/gtkextra/gtkextra-3/configure.in,v
    retrieving revision 1.16
    diff -u -r1.16 configure.in
    --- configure.in 12 Apr 2012 16:43:12 -0000 1.16
    +++ configure.in 4 Jun 2012 05:42:53 -0000
    @@ -10,6 +10,7 @@

    AC_INIT(gtkextra,3.0.2)
    AC_LANG([C])
    +AC_CONFIG_MACRO_DIR([m4])

    # Save this value here, since automake will set cflags later
    cflags_set=${CFLAGS:+set}
    Index: autogen.sh
    ===================================================================
    RCS file: /cvsroot/gtkextra/gtkextra-3/autogen.sh,v
    retrieving revision 1.3
    diff -u -r1.3 autogen.sh
    --- autogen.sh 4 May 2010 12:37:22 -0000 1.3
    +++ autogen.sh 4 Jun 2012 05:42:53 -0000
    @@ -66,7 +66,7 @@
    if ( aclocal --version ) </dev/null > /dev/null 2>&1; then
    rm -f aclocal.m4
    echo "Building aclocal.m4... "
    - ${ACLOCAL}
    + ${ACLOCAL} -I m4
    echo "done."
    else
    echo "aclocal not found -- aborting `basename $0`"

     
  • Fredy Paquet

    Fredy Paquet - 2012-06-04

    Hello tetromino

    I've put your changes into CVS branch gtkextra-3 today.

    Could you pse verify again ?

    thnx
    fp

     
  • Alexandre Rostovtsev

    > I've put your changes into CVS branch gtkextra-3 today.

    Thanks, but you only changed configure and configure.in. You should still add "-I m4" to the aclocal call in autogen.sh; otherwise, gtkextra-3's autogen.sh will still fail to use the m4 subdirectory:

    # mv /usr/share/aclocal/introspection.m4 /tmp
    # ./autogen.sh --disable-introspection
    Locating m4 macro language processor...
    found: /usr/bin/m4
    Building files for libtool...
    done.
    Building files for gtkdoc...
    done.
    Building aclocal.m4...
    done.
    Building configure...
    done.
    Building config header template...
    autoheader-2.69: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
    autoheader-2.69: WARNING: and `config.h.top', to define templates for `config.h.in'
    autoheader-2.69: WARNING: is deprecated and discouraged.
    autoheader-2.69:
    autoheader-2.69: WARNING: Using the third argument of `AC_DEFINE' and
    autoheader-2.69: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a template without
    autoheader-2.69: WARNING: `acconfig.h':
    autoheader-2.69:
    autoheader-2.69: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1,
    autoheader-2.69: [Define if a function `main' is needed.])
    autoheader-2.69:
    autoheader-2.69: WARNING: More sophisticated templates can also be produced, see the
    autoheader-2.69: WARNING: documentation.
    done.
    Building Makefile templates...
    configure.in:87: installing './config.guess'
    configure.in:87: installing './config.sub'
    done.
    ./configure --disable-introspection
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    [...]
    checking for pkg-config... (cached) /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for GTK... yes
    checking whether to enable glade integration... no
    checking whether to enable gobject-introspection... ./configure: line 15498: syntax error near unexpected token `0.6.14'
    ./configure: line 15498: ` GOBJECT_INTROSPECTION_CHECK(0.6.14)'
    configure failed

     
  • Fredy Paquet

    Fredy Paquet - 2012-06-05

    Sorry, i've overseen this.
    Should be ok now.

     
  • Fredy Paquet

    Fredy Paquet - 2012-06-07
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.