posiblemente indefinido macro: AC MSG ERROR


Tengo lo siguiente en configure.ac:

AC_CHECK_PROGS(MAKE,$MAKE make gmake,error)
if test "x$MAKE" = "xerror" ;then
  AC_MSG_ERROR([cannot find a make command])
fi

Esto ha estado en nuestro proyecto durante mucho tiempo, pero en algunas configuraciones, obtengo este error:

configure.ac:45: error: possibly undefined macro: AC_MSG_ERROR
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.

Las líneas que se agregaron recientemente por encima de esto:

AC_CONFIG_MACRO_DIR([m4])
LT_INIT

¿Puede alguien explicar qué causa este error y cómo rastrear el problema?

EDITAR: Añadiendo detalles sobre las diferencias.

Caja que funciona:

uname -a Linux host1 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

automake: 1.11.1
autoconf: 2.67
m4: 1.4.14
libtoolize: 2.2.6b

Caja que no funciona:

Linux host2 2.6.32-35-generic-pae #78-Ubuntu SMP Tue Oct 11 17:01:12 UTC 2011 i686 GNU/Linux

automake: 1.11.1
autoconf: 2.65
m4: 1.4.13
libtoolize: 2.2.6b

NUEVA EDICIÓN: solamente las máquinas de 32 bits experimentan esta dificultad.

ACTUALIZADO Soy capaz de reproducir el problema en una máquina CentOS con autoconf 2.67, automake 1.11.1, libtool 2.2.6b, y m4 1.4.14. ¿Es esto solo un error con máquinas de 32 bits?

Author: gturri, 2012-01-11

17 answers

Tuve este mismo problema y encontré que el paquete pkg-config faltaba.

Después de instalar el paquete, todo se generó correctamente.

 189
Author: mutsu,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-13 17:27:26

Se recomienda usar autoreconf -fi en lugar de llamar manualmente a aclocal;autoconf;automake; #and whatever else para rellenar correctamente aclocal.m4 y así sucesivamente.

Añadiendo ACLOCAL_AMFLAGS = -I m4 (al nivel superior Makefile.am) y AC_CONFIG_MACRO_DIR([m4]) todavía es opcional si no utiliza ningún archivo m4 propio, pero por supuesto, hacerlo silenciará el proocess:)

 31
Author: jørgensen,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-01-20 19:15:43

Tuve este problema con mi propio configure.ac, pero en este caso (y para el beneficio de cualquier persona aquí de Google) fue porque había citado accidentalmente el AC_MSG_ERROR por lo que estaba siendo tratado como una cadena:

AX_BOOST_BASE([1.42], [], [AC_MSG_ERROR([Could not find Boost])])

Una vez que eliminé los corchetes alrededor de la macro AC_MSG_ERROR, funcionó:

AX_BOOST_BASE([1.42], [], AC_MSG_ERROR([Could not find Boost]))

Los comentarios que dicen que debe instalar pkg-config o algún paquete no lo entienden. El AC_MSG_ERROR se supone que funciona y le da un mensaje útil como "Necesita instalar el paquete XYZ", pero debido a algún problema, el AC_MSG_ERROR no funciona. Instalar el paquete XYZ sin duda hará que el error desaparezca, pero solo porque una vez que el paquete está allí, ya no hay necesidad de imprimir un mensaje de error!

Así que instalar pkg-config o un paquete en particular simplemente evita el problema, en realidad no lo soluciona.

 24
Author: Malvineous,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-06-23 01:21:06

He experimentado este mismo problema bajo CentOS 7

En el caso de mayo, el problema se disparó después de la instalación de libcurl-devel (libcurl ya estaba instalado en esta máquina)

 11
Author: jap1968,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-10-18 11:50:39

También tuve un problema similar.. mi solución es

apt-get install libcurl4-openssl-dev

(ya había instalado libcurl ) al menos funcionó para mí..

 10
Author: BeatingBytes,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-01-12 15:44:31

¿Está configurando un directorio local 'm4'? por ejemplo,

> aclocal -I m4 --install

Algunos paquetes vienen con un script de shell autogen.sh o initgen.sh para ejecutar glibtoolize, autoheader, autoconf, automake. Aquí hay un script autogen.sh que uso:

#! /bin/sh

case `uname` in Darwin*) glibtoolize --copy ;;
  *) libtoolize --copy ;; esac

autoheader
aclocal -I m4 --install
autoconf

automake --foreign --add-missing --force-missing --copy

EDITAR

Es posible que deba agregar ACLOCAL_AMFLAGS = -I m4 al nivel superior Makefile.am.

 3
Author: Brett Hale,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-01-11 16:44:54

El error es generado por autom4te. Si las cosas están configuradas correctamente, la porción del código que genera ese error nunca debería ver 'AC_MSG_ERROR', porque debería haber sido expandida por m4 antes de ese punto. Usted dice que el error solo ocurre "en algunas configuraciones". Yo sugeriría que en esas configuraciones, su instalación de autoconf es fubar. Posiblemente tenga instalada una versión incompatible de m4.

 2
Author: William Pursell,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-01-11 16:20:28

Usando macOS X

sudo port install pkgconfig

Era la solución!

 2
Author: Johann Horvat,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-04-22 10:28:40

En Mac OS X el capitán con brew, intente:
pkgconfig

Esto funcionó para mí.

 2
Author: us_david,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-02-19 00:56:29

Resolví esto por yum install libtool

 1
Author: VictorV,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-08-29 11:30:18

Para Debian. Los paquetes requeridos son: m4 automake pkg-config libtool

 1
Author: ETech,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-25 06:54:48

Esto me sucedió cuando olvidé a , en los argumentos para una macro definida localmente. Pasé horas tratando de averiguarlo (apenas familiarizado con autotools)...

AC_CHECK_MACRO([Foo]
    AC_LOCAL_DO([......

Debería haber sido

AC_CHECK_MACRO([Foo],      # <-- Notice comma, doh!
    AC_LOCAL_DO([......

Parece que debería haberme dado un error o algo así, pero supongo que al ser un procesador de macros solo puede hacer lo que se le dice.

 0
Author: squeegee,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-01-22 03:19:45

Tuve el mismo problema en Ubuntu (error: possibly undefined macro: AC_MSG_ERROR) pero las respuestas anteriores no funcionaron para mí. Encontré la solución aquí

Eso hizo el truco:

$ LANG=C LC_CTYPE=C ./autogen.sh
 0
Author: mschoenebeck,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-05-26 11:09:07

Mi problema se resuelve después de instalar pkg-config en Mac (brew install pkg-config)

 0
Author: Pavan Challa,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-07-12 14:32:46

Hay dos posibles razones para ese problema:

  1. No instaló aclocal.
    solución:instalar libtool

    • Para ubuntu: sudo apt-get install libtool
    • Para centos: sudo yum install libtool
  2. La ruta a LIBTOOL.m4 es un error.
    solución:

    1. use aclocal --print-ac-dir para comprobar la ruta actual a aclocal.(Normalmente debe ser "/usr/share/aclocal" o "/usr/share/aclocal")
    2. Luego verifique si hay *.archivos m4.
    3. Si no, cp correspondiente *.archivos m4 a esta ruta.(Tal vez cp /usr/share/aclocal/*.m4 /usr/local/share/aclocal/ o cp /usr/local/share/aclocal/*.m4 /usr/share/aclocal/)

Espero que ayude

 0
Author: Cifang,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-03-05 04:17:28

Tuve el mismo problema en RHEL7. 5 con otto-de/libvmod-uuid

Se solucionó instalando paquetes "autoconf-archive"

 0
Author: Sawit Meekwamdee,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-10-04 04:59:46

Tuve el mismo problema con el puerto de Macports "openocd" (modificado localmente el archivo de puerto para usar el repositorio git) en una máquina recién instalada.

La solución permanente es fácil, definir una dependencia a pkgconfig en el archivo de puerto: depends_lib-añadir puerto: pkgconfig

 -1
Author: Michael Dreher,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-12-28 16:14:13