Ctags: build and install issue

Created on 13 Oct 2016  ·  19Comments  ·  Source: universal-ctags/ctags

When I run the autogen.sh, it failed.
The Error information are as following:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
aclocal:configure.ac:12: warning: macro `AM_SILENT_RULES' not found in library
configure.ac:210: warning: AC_ARG_PROGRAM invoked multiple times
autoreconf: configure.ac: tracing
configure.ac:210: warning: AC_ARG_PROGRAM invoked multiple times
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:210: warning: AC_ARG_PROGRAM invoked multiple times
configure.ac:12: error: possibly undefined macro: AM_SILENT_RULES
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:277: error: possibly undefined macro: AC_PROG_CC_C99
autoreconf: /usr/bin/autoconf failed with exit status: 1

Most helpful comment

I try to fllow the solution, but failed. mainly because the path is different. use the command below can print the path locally.
find /usr -name "pkg.m4" return /usr/share/aclocal/pkg.m4
aclocal --print-ac-dir return /usr/local/share/aclocal
then "cp /usr/share/aclocal/pkg.m4 /usr/local/share/aclocal" will works

All 19 comments

Do you install automake?
Could you tell me the version of autoconf?

yes
The version of autoconf is 2.59-12.
Should I update that?

Though AC_PREREQ([2.59]) is written in configure.ac, autoconf-2.63 may be needed.
Could you try newer version of autoconf?

I will make a PR for updating the line of AC_PREREQ in configure.ac.

Yes, I have updated the version of autoconf and automake.
Now the verison is autoconf-2.69, automake-1.15
But there is still error existing as following:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /.temp-tool/bin/autoconf --force
configure.ac:120: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.

Could you run the following command line and show the output?

$ /.temp-tool/bin/autoconf --force --verbose

The output in my environment is that

[yamato@x201]~/var/ctags-github% /usr/bin/autoconf --verbose --force
/usr/bin/autoconf --verbose --force
autoconf: running /usr/bin/autom4te --verbose --force --language=autoconf --output=configure configure.ac
autom4te: the trace request object is:
autom4te: $VAR1 = bless( [
autom4te:                  '1',
autom4te:                  0,
autom4te:                  [
autom4te:                    '/usr/share/autoconf'
autom4te:                  ],
autom4te:                  [
autom4te:                    '/usr/share/autoconf/autoconf/autoconf.m4f',
autom4te:                    'aclocal.m4',
autom4te:                    'configure.ac'
autom4te:                  ],
autom4te:                  {
autom4te:                    'AC_REQUIRE_AUX_FILE' => 1,
autom4te:                    'AM_SILENT_RULES' => 1,
autom4te:                    'AH_OUTPUT' => 1,
autom4te:                    'm4_pattern_allow' => 1,
autom4te:                    'AM_PROG_MOC' => 1,
autom4te:                    'AM_CONDITIONAL' => 1,
autom4te:                    'AC_CONFIG_SUBDIRS' => 1,
autom4te:                    'AM_MAINTAINER_MODE' => 1,
autom4te:                    '_m4_warn' => 1,
autom4te:                    'm4_include' => 1,
autom4te:                    'AM_ENABLE_MULTILIB' => 1,
autom4te:                    'AM_PROG_FC_C_O' => 1,
autom4te:                    'AC_DEFINE_TRACE_LITERAL' => 1,
autom4te:                    'AC_FC_PP_SRCEXT' => 1,
autom4te:                    'LT_INIT' => 1,
autom4te:                    'AM_PROG_F77_C_O' => 1,
autom4te:                    'AC_FC_PP_DEFINE' => 1,
autom4te:                    'LT_CONFIG_LTDL_DIR' => 1,
autom4te:                    'AM_MAKEFILE_INCLUDE' => 1,
autom4te:                    '_AM_COND_ENDIF' => 1,
autom4te:                    'AC_INIT' => 1,
autom4te:                    'AM_PROG_CC_C_O' => 1,
autom4te:                    'AM_NLS' => 1,
autom4te:                    'AC_CANONICAL_BUILD' => 1,
autom4te:                    'AC_CONFIG_HEADERS' => 1,
autom4te:                    '_AM_COND_ELSE' => 1,
autom4te:                    'AC_CONFIG_LIBOBJ_DIR' => 1,
autom4te:                    'AC_CANONICAL_TARGET' => 1,
autom4te:                    'AC_DEFINE' => 1,
autom4te:                    'LT_SUPPORTED_TAG' => 1,
autom4te:                    'AC_CANONICAL_HOST' => 1,
autom4te:                    'include' => 1,
autom4te:                    'AC_CONFIG_AUX_DIR' => 1,
autom4te:                    'AC_CONFIG_LINKS' => 1,
autom4te:                    'AC_CANONICAL_SYSTEM' => 1,
autom4te:                    'AC_PROG_LIBTOOL' => 1,
autom4te:                    'm4_sinclude' => 1,
autom4te:                    'AC_SUBST' => 1,
autom4te:                    'AM_XGETTEXT_OPTION' => 1,
autom4te:                    'AC_SUBST_TRACE' => 1,
autom4te:                    'AC_LIBSOURCE' => 1,
autom4te:                    'AM_INIT_AUTOMAKE' => 1,
autom4te:                    'AM_PROG_MKDIR_P' => 1,
autom4te:                    'AM_POT_TOOLS' => 1,
autom4te:                    'AC_CONFIG_FILES' => 1,
autom4te:                    'AM_EXTRA_RECURSIVE_TARGETS' => 1,
autom4te:                    'AM_PROG_CXX_C_O' => 1,
autom4te:                    'm4_pattern_forbid' => 1,
autom4te:                    '_AM_SUBST_NOTMAKE' => 1,
autom4te:                    'AM_AUTOMAKE_VERSION' => 1,
autom4te:                    'AC_FC_SRCEXT' => 1,
autom4te:                    'AM_GNU_GETTEXT' => 1,
autom4te:                    'AC_FC_FREEFORM' => 1,
autom4te:                    'AM_PATH_GUILE' => 1,
autom4te:                    'sinclude' => 1,
autom4te:                    'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
autom4te:                    '_AM_COND_IF' => 1,
autom4te:                    'AM_PROG_AR' => 1,
autom4te:                    '_LT_AC_TAGCONFIG' => 1,
autom4te:                    '_AM_MAKEFILE_INCLUDE' => 1
autom4te:                  }
autom4te:                ], 'Autom4te::Request' );
autom4te: running: /usr/bin/m4 --nesting-limit=1024 --gnu --include=/usr/share/autoconf --debug=aflq --fatal-warning --debugfile=autom4te.cache/traces.1t --trace=AC_CANONICAL_BUILD --trace=AC_CANONICAL_HOST --trace=AC_CANONICAL_SYSTEM --trace=AC_CANONICAL_TARGET --trace=AC_CONFIG_AUX_DIR --trace=AC_CONFIG_FILES --trace=AC_CONFIG_HEADERS --trace=AC_CONFIG_LIBOBJ_DIR --trace=AC_CONFIG_LINKS --trace=AC_CONFIG_SUBDIRS --trace=AC_DEFINE --trace=AC_DEFINE_TRACE_LITERAL --trace=AC_FC_FREEFORM --trace=AC_FC_PP_DEFINE --trace=AC_FC_PP_SRCEXT --trace=AC_FC_SRCEXT --trace=AC_INIT --trace=AC_LIBSOURCE --trace=AC_PROG_LIBTOOL --trace=AC_REQUIRE_AUX_FILE --trace=AC_SUBST --trace=AC_SUBST_TRACE --trace=AH_OUTPUT --trace=AM_AUTOMAKE_VERSION --trace=AM_CONDITIONAL --trace=AM_ENABLE_MULTILIB --trace=AM_EXTRA_RECURSIVE_TARGETS --trace=AM_GNU_GETTEXT --trace=AM_GNU_GETTEXT_INTL_SUBDIR --trace=AM_INIT_AUTOMAKE --trace=AM_MAINTAINER_MODE --trace=AM_MAKEFILE_INCLUDE --trace=AM_NLS --trace=AM_PATH_GUILE --trace=AM_POT_TOOLS --trace=AM_PROG_AR --trace=AM_PROG_CC_C_O --trace=AM_PROG_CXX_C_O --trace=AM_PROG_F77_C_O --trace=AM_PROG_FC_C_O --trace=AM_PROG_MKDIR_P --trace=AM_PROG_MOC --trace=AM_SILENT_RULES --trace=AM_XGETTEXT_OPTION --trace=LT_CONFIG_LTDL_DIR --trace=LT_INIT --trace=LT_SUPPORTED_TAG --trace=_AM_COND_ELSE --trace=_AM_COND_ENDIF --trace=_AM_COND_IF --trace=_AM_MAKEFILE_INCLUDE --trace=_AM_SUBST_NOTMAKE --trace=_LT_AC_TAGCONFIG --trace=_m4_warn --trace=include --trace=m4_include --trace=m4_pattern_allow --trace=m4_pattern_forbid --trace=m4_sinclude --trace=sinclude --reload-state=/usr/share/autoconf/autoconf/autoconf.m4f --undefine=__m4_version__ aclocal.m4 configure.ac > autom4te.cache/output.1t
autom4te: formatting traces for `/tmp/am4tTiZGM0/warnings': _m4_warn
autom4te: reading /tmp/am4tTiZGM0/warnings
autom4te: creating configure
autom4te: formatting traces for `/tmp/am4tTiZGM0/patterns': m4_pattern_allow, m4_pattern_forbid
autom4te: forbidden tokens: ^_?A[CHUM]_|_AC_|^LIBOBJS$|^_?m4_|^dnl$|^_?AS_|^_?PKG_[A-Z_]+$
autom4te: forbidden token : ^LIBOBJS$ => do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'
autom4te: allowed   tokens: ^AS_FLAGS$|^SHELL$|^PATH_SEPARATOR$|^PACKAGE_NAME$|^PACKAGE_TARNAME$|^PACKAGE_VERSION$|^PACKAGE_STRING$|^PACKAGE_BUGREPORT$|^PACKAGE_URL$|^exec_prefix$|^prefix$|^program_transform_name$|^bindir$|^sbindir$|^libexecdir$|^datarootdir$|^datadir$|^sysconfdir$|^sharedstatedir$|^localstatedir$|^includedir$|^oldincludedir$|^docdir$|^infodir$|^htmldir$|^dvidir$|^pdfdir$|^psdir$|^libdir$|^localedir$|^mandir$|^PACKAGE_NAME$|^PACKAGE_TARNAME$|^PACKAGE_VERSION$|^PACKAGE_STRING$|^PACKAGE_BUGREPORT$|^PACKAGE_URL$|^DEFS$|^ECHO_C$|^ECHO_N$|^ECHO_T$|^LIBS$|^build_alias$|^host_alias$|^target_alias$|^AM_[A-Z]+FLAGS$|^INSTALL_PROGRAM$|^INSTALL_SCRIPT$|^INSTALL_DATA$|^am__isrc$|^CYGPATH_W$|^PACKAGE$|^VERSION$|^PACKAGE$|^VERSION$|^ACLOCAL$|^AUTOCONF$|^AUTOMAKE$|^AUTOHEADER$|^MAKEINFO$|^install_sh$|^STRIP$|^INSTALL_STRIP_PROGRAM$|^MKDIR_P$|^mkdir_p$|^AWK$|^SET_MAKE$|^am__leading_dot$|^AMTAR$|^am__tar$|^am__untar$|^AM_V$|^AM_DEFAULT_V$|^AM_DEFAULT_VERBOSITY$|^AM_BACKSLASH$|^AM_V$|^AM_DEFAULT_V$|^AM_DEFAULT_VERBOSITY$|^AM_BACKSLASH$|^build$|^build_cpu$|^build_vendor$|^build_os$|^host$|^host_cpu$|^host_vendor$|^host_os$|^DEFAULT_FILE_FORMAT$|^DEFAULT_FILE_FORMAT$|^pkgsysconfdir$|^pkglibexecdir$|^INSTALL_LIB_TRUE$|^INSTALL_LIB_FALSE$|^INSTALL_ETAGS_TRUE$|^INSTALL_ETAGS_FALSE$|^USE_READCMD_TRUE$|^USE_READCMD_FALSE$|^CTAGS_NAME_EXECUTABLE$|^ETAGS_NAME_EXECUTABLE$|^ETAGS$|^CUSTOM_CONFIGURATION_FILE$|^MACROS_USE_PATTERNS$|^ENABLE_DEBUGGING_TRUE$|^ENABLE_DEBUGGING_FALSE$|^CC$|^CFLAGS$|^LDFLAGS$|^LIBS$|^CPPFLAGS$|^CC$|^CC$|^CC$|^CC$|^ac_ct_CC$|^EXEEXT$|^OBJEXT$|^DEPDIR$|^am__include$|^am__quote$|^AMDEP_TRUE$|^AMDEP_FALSE$|^AMDEPBACKSLASH$|^am__nodep$|^CCDEPMODE$|^am__fastdepCC_TRUE$|^am__fastdepCC_FALSE$|^REAL_CC$|^CGCC_CFLAGS$|^COVERAGE_CFLAGS$|^COVERAGE_LDFLAGS$|^LN_S$|^STRIP$|^_FILE_OFFSET_BITS$|^_LARGE_FILES$|^perl_found$|^RUN_OPTLIB2C_TRUE$|^RUN_OPTLIB2C_FALSE$|^RST2MAN$|^HAVE_RST2MAN_TRUE$|^HAVE_RST2MAN_FALSE$|^GIT$|^BUILD_IN_GIT_REPO_TRUE$|^BUILD_IN_GIT_REPO_FALSE$|^TMPDIR$|^CASE_INSENSITIVE_FILENAMES$|^sort_found$|^EXTERNAL_SORT$|^CPP$|^CPPFLAGS$|^CPP$|^GREP$|^EGREP$|^STDC_HEADERS$|^L_tmpnam$|^INT_MAX$|^INT_MAX$|^size_t$|^off_t$|^fpos_t$|^clock_t$|^HAVE_STDBOOL_H$|^USE_STDBOOL_H$|^HAVE__BOOL$|^bool$|^bool$|^true$|^false$|^const$|^MSDOS_STYLE_PATH$|^HAVE_STAT_ST_INO$|^EXTRA_CPPFLAGS$|^DEBUG_CPPFLAGS$|^EXTRA_CFLAGS$|^WARNING_CFLAGS$|^HAVE_FNMATCH$|^LIBOBJS$|^HAVE_FNMATCH$|^FNMATCH_CPPFLAGS$|^HAVE_FNMATCH_H$|^HAVE_FNMATCH_TRUE$|^HAVE_FNMATCH_FALSE$|^HAVE_STRSTR$|^HAVE_FGETPOS$|^HAVE_MKSTEMP$|^HAVE_TEMPNAM$|^HAVE_CHMOD$|^HAVE_STRERROR$|^remove$|^HAVE_REMOVE$|^HAVE_TRUNCATE$|^HAVE_FTRUNCATE$|^HAVE_CHSIZE$|^HAVE_SETENV$|^HAVE_PUTENV$|^NON_CONST_PUTENV_PROTOTYPE$|^HAVE_REGCOMP$|^CHECK_REGCOMP$|^LIBOBJS$|^HAVE_REGCOMP$|^REGCOMP_CPPFLAGS$|^HAVE_REGCOMP_TRUE$|^HAVE_REGCOMP_FALSE$|^HAVE_SCANDIR$|^ENABLE_XCMD_TRUE$|^ENABLE_XCMD_FALSE$|^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$|^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$|^PKG_CONFIG$|^PKG_CONFIG_PATH$|^PKG_CONFIG_LIBDIR$|^PKG_CONFIG$|^LIBXML_CFLAGS$|^LIBXML_LIBS$|^HAVE_LIBXML$|^HAVE_LIBXML_TRUE$|^HAVE_LIBXML_FALSE$|^JANSSON_CFLAGS$|^JANSSON_LIBS$|^HAVE_JANSSON$|^HAVE_JANSSON_TRUE$|^HAVE_JANSSON_FALSE$|^LIBYAML_CFLAGS$|^LIBYAML_LIBS$|^HAVE_LIBYAML$|^HAVE_LIBYAML_TRUE$|^HAVE_LIBYAML_FALSE$|^NEED_PROTO_REMOVE$|^NEED_PROTO_UNLINK$|^NEED_PROTO_MALLOC$|^NEED_PROTO_GETENV$|^NEED_PROTO_STAT$|^NEED_PROTO_LSTAT$|^NEED_PROTO_FGETPOS$|^NEED_PROTO_TRUNCATE$|^NEED_PROTO_FTRUNCATE$|^HAVE_ICONV$|^HAVE_ICONV$|^HAVE_DECL___ENVIRON$|^HAVE_DECL__NSGETENVIRON$|^HAVE_MBLEN$|^LIBOBJS$|^LTLIBOBJS$|^am__EXEEXT_TRUE$|^am__EXEEXT_FALSE$|^PKGSYSCONFDIR$|^PKGLIBEXECDIR$

This is my output.

bash-3.2$ /.temp-tool/bin/autoconf --force --verbose
autoconf: running /.temp-tool/bin/autom4te --force --verbose --language=autoconf --output=configure configure.ac
autom4te: the trace request object is:
autom4te: $VAR1 = bless( [
autom4te:                  '1',
autom4te:                  0,
autom4te:                  [
autom4te:                    '/.temp-tool/share/autoconf'
autom4te:                  ],
autom4te:                  [
autom4te:                    '/.temp-tool/share/autoconf/autoconf/autoconf.m4f',
autom4te:                    'aclocal.m4',
autom4te:                    'configure.ac'
autom4te:                  ],
autom4te:                  {
autom4te:                    'AM_PROG_F77_C_O' => 1,
autom4te:                    '_LT_AC_TAGCONFIG' => 1,
autom4te:                    'AC_INIT' => 1,
autom4te:                    'm4_pattern_forbid' => 1,
autom4te:                    'AC_CANONICAL_TARGET' => 1,
autom4te:                    '_AM_COND_IF' => 1,
autom4te:                    'AC_CONFIG_LIBOBJ_DIR' => 1,
autom4te:                    'AC_SUBST' => 1,
autom4te:                    'AC_CANONICAL_HOST' => 1,
autom4te:                    'AC_FC_SRCEXT' => 1,
autom4te:                    'AC_PROG_LIBTOOL' => 1,
autom4te:                    'AM_INIT_AUTOMAKE' => 1,
autom4te:                    'AC_CONFIG_SUBDIRS' => 1,
autom4te:                    'AM_PATH_GUILE' => 1,
autom4te:                    'AM_AUTOMAKE_VERSION' => 1,
autom4te:                    'LT_CONFIG_LTDL_DIR' => 1,
autom4te:                    'AC_CONFIG_LINKS' => 1,
autom4te:                    'AC_REQUIRE_AUX_FILE' => 1,
autom4te:                    'LT_SUPPORTED_TAG' => 1,
autom4te:                    'm4_sinclude' => 1,
autom4te:                    'AM_MAINTAINER_MODE' => 1,
autom4te:                    'AM_NLS' => 1,
autom4te:                    'AC_FC_PP_DEFINE' => 1,
autom4te:                    'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
autom4te:                    '_m4_warn' => 1,
autom4te:                    'AM_MAKEFILE_INCLUDE' => 1,
autom4te:                    'AM_PROG_CXX_C_O' => 1,
autom4te:                    '_AM_MAKEFILE_INCLUDE' => 1,
autom4te:                    '_AM_COND_ENDIF' => 1,
autom4te:                    'AM_ENABLE_MULTILIB' => 1,
autom4te:                    'AM_SILENT_RULES' => 1,
autom4te:                    'AM_PROG_MOC' => 1,
autom4te:                    'AC_CONFIG_FILES' => 1,
autom4te:                    'include' => 1,
autom4te:                    'LT_INIT' => 1,
autom4te:                    'AM_GNU_GETTEXT' => 1,
autom4te:                    'AM_PROG_AR' => 1,
autom4te:                    'AC_LIBSOURCE' => 1,
autom4te:                    'AC_CANONICAL_BUILD' => 1,
autom4te:                    'AM_PROG_FC_C_O' => 1,
autom4te:                    'AC_FC_FREEFORM' => 1,
autom4te:                    'AC_FC_PP_SRCEXT' => 1,
autom4te:                    'AH_OUTPUT' => 1,
autom4te:                    'AC_CONFIG_AUX_DIR' => 1,
autom4te:                    '_AM_SUBST_NOTMAKE' => 1,
autom4te:                    'm4_pattern_allow' => 1,
autom4te:                    'AM_PROG_CC_C_O' => 1,
autom4te:                    'sinclude' => 1,
autom4te:                    'AM_CONDITIONAL' => 1,
autom4te:                    'AC_CANONICAL_SYSTEM' => 1,
autom4te:                    'AM_XGETTEXT_OPTION' => 1,
autom4te:                    'AC_CONFIG_HEADERS' => 1,
autom4te:                    'AC_DEFINE_TRACE_LITERAL' => 1,
autom4te:                    'AM_POT_TOOLS' => 1,
autom4te:                    'm4_include' => 1,
autom4te:                    '_AM_COND_ELSE' => 1,
autom4te:                    'AC_SUBST_TRACE' => 1
autom4te:                  }
autom4te:                ], 'Autom4te::Request' );
autom4te: running: /usr/bin/m4 --nesting-limit=1024  --include=/.temp-tool/share/autoconf --debug=aflq --fatal-warning --error-output=autom4te.cache/traces.1t --trace=AC_CANONICAL_BUILD --trace=AC_CANONICAL_HOST --trace=AC_CANONICAL_SYSTEM --trace=AC_CANONICAL_TARGET --trace=AC_CONFIG_AUX_DIR --trace=AC_CONFIG_FILES --trace=AC_CONFIG_HEADERS --trace=AC_CONFIG_LIBOBJ_DIR --trace=AC_CONFIG_LINKS --trace=AC_CONFIG_SUBDIRS --trace=AC_DEFINE_TRACE_LITERAL --trace=AC_FC_FREEFORM --trace=AC_FC_PP_DEFINE --trace=AC_FC_PP_SRCEXT --trace=AC_FC_SRCEXT --trace=AC_INIT --trace=AC_LIBSOURCE --trace=AC_PROG_LIBTOOL --trace=AC_REQUIRE_AUX_FILE --trace=AC_SUBST --trace=AC_SUBST_TRACE --trace=AH_OUTPUT --trace=AM_AUTOMAKE_VERSION --trace=AM_CONDITIONAL --trace=AM_ENABLE_MULTILIB --trace=AM_GNU_GETTEXT --trace=AM_GNU_GETTEXT_INTL_SUBDIR --trace=AM_INIT_AUTOMAKE --trace=AM_MAINTAINER_MODE --trace=AM_MAKEFILE_INCLUDE --trace=AM_NLS --trace=AM_PATH_GUILE --trace=AM_POT_TOOLS --trace=AM_PROG_AR --trace=AM_PROG_CC_C_O --trace=AM_PROG_CXX_C_O --trace=AM_PROG_F77_C_O --trace=AM_PROG_FC_C_O --trace=AM_PROG_MOC --trace=AM_SILENT_RULES --trace=AM_XGETTEXT_OPTION --trace=LT_CONFIG_LTDL_DIR --trace=LT_INIT --trace=LT_SUPPORTED_TAG --trace=_AM_COND_ELSE --trace=_AM_COND_ENDIF --trace=_AM_COND_IF --trace=_AM_MAKEFILE_INCLUDE --trace=_AM_SUBST_NOTMAKE --trace=_LT_AC_TAGCONFIG --trace=_m4_warn --trace=include --trace=m4_include --trace=m4_pattern_allow --trace=m4_pattern_forbid --trace=m4_sinclude --trace=sinclude --reload-state=/.temp-tool/share/autoconf/autoconf/autoconf.m4f --undefine=__m4_version__ aclocal.m4 configure.ac > autom4te.cache/output.1t
autom4te: formatting traces for `/tmp/am4ton4825/warnings': _m4_warn
autom4te: reading /tmp/am4ton4825/warnings
autom4te: creating configure
autom4te: formatting traces for `/tmp/am4ton4825/patterns': m4_pattern_allow, m4_pattern_forbid
autom4te: forbidden tokens: ^_?A[CHUM]_|_AC_|^LIBOBJS$|^_?m4_|^dnl$|^_?AS_
autom4te: forbidden token : ^LIBOBJS$ => do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'
autom4te: allowed   tokens: ^AS_FLAGS$|^SHELL$|^PATH_SEPARATOR$|^PACKAGE_NAME$|^PACKAGE_TARNAME$|^PACKAGE_VERSION$|^PACKAGE_STRING$|^PACKAGE_BUGREPORT$|^PACKAGE_URL$|^exec_prefix$|^prefix$|^program_transform_name$|^bindir$|^sbindir$|^libexecdir$|^datarootdir$|^datadir$|^sysconfdir$|^sharedstatedir$|^localstatedir$|^includedir$|^oldincludedir$|^docdir$|^infodir$|^htmldir$|^dvidir$|^pdfdir$|^psdir$|^libdir$|^localedir$|^mandir$|^PACKAGE_NAME$|^PACKAGE_TARNAME$|^PACKAGE_VERSION$|^PACKAGE_STRING$|^PACKAGE_BUGREPORT$|^PACKAGE_URL$|^DEFS$|^ECHO_C$|^ECHO_N$|^ECHO_T$|^LIBS$|^build_alias$|^host_alias$|^target_alias$|^AM_[A-Z]+FLAGS$|^INSTALL_PROGRAM$|^INSTALL_SCRIPT$|^INSTALL_DATA$|^am__isrc$|^CYGPATH_W$|^PACKAGE$|^VERSION$|^PACKAGE$|^VERSION$|^ACLOCAL$|^AUTOCONF$|^AUTOMAKE$|^AUTOHEADER$|^MAKEINFO$|^install_sh$|^STRIP$|^INSTALL_STRIP_PROGRAM$|^MKDIR_P$|^mkdir_p$|^AWK$|^SET_MAKE$|^am__leading_dot$|^AMTAR$|^am__tar$|^am__untar$|^AM_V$|^AM_DEFAULT_V$|^AM_DEFAULT_VERBOSITY$|^AM_BACKSLASH$|^AM_V$|^AM_DEFAULT_V$|^AM_DEFAULT_VERBOSITY$|^AM_BACKSLASH$|^build$|^build_cpu$|^build_vendor$|^build_os$|^host$|^host_cpu$|^host_vendor$|^host_os$|^DEFAULT_FILE_FORMAT$|^DEFAULT_FILE_FORMAT$|^pkgsysconfdir$|^pkglibexecdir$|^INSTALL_LIB_TRUE$|^INSTALL_LIB_FALSE$|^INSTALL_ETAGS_TRUE$|^INSTALL_ETAGS_FALSE$|^USE_READCMD_TRUE$|^USE_READCMD_FALSE$|^CTAGS_NAME_EXECUTABLE$|^ETAGS_NAME_EXECUTABLE$|^ETAGS$|^CUSTOM_CONFIGURATION_FILE$|^MACROS_USE_PATTERNS$|^ENABLE_DEBUGGING_TRUE$|^ENABLE_DEBUGGING_FALSE$|^CC$|^CFLAGS$|^LDFLAGS$|^LIBS$|^CPPFLAGS$|^CC$|^CC$|^CC$|^CC$|^ac_ct_CC$|^EXEEXT$|^OBJEXT$|^DEPDIR$|^am__include$|^am__quote$|^AMDEP_TRUE$|^AMDEP_FALSE$|^AMDEPBACKSLASH$|^am__nodep$|^CCDEPMODE$|^am__fastdepCC_TRUE$|^am__fastdepCC_FALSE$|^REAL_CC$|^CGCC_CFLAGS$|^COVERAGE_CFLAGS$|^COVERAGE_LDFLAGS$|^LN_S$|^STRIP$|^_FILE_OFFSET_BITS$|^_LARGE_FILES$|^perl_found$|^RUN_OPTLIB2C_TRUE$|^RUN_OPTLIB2C_FALSE$|^RST2MAN$|^HAVE_RST2MAN_TRUE$|^HAVE_RST2MAN_FALSE$|^GIT$|^BUILD_IN_GIT_REPO_TRUE$|^BUILD_IN_GIT_REPO_FALSE$|^TMPDIR$|^CASE_INSENSITIVE_FILENAMES$|^sort_found$|^EXTERNAL_SORT$|^CPP$|^CPPFLAGS$|^CPP$|^GREP$|^EGREP$|^STDC_HEADERS$|^L_tmpnam$|^INT_MAX$|^INT_MAX$|^size_t$|^off_t$|^fpos_t$|^clock_t$|^HAVE_STDBOOL_H$|^USE_STDBOOL_H$|^HAVE__BOOL$|^bool$|^bool$|^true$|^false$|^const$|^MSDOS_STYLE_PATH$|^HAVE_STAT_ST_INO$|^EXTRA_CPPFLAGS$|^DEBUG_CPPFLAGS$|^EXTRA_CFLAGS$|^WARNING_CFLAGS$|^HAVE_FNMATCH$|^LIBOBJS$|^HAVE_FNMATCH$|^FNMATCH_CPPFLAGS$|^HAVE_FNMATCH_H$|^HAVE_FNMATCH_TRUE$|^HAVE_FNMATCH_FALSE$|^HAVE_STRSTR$|^HAVE_FGETPOS$|^HAVE_MKSTEMP$|^HAVE_TEMPNAM$|^HAVE_CHMOD$|^HAVE_STRERROR$|^remove$|^HAVE_REMOVE$|^HAVE_TRUNCATE$|^HAVE_FTRUNCATE$|^HAVE_CHSIZE$|^HAVE_SETENV$|^HAVE_PUTENV$|^NON_CONST_PUTENV_PROTOTYPE$|^HAVE_REGCOMP$|^CHECK_REGCOMP$|^LIBOBJS$|^HAVE_REGCOMP$|^REGCOMP_CPPFLAGS$|^HAVE_REGCOMP_TRUE$|^HAVE_REGCOMP_FALSE$|^HAVE_SCANDIR$|^ENABLE_XCMD_TRUE$|^ENABLE_XCMD_FALSE$|^HAVE_LIBXML_TRUE$|^HAVE_LIBXML_FALSE$|^HAVE_JANSSON_TRUE$|^HAVE_JANSSON_FALSE$|^HAVE_LIBYAML_TRUE$|^HAVE_LIBYAML_FALSE$|^NEED_PROTO_REMOVE$|^NEED_PROTO_UNLINK$|^NEED_PROTO_MALLOC$|^NEED_PROTO_GETENV$|^NEED_PROTO_STAT$|^NEED_PROTO_LSTAT$|^NEED_PROTO_FGETPOS$|^NEED_PROTO_TRUNCATE$|^NEED_PROTO_FTRUNCATE$|^HAVE_ICONV$|^HAVE_ICONV$|^HAVE_DECL___ENVIRON$|^HAVE_DECL__NSGETENVIRON$|^HAVE_MBLEN$|^LIBOBJS$|^LTLIBOBJS$|^am__EXEEXT_TRUE$|^am__EXEEXT_FALSE$|^PKGSYSCONFDIR$|^PKGLIBEXECDIR$
configure.ac:120: error: possibly undefined macro: AC_DEFINE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

...Hmm

Could you retry after removing autom4te.cache directory?

I have a try again.
And the result is the same...

What kind of OS do you use? Is there a docker container image for the OS is avaiable?

I should inspect where AC_DEFINE comes from if autoconf works fine. However, I cannot find time for doing it know.

ctags itself supports m4 and autoconf so, I must find the definition of AC_DEFINE quickly:-P.

The OS is RHEL 5.7

The OS is RHEL 5.7

Oh, I see. I will try to reproduce the issue.

I guess you may have a directory /.temp-tool/share/aclocal or /.temp-tool/share/aclocal-1.11.
Copy /usr/share/aclocal/pkg.m4 to the directory (/.temp-tool/share/aclocal or /.temp-tool/share/aclocal-1.11). Then run autogen.sh again.

I used following Dockerfile to inspect this issue.

FROM docker.io/centos:centos5

RUN yum -y install m4 perl make wget pkgconfig gcc make which

ENV AUTOCONF_VERSION 2.63
ENV AUTOMAKE_VERSION 1.11
RUN wget http://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.gz
RUN tar zxvf autoconf-${AUTOCONF_VERSION}.tar.gz
RUN cd autoconf-${AUTOCONF_VERSION} && ./configure && make && make install

RUN wget http://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.gz
RUN tar zxvf automake-${AUTOMAKE_VERSION}.tar.gz
RUN cd automake-${AUTOMAKE_VERSION} && PATH=/usr/local/bin:$PATH ./configure && make && make install

RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
RUN yum -y install git

RUN git clone https://github.com/universal-ctags/ctags.git
RUN ln -s /usr/share/aclocal/pkg.m4 /usr/local/share/aclocal-1.11/pkg.m4
RUN cd ctags && PATH=/usr/local/bin:$PATH bash ./autogen.sh && ./configure && make && ./ctags --version

Thank you very much.☺
According to your way, the configure file is created after running autogen.sh.

However, when I run the command make, another issue appears.

parsers/plist.c: In function ‘getPrevKeyElement’:
parsers/plist.c:83:2: warning: implicit declaration of function ‘xmlPreviousElementSibling’
parsers/plist.c:83:7: warning: assignment makes pointer from integer without a cast
  CC       parsers/ctags-relaxng.o
  CC       parsers/ctags-xslt.o
  CC       main/ctags-debug.o
  CCLD     ctags
parsers/ctags-plist.o: In function `getPrevKeyElement':
/.uctags/ctags/parsers/plist.c:83: undefined reference to `xmlPreviousElementSibling'
collect2: ld returned 1 exit status
make[1]: *** [ctags] Error 1
make[1]: Leaving directory `/.uctags/ctags'
make: *** [all] Error 2

And as I know, 'xmlPreviousElementSibling' is related to the libxml2.
Then I opened the Makefile, and saw the following define in it.

LIBXML_CFLAGS = -I/usr/include/libxml2  

But in my system environment, the libxml2 is not installed.
So I installed the libxml2 in the path(/.libxml2).
Then run the configure again by using the following command

configure --prefix=/.utags/bin/ LIBXML_CFLAGS=-I/.libxml2/include/libxml2

After the Makefile is generated, I check that the LIBXML_CFLAGS is updated.
However, when I run the make command, the error is the same.
So I'm a litte confused, can you help me with this? Thanks again.

It seems that xmlPreviousElementSibling is not available in libxml2 of RHEL5.
(I must add code to check the existence of the function to configure. I will make PR.)

Do you install libxml2-devel package?
If yes, remove it and run configure without LIBXML_CFLAGS=-I/.libxml2/include/libxml2.

It works successfully now.
Thank you very much.

I try to fllow the solution, but failed. mainly because the path is different. use the command below can print the path locally.
find /usr -name "pkg.m4" return /usr/share/aclocal/pkg.m4
aclocal --print-ac-dir return /usr/local/share/aclocal
then "cp /usr/share/aclocal/pkg.m4 /usr/local/share/aclocal" will works

The solution I showed is really wrong.
If you use Autotools from manually or via distro repository, you should install pkg-config in the same way.

@zhanghlHUST, your system has /usr/local/share/aclocal. As far as my knowledge based on experiences on Fedora, It implies you installed automake manually. In other hand, pkg.m4 is installed to /usr/share/aclocal. It implies you installed pkg-config (or pkg-config-m4) distro package. The gap between the ways to install cause the trouble.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jayceekay picture jayceekay  ·  13Comments

JulienPivard picture JulienPivard  ·  16Comments

EvanCarroll picture EvanCarroll  ·  14Comments

blueyed picture blueyed  ·  4Comments

cweagans picture cweagans  ·  13Comments