Project

General

Profile

autoconf returns possibly undefined macro twice

Added by Davin Pearson over 7 years ago

When I run the program autoconf on a freshly installed source
code via the following command:

git clone git://github.com/audacious-media-player/audacious.git audacious

it spits out the following errors...

configure.ac:38: error: possibly undefined macro: AM_ICONV
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:43: error: possibly undefined macro: AM_GNU_GETTEXT

What gives? I have heard about other users' complaints about
GNU m4 generating hard to debug error messages.


Replies (13)

RE: autoconf returns possibly undefined macro twice - Added by Michael Schwendt over 7 years ago

The "error: possibly undefined macro" is a guess, because either the macro is undefined indeed or it's some typo.

Both macros AM_GNU_GETTEXT and AM_ICONV usually are defined within gettext.m4 and iconv.m4 in the directory /usr/share/aclocal, and as they are development related files, distribution often place them in optional packages you would need to install.

RE: autoconf returns possibly undefined macro twice - Added by John Lindgren over 7 years ago

As stated in his other thread, OP needs to run ./autogen.sh since that includes the necessary aclocal call before autoconf. Can't promise that will fix the issue, but it's a start.

RE: autoconf returns possibly undefined macro twice - Added by Michael Schwendt over 7 years ago

Usually "autoreconf", which is the tool that is included with the GNU Autoconf package, should be successful if running it once or twice.

RE: autoconf returns possibly undefined macro twice - Added by Davin Pearson over 7 years ago

Here is the result of running ./autogen.sh

www@davin-Aspire-ES1-511:~/audacious$ ./autogen.sh
configure.ac:38: warning: macro 'AM_ICONV' not found in library
configure.ac:43: warning: macro 'AM_GNU_GETTEXT' not found in library

Here is the result of running autoreconf:

www@davin-Aspire-ES1-511:~/audacious$ autoreconf
configure.ac:38: warning: macro 'AM_ICONV' not found in library
configure.ac:43: warning: macro 'AM_GNU_GETTEXT' not found in library

where do I find some code that defines AM_ICONV and AM_GNU_GETTEXT...

There is no mention of them in /usr/share/aclocal which contains
only the following files:

fontutil.m4 xtrans.m4

What gives?

RE: autoconf returns possibly undefined macro twice - Added by Michael Schwendt over 7 years ago

A "warning" is not an "error".

As pointed out before, if you still get an error when trying to recreate the "configure" script, you may need to install missing gettext related packages that include the missing m4 files. You've not told anything about your installation, though.

$ aclocal --print-ac-dir
/usr/share/aclocal

$ aclocal --verbose 2>&1|grep found|grep AM_GNU_GETTEXT
aclocal: found macro AM_GNU_GETTEXT_INTL_SUBDIR in /usr/share/aclocal/intldir.m4: 19
aclocal: found macro AM_GNU_GETTEXT in /usr/share/aclocal/gettext.m4: 57
aclocal: found macro AM_GNU_GETTEXT_NEED in /usr/share/aclocal/gettext.m4: 409
aclocal: found macro AM_GNU_GETTEXT_VERSION in /usr/share/aclocal/gettext.m4: 416
aclocal: found macro AM_GNU_GETTEXT_REQUIRE_VERSION in /usr/share/aclocal/gettext.m4: 420
aclocal: found macro AM_GNU_GETTEXT_INTL_SUBDIR in /usr/share/aclocal/intldir.m4: 19
aclocal: found macro AM_GNU_GETTEXT in /usr/share/aclocal/gettext.m4: 57
aclocal: found macro AM_GNU_GETTEXT_NEED in /usr/share/aclocal/gettext.m4: 409
aclocal: found macro AM_GNU_GETTEXT_VERSION in /usr/share/aclocal/gettext.m4: 416
aclocal: found macro AM_GNU_GETTEXT_REQUIRE_VERSION in /usr/share/aclocal/gettext.m4: 420

RE: autoconf returns possibly undefined macro twice - Added by Davin Pearson over 7 years ago

Here is the result of running ./aclocal

www@davin-Aspire-ES1-511:~/audacious$ aclocal
configure.ac:38: warning: macro 'AM_ICONV' not found in library
configure.ac:43: warning: macro 'AM_GNU_GETTEXT' not found in library

Thank you for pointing out to me that a warning is not an error.
Here is the command that I used to install audacious:

git clone git://github.com/audacious-media-player/audacious.git audacious

Here is the result of running ./configure now:

./configure: line 5968: syntax error near unexpected token `GLIB,'
./configure: line 5968: `PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32)'

RE: autoconf returns possibly undefined macro twice - Added by Michael Schwendt over 7 years ago

As these seem to be your first attempts at trying to build something from source code, you really need to install more development related packages before rebuilding Autoconf files. PKG_CHECK_MODULES is a macro that comes with the pkg-config tool:

$ aclocal --verbose 2>&1|grep found|grep PKG_CHECK_MODULES
aclocal: found macro PKG_CHECK_MODULES in /usr/share/aclocal/pkg.m4: 139
aclocal: found macro PKG_CHECK_MODULES_STATIC in /usr/share/aclocal/pkg.m4: 208
aclocal: found macro PKG_CHECK_MODULES in /usr/share/aclocal/pkg.m4: 139
aclocal: found macro PKG_CHECK_MODULES_STATIC in /usr/share/aclocal/pkg.m4: 208

$ rpm -qf /usr/share/aclocal/pkg.m4 
pkgconfig-0.29.1-1.fc25.x86_64

RE: autoconf returns possibly undefined macro twice - Added by Davin Pearson about 7 years ago

Here is what happens when I try to install pkgconfig-0.29.1-1.fc25.x86_64

root@davin-Aspire-ES1-511:/home/www# apt-get install pkgconfig-0.29.1-1.fc25.x86_64
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pkgconfig-0.29.1-1.fc25.x86_64
E: Couldn't find any package by regex 'pkgconfig-0.29.1-1.fc25.x86_64'

The command rpm is not installed in Lubuntu (the variant of GNU/Linux that I use).

Here is what happens when I try to install rpm:

root@davin-Aspire-ES1-511:/home/www# apt-get install rpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic
linux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
debugedit librpm3 librpmbuild3 librpmio3 librpmsign1 rpm-common rpm2cpio
Suggested packages:
rpm-i18n alien elfutils
The following NEW packages will be installed:
debugedit librpm3 librpmbuild3 librpmio3 librpmsign1 rpm rpm-common rpm2cpio
0 upgraded, 8 newly installed, 0 to remove and 252 not upgraded.
2 not fully installed or removed.
Need to get 440 kB of archives.
After this operation, 1,945 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://nz.archive.ubuntu.com/ubuntu/ trusty-updates/main librpmio3 i386 4.11.1-3ubuntu0.1 [67.9 kB]
Get:2 http://nz.archive.ubuntu.com/ubuntu/ trusty-updates/main debugedit i386 4.11.1-3ubuntu0.1 [15.7 kB]
Get:3 http://nz.archive.ubuntu.com/ubuntu/ trusty-updates/main librpm3 i386 4.11.1-3ubuntu0.1 [154 kB]
Get:4 http://nz.archive.ubuntu.com/ubuntu/ trusty-updates/main librpmbuild3 i386 4.11.1-3ubuntu0.1 [55.1 kB]
Get:5 http://nz.archive.ubuntu.com/ubuntu/ trusty-updates/main librpmsign1 i386 4.11.1-3ubuntu0.1 [7,900 B]
Get:6 http://nz.archive.ubuntu.com/ubuntu/ trusty-updates/main rpm-common i386 4.11.1-3ubuntu0.1 [21.5 kB]
Get:7 http://nz.archive.ubuntu.com/ubuntu/ trusty-updates/main rpm2cpio i386 4.11.1-3ubuntu0.1 [5,080 B]
Get:8 http://nz.archive.ubuntu.com/ubuntu/ trusty-updates/main rpm i386 4.11.1-3ubuntu0.1 [113 kB]
Fetched 440 kB in 3s (110 kB/s)
Selecting previously unselected package librpmio3.
(Reading database ... 222483 files and directories currently installed.)
Preparing to unpack .../librpmio3_4.11.1-3ubuntu0.1_i386.deb ...
Unpacking librpmio3 (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package debugedit.
Preparing to unpack .../debugedit_4.11.1-3ubuntu0.1_i386.deb ...
Unpacking debugedit (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package librpm3.
Preparing to unpack .../librpm3_4.11.1-3ubuntu0.1_i386.deb ...
Unpacking librpm3 (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package librpmbuild3.
Preparing to unpack .../librpmbuild3_4.11.1-3ubuntu0.1_i386.deb ...
Unpacking librpmbuild3 (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package librpmsign1.
Preparing to unpack .../librpmsign1_4.11.1-3ubuntu0.1_i386.deb ...
Unpacking librpmsign1 (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package rpm-common.
Preparing to unpack .../rpm-common_4.11.1-3ubuntu0.1_i386.deb ...
Unpacking rpm-common (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package rpm2cpio.
Preparing to unpack .../rpm2cpio_4.11.1-3ubuntu0.1_i386.deb ...
Unpacking rpm2cpio (4.11.1-3ubuntu0.1) ...
Selecting previously unselected package rpm.
Preparing to unpack .../rpm_4.11.1-3ubuntu0.1_i386.deb ...
Unpacking rpm (4.11.1-3ubuntu0.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up runit (2.1.1-6.2ubuntu3) ...
start: Unknown job: runsvdir
dpkg: error processing package runit (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:
git-daemon-run depends on runit; however:
Package runit is not configured yet.

dpkg: error processing package git-daemon-run (--configure):
dependency problems - leaving unconfigured
Setting up librpmio3 (4.11.1-3ubuntu0.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up debugedit (4.11.1-3ubuntu0.1) ...
Setting up librpm3 (4.11.1-3ubuntu0.1) ...
Setting up librpmbuild3 (4.11.1-3ubuntu0.1) ...
Setting up librpmsign1 (4.11.1-3ubuntu0.1) ...
Setting up rpm-common (4.11.1-3ubuntu0.1) ...
Setting up rpm2cpio (4.11.1-3ubuntu0.1) ...
Setting up rpm (4.11.1-3ubuntu0.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
Errors were encountered while processing:
runit
git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)

RE: autoconf returns possibly undefined macro twice - Added by Michael Schwendt about 7 years ago

Now you are seriously confused. Sorry for that. You cannot expect "apt-get install pkgconfig-0.29.1-1.fc25.x86_64" to work with Ubuntu, since the package name in the example I've shown is for Fedora 25, not for Ubuntu Linux. Trying to install RPM won't lead to much either if you're not using RPM based package repositories. You need to become familiar with Ubuntu's own way to search for tools and package names. "apt-get install pkg-config" might work.

RE: autoconf returns possibly undefined macro twice - Added by Davin Pearson about 7 years ago

Here is the result of running apt-get install pkg-config:

root@davin-Aspire-ES1-511:/home/www# apt-get install pkg-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic
linux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
pkg-config
0 upgraded, 1 newly installed, 0 to remove and 257 not upgraded.
2 not fully installed or removed.
Need to get 40.5 kB of archives.
After this operation, 131 kB of additional disk space will be used.
Get:1 http://nz.archive.ubuntu.com/ubuntu/ trusty/main pkg-config i386 0.26-1ubuntu4 [40.5 kB]
Fetched 40.5 kB in 2s (16.1 kB/s)
Selecting previously unselected package pkg-config.
(Reading database ... 222719 files and directories currently installed.)
Preparing to unpack .../pkg-config_0.26-1ubuntu4_i386.deb ...
Unpacking pkg-config (0.26-1ubuntu4) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up runit (2.1.1-6.2ubuntu3) ...
start: Unknown job: runsvdir
dpkg: error processing package runit (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:
git-daemon-run depends on runit; however:
Package runit is not configured yet.

dpkg: error processing package git-daemon-run (--configure):
dependency problems - leaving unconfigured
Setting up pkg-config (0.26-1ubuntu4) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
runit
git-daemon-run
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@davin-Aspire-ES1-511:/home/www#

Here is the result of running apt-get autoremove:

root@davin-Aspire-ES1-511:/home/www# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic
linux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-generic
0 upgraded, 0 newly installed, 4 to remove and 257 not upgraded.
2 not fully installed or removed.
After this operation, 229 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 222730 files and directories currently installed.)
Removing linux-headers-3.16.0-30-generic (3.16.0-30.40~14.04.1) ...
Removing linux-headers-3.16.0-30 (3.16.0-30.40~14.04.1) ...
Removing linux-image-extra-3.16.0-30-generic (3.16.0-30.40~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-30-generic /boot/vmlinuz-3.16.0-30-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-30-generic /boot/vmlinuz-3.16.0-30-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-30-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.0-30-generic /boot/vmlinuz-3.16.0-30-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-30-generic /boot/vmlinuz-3.16.0-30-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-30-generic /boot/vmlinuz-3.16.0-30-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.16.0-71-generic
Found initrd image: /boot/initrd.img-3.16.0-71-generic
Found linux image: /boot/vmlinuz-3.16.0-62-generic
Found initrd image: /boot/initrd.img-3.16.0-62-generic
Found linux image: /boot/vmlinuz-3.16.0-30-generic
Found initrd image: /boot/initrd.img-3.16.0-30-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Removing linux-image-3.16.0-30-generic (3.16.0-30.40~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-30-generic /boot/vmlinuz-3.16.0-30-generic
update-initramfs: Deleting /boot/initrd.img-3.16.0-30-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-30-generic /boot/vmlinuz-3.16.0-30-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.16.0-71-generic
Found initrd image: /boot/initrd.img-3.16.0-71-generic
Found linux image: /boot/vmlinuz-3.16.0-62-generic
Found initrd image: /boot/initrd.img-3.16.0-62-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
Setting up runit (2.1.1-6.2ubuntu3) ...
start: Unknown job: runsvdir
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: error processing package runit (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of git-daemon-run:
git-daemon-run depends on runit; however:
Package runit is not configured yet.

dpkg: error processing package git-daemon-run (--configure):
dependency problems - leaving unconfigured
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@davin-Aspire-ES1-511:/home/www#

RE: autoconf returns possibly undefined macro twice - Added by Michael Schwendt about 7 years ago

Have you installed packages before? How?

The errors you get related to runit and git-daemon-run are completely unrelated to the original problem. Obviously, you need a working package installer tool first.

RE: autoconf returns possibly undefined macro twice - Added by Davin Pearson about 7 years ago

I have successfully ran

(1) apt-get install emacs24, and
(2) apt-get install pdflatex

See the attached file for what happens when I try to run

(1) apt-get install runit, and
(2) apt-get install git-daemon-run

RE: autoconf returns possibly undefined macro twice - Added by Michael Schwendt about 7 years ago

root@davin-Aspire-ES1-511:/home/www# cd audacious

Those problems are completely unrelated to Audacious. No need to "cd audacious".

Anyway, you may need to consult some Ubuntu specific help.

    (1-13/13)