mypaint/libmypaint

configure.ac:242: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT

ahloiscreamo opened this issue · 3 comments

Hi,
im trying to compile but stuck when it complain about missing file on aclocal path.
i have glib (glib-2.62.3_1 ) and gettext (gettext-0.20.1_1) installed.
my system Linux void_ahloi 5.4.10_1 #1 SMP PREEMPT Thu Jan 9 17:28:36 UTC 2020 x86_64 GNU/Linux

ahloi@void_ahloi:~/S/libmypaint|master✓
➤ ./autogen.sh --disable-introspection --without-glib

I am testing that you have the tools required to build
libmypaint from git. This test is not foolproof.

checking for libtool >= 1.5 ... Major version might be too new (2.4.6)
checking for autoconf >= 2.62 ... yes (version 2.69)
checking for automake >= 1.13 ... yes (version 1.16.1)
checking for intltool >= 0.40.1 ... yes (version 0.51.0)
WARNING: cannot find glib-2.0.m4 in aclocal's search path.
         You may see fatal macro warnings below.
         I looked in:  /usr/share/aclocal
         If these files are installed in /some/dir, set the 
         ACLOCAL_FLAGS environment variable to "-I /some/dir",
         or append ":/some/dir" to ACLOCAL_PATH,
         or install /usr/share/aclocal/glib-2.0.m4.

WARNING: cannot find glib-gettext.m4 in aclocal's search path.
         You may see fatal macro warnings below.
         I looked in:  /usr/share/aclocal
         If these files are installed in /some/dir, set the 
         ACLOCAL_FLAGS environment variable to "-I /some/dir",
         or append ":/some/dir" to ACLOCAL_PATH,
         or install /usr/share/aclocal/glib-gettext.m4.

configure.ac:228: warning: macro 'AM_GLIB_GNU_GETTEXT' not found in library
configure.ac:241: warning: AM_NLS is m4_require'd but not m4_defun'd
/usr/share/aclocal/intltool.m4:27: IT_PROG_INTLTOOL is expanded from...
configure.ac:241: the top level
configure.ac:241: warning: AM_NLS is m4_require'd but not m4_defun'd
/usr/share/aclocal/intltool.m4:27: IT_PROG_INTLTOOL is expanded from...
configure.ac:241: the top level
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4macros'.
libtoolize: linking file 'm4macros/libtool.m4'
libtoolize: linking file 'm4macros/ltoptions.m4'
libtoolize: linking file 'm4macros/ltsugar.m4'
libtoolize: linking file 'm4macros/ltversion.m4'
libtoolize: linking file 'm4macros/lt~obsolete.m4'
configure.ac:241: warning: AM_NLS is m4_require'd but not m4_defun'd
aclocal.m4:26: IT_PROG_INTLTOOL is expanded from...
configure.ac:241: the top level
Checked mypaint-brush-settings-gen.h: up to date, not rewritten
Checked brushsettings-gen.h: up to date, not rewritten
configure.ac:241: warning: AM_NLS is m4_require'd but not m4_defun'd
aclocal.m4:26: IT_PROG_INTLTOOL is expanded from...
configure.ac:241: the top level
configure.ac:84: installing './compile'
configure.ac:60: installing './missing'
Makefile.am: installing './depcomp'
configure.ac:241: warning: AM_NLS is m4_require'd but not m4_defun'd
aclocal.m4:26: IT_PROG_INTLTOOL is expanded from...
configure.ac:241: the top level
configure.ac:242: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:13668: error: possibly undefined macro: AM_NLS
ahloi@void_ahloi:~/S/libmypaint|master✓
➤ 
WARNING: cannot find glib-2.0.m4 in aclocal's search path.
         You may see fatal macro warnings below.
         I looked in:  /usr/share/aclocal
         If these files are installed in /some/dir, set the 
         ACLOCAL_FLAGS environment variable to "-I /some/dir",
         or append ":/some/dir" to ACLOCAL_PATH,
         or install /usr/share/aclocal/glib-2.0.m4.

WARNING: cannot find glib-gettext.m4 in aclocal's search path.
         You may see fatal macro warnings below.
         I looked in:  /usr/share/aclocal
         If these files are installed in /some/dir, set the 
         ACLOCAL_FLAGS environment variable to "-I /some/dir",
         or append ":/some/dir" to ACLOCAL_PATH,
         or install /usr/share/aclocal/glib-gettext.m4.

Short version: you probably need to install dev packages of gettext/glib.

So it appears the macros are not found. I don't use Void linux, but I think these would be the steps to solve this:

  1. Find out where these macros are installed, using your package manager *.
  2. Run `export ACLOCAL_FLAGS="-I /wherever/those/macros/are/"
  3. Check if you can successfully run ./autogen.sh
  4. If it works, add the location to the ACLOCAL_PATH in your .bashrc, .bash_profile, or similar by adding:
    export ACLOCAL_PATH="/wherever/they/were:$ACLOCAL_PATH"

*: if you don't know how to do this, read the docs for your package manager or search online for a way to list the files in a package. If we assume that the way to do this is to run splorg --list PACKAGE_NAME, you would find the macro locations by running:
splorg --list gettext | grep "m4"

If the m4 files are not part of the packages, you probably need to install separate -dev/-devel versions of those packages (whichever convention is used on Void).

Thanks @jplloyd

i ended up putting the macro file manually in aclocal path.
i got both glib-2.0.m4/glib-gettext.m4 on gnome gitlab.

but then it complain configure:13773: error: possibly undefined macro: AM_NLS
i resolve that by installing gettext-devel.

Thanks for the workaround, i appreciate it~

Jehan commented

i got both glib-2.0.m4/glib-gettext.m4 on gnome gitlab.

It's good to have development code when you want to follow development. But otherwise I'd suggest you search the actual package providing these files (any good distribution would provide them) and install these.

Thanks for the workaround, i appreciate it~

For the record, what @jplloyd proposed is not a workaround. That's software compilation 101. :-)