You are not logged in.

#1 2021-05-15 22:31:14

loqs
Member
Registered: 2014-03-06
Posts: 17,913

[SOLVED] nemiver error: possibly undefined macro: PKG_CHECK_EXISTS

Building nemiver from the trunk PKGBUILD in a clean fails during prepare with the output below

/usr/bin/gnome-autogen.sh
***Warning*** PKG_NAME is deprecated, you may remove it from autogen.sh
configure.ac:18: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:18: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:18: the top level
configure.ac:91: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:91: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:91: the top level
[1mchecking for automake >= 1.11.2...
(B[m  testing automake... found 1.16.3
[1mchecking for autoreconf >= 2.53...
(B[m  testing autoreconf... found 2.71
configure.ac:18: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:18: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:18: the top level
configure.ac:91: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:91: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:91: the top level
[1mchecking for glib-gettext >= 2.2.0...
(B[m  testing glib-gettextize... found 2.68.2
[1mchecking for intltool >= 0.25...
(B[m  testing intltoolize... found 0.51.0
[1mchecking for pkg-config >= 0.14.0...
(B[m  testing pkg-config... found 1.7.3
[1mChecking for required M4 macros...
(B[m[1mProcessing ./configure.ac
(B[mconfigure.ac:18: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:18: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:18: the top level
configure.ac:91: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:91: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:91: the top level
[1mRunning glib-gettextize... Ignore non-fatal messages.
(B[mCopying file po/Makefile.in.in

Please add the files
  codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
  progtest.m4
from the /usr/share/aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.gnu.org/pub/gnu/config/.

[1mRunning intltoolize...
(B[m[1mRunning autoreconf...
(B[mautoreconf: export WARNINGS=no-portability
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: intltoolize --copy --force
You should update your 'aclocal.m4' by running aclocal.
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS}
autoreconf: running: /usr/bin/autoconf --force
configure.ac:18: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:18: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:18: the top level
configure.ac:91: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:91: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:91: the top level
configure.ac:117: warning: The macro `GLIB_GNU_GETTEXT' is obsolete.
configure.ac:117: You should run autoupdate.
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:488: AM_GLIB_GNU_GETTEXT is expanded from...
configure.ac:117: the top level
configure.ac:117: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:117: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
aclocal.m4:73: GLIB_LC_MESSAGES is expanded from...
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:488: AM_GLIB_GNU_GETTEXT is expanded from...
configure.ac:117: the top level
configure.ac:117: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:117: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/headers.m4:89: _AC_CHECK_HEADER_COMPILE is expanded from...
./lib/autoconf/headers.m4:56: AC_CHECK_HEADER is expanded from...
aclocal.m4:172: GLIB_WITH_NLS is expanded from...
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:488: AM_GLIB_GNU_GETTEXT is expanded from...
configure.ac:117: the top level
configure.ac:117: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:117: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/headers.m4:89: _AC_CHECK_HEADER_COMPILE is expanded from...
./lib/autoconf/headers.m4:56: AC_CHECK_HEADER is expanded from...
aclocal.m4:172: GLIB_WITH_NLS is expanded from...
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:488: AM_GLIB_GNU_GETTEXT is expanded from...
configure.ac:117: the top level
configure.ac:117: warning: The macro `AC_OUTPUT_COMMANDS' is obsolete.
configure.ac:117: You should run autoupdate.
./lib/autoconf/status.m4:1025: AC_OUTPUT_COMMANDS is expanded from...
aclocal.m4:172: GLIB_WITH_NLS is expanded from...
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:488: AM_GLIB_GNU_GETTEXT is expanded from...
configure.ac:117: the top level
configure.ac:185: error: possibly undefined macro: PKG_CHECK_EXISTS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /usr/bin/autoconf failed with exit status: 1

PKG_CHECK_EXISTS is defined in the generated aclocal.m4

grep PKG_CHECK_EXISTS aclocal.m4 
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
    PKG_CHECK_EXISTS([$3],

I could bypass the issue by switching to a tarball that contains ./configure but I am interested in what is causing the issue.
Edit:
The cause could not be located so the PKGBUILD switched to building from a tarball with nemiver 0.9.6-9.

Last edited by loqs (2021-05-26 05:27:20)

Offline

#2 2023-05-10 11:53:01

illwieckz
Member
Registered: 2023-05-10
Posts: 1

Re: [SOLVED] nemiver error: possibly undefined macro: PKG_CHECK_EXISTS

This worked for me but then, other errors occurs:

diff --git a/configure.ac b/configure.ac
index edee34ad..6310ff68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,8 @@ m4_define([nmv_version_minor], [9])
 m4_define([nmv_version_micro], [6])
 m4_define([nmv_version], [nmv_version_major.nmv_version_minor.nmv_version_micro])
 
+m4_pattern_allow([PKG_CHECK_EXISTS])
+
 AC_INIT([nemiver],[nmv_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=nemiver],[nemiver],[https://wiki.gnome.org/Apps/Nemiver])
 
 AC_PREREQ([2.71])
$ autoreconf -vi
$ ./configure
./configure: line 11577: syntax error near unexpected token `('
./configure: line 11577: `	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`''

Offline

#3 2023-05-10 15:02:49

loqs
Member
Registered: 2014-03-06
Posts: 17,913

Re: [SOLVED] nemiver error: possibly undefined macro: PKG_CHECK_EXISTS

With the current https://aur.archlinux.org/packages/nemiver I encounter https://aur.archlinux.org/packages/nemi … ent-895442 which is expected as ghex now provides gtkhex-4.pc following a major version update.

Offline

Board footer

Powered by FluxBB