After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 491773 - autoconf failure: .m4 files cannot be found
autoconf failure: .m4 files cannot be found
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
2.14.x
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 519079 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-30 15:55 UTC by Daniel Macks
Modified: 2009-04-21 17:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Macks 2007-10-30 15:55:43 UTC
Trying to build pygobject-2.14.0 from scratch on my OS X machine, autoreconf fails with:

aclocal:configure.ac:70: warning: macro `AM_CHECK_PYTHON_HEADERS' not found in library
aclocal:configure.ac:101: warning: macro `AM_CHECK_PYMOD' not found in library
aclocal:configure.ac:70: warning: macro `AM_CHECK_PYTHON_HEADERS' not found in library
aclocal:configure.ac:101: warning: macro `AM_CHECK_PYMOD' not found in library
configure.ac:70: error: possibly undefined macro: AM_CHECK_PYTHON_HEADERS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:70: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:101: error: possibly undefined macro: AM_CHECK_PYMOD
configure.ac:128: error: possibly undefined macro: AS_AC_EXPAND
autoreconf: /sw/bin/autoconf-2.60 failed with exit status: 1

This is a regression from what worked in pygobjwect-2.12.3, and appears to be caused by the 2.14.0 tarball not containing the m4/ directory. In 2.12.3, that directory contained .m4 files (python.m4 in particular) that defined those macros. Importing m4/ from 2.12.3 allowed 2.14.0 autoreconf to succeed...looks like that directory just somehow got omitted from the tarball this time?
Comment 1 Daniel Macks 2007-10-30 17:15:02 UTC
One other fix is needed (it's been needed for many previous release versions, so I forgot I'd even hacked it locally): the autotools don't even know to look in the m4/ directory for macros. The solution is to add:

  ACLOCAL_AMFLAGS=-I m4

to the main Makefile.am file.
Comment 2 Daniel Macks 2008-01-03 15:26:06 UTC
Still broken in pygopbject-2.14.1, also fails same way on linux, and same solution fixes it there, 
Comment 3 Gilles Dartiguelongue 2008-03-02 13:54:59 UTC
the other bug has a patch for that.

*** This bug has been marked as a duplicate of 496011 ***
Comment 4 Daniel Macks 2008-06-02 07:30:19 UTC
The files exist now (2.14.2), but are still not found (Comment #1 still applies). If I try to recreate the whole autotools from scratch, it still fails:

autoreconf -fi
aclocal:configure.ac:70: warning: macro `AM_CHECK_PYTHON_HEADERS' not found in library
aclocal:configure.ac:117: warning: macro `AM_CHECK_PYMOD' not found in library
aclocal:configure.ac:70: warning: macro `AM_CHECK_PYTHON_HEADERS' not found in library
aclocal:configure.ac:117: warning: macro `AM_CHECK_PYMOD' not found in library
configure.ac:70: error: possibly undefined macro: AM_CHECK_PYTHON_HEADERS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:70: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:117: error: possibly undefined macro: AM_CHECK_PYMOD
configure.ac:144: error: possibly undefined macro: AS_AC_EXPAND
autoreconf: /sw/bin/autoconf-2.62 failed with exit status: 1

I see that configure.ac has:

AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I .")

but a variable set via AC_SUBST happens during the Makefile.in -> Makefile phase whereas the ACLOCAL_AMFLAGS variable is needed well before Makefile.in is even generated: it needs to be in Makefile.am
Comment 5 Johan (not receiving bugmail) Dahlin 2008-07-14 21:51:08 UTC
2008-07-14  Johan Dahlin  <johan@gnome.org>

        Bug 491773 – autoconf failure: .m4 files cannot be found

        * Makefile.am:
        Patch by macks@netspace.org
Comment 6 Paul Pogonyshev 2009-04-21 17:36:08 UTC
*** Bug 519079 has been marked as a duplicate of this bug. ***