Hello!
I got the following error while installing multiload-ng-common from AUR:
error: possibly undefined macro: AM_NLS
Found that it is by a gettext change, and other packages are also affected:
opened 06:11PM - 10 Jan 20 UTC
closed 07:06PM - 10 Jan 20 UTC
Hi,
im trying to compile but stuck when it complain about missing file on acloc… al 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✓
➤
```
opened 05:30PM - 15 Apr 20 UTC
closed 07:54AM - 22 Apr 20 UTC
outdated
- [x] ran `brew update` and can still reproduce the problem?
- [x] ran `brew do… ctor`, fixed all issues and can still reproduce the problem?
- [ ] ran `brew gist-logs <formula>` (where `<formula>` is the name of the formula that failed) and included the output link?
- [ ] if `brew gist-logs` didn't work: ran `brew config` and `brew doctor` and included their output with your issue?
## What you were trying to do (and why)
install gettext package with its autoconf macros such as AM_ICONV
## What happened (include command output)
its autoconf macros don't get installed to a location known to autotools,
even after running
```
brew link --force gettext
```
they remain in `/usr/local/opt/gettext/share/aclocal/`
## What you expected to happen
the m4 files get installed in a location known to autotools, e.g.
`/usr/local/share/aclocal/`
## Step-by-step reproduction instructions (by running `brew install` commands)
This would need a small autotools project to demonstrate an error message such as
```
configure:666666: error: possibly undefined macro: AM_ICONV
```
Running `brew link --force gettext` merely prints
```
Warning: Refusing to link macOS provided/shadowed software: gettext
If you need to have gettext first in your PATH run:
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
For compilers to find gettext you may need to set:
export LDFLAGS="-L/usr/local/opt/gettext/lib"
export CPPFLAGS="-I/usr/local/opt/gettext/include"
```
giving no clue regarding the fate of m4 files.
While one may go and manually create symlinks to the files in `/usr/local/opt/gettext/share/aclocal/` at
`/usr/local/share/aclocal/`, this ought to happen automatically.
I think it is impossible to add the new path for every package at build time.
My solution was to add
export ACLOCAL_PATH=“/usr/share/gettext/m4”
to /etc/profile.d/gettext.sh
What is the proper solution for this?
Thanx
Always check the comments .