Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't autoreconf polkit-0.115 without nls.m4 in /usr/share/aclocal #27

Closed
awilfox opened this issue Jul 11, 2018 · 8 comments
Closed

Can't autoreconf polkit-0.115 without nls.m4 in /usr/share/aclocal #27

awilfox opened this issue Jul 11, 2018 · 8 comments

Comments

@awilfox
Copy link
Contributor

awilfox commented Jul 11, 2018

With stock gettext-tiny, and the .m4 files in /usr/share/gettext-tiny/m4:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
configure.ac:521: 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:521: the top level
configure.ac:521: warning: AM_NLS is m4_require'd but not m4_defun'd
buildutil/intltool.m4:27: IT_PROG_INTLTOOL is expanded from...
configure.ac:521: the top level
autoreconf: configure.ac: tracing
configure.ac:521: warning: AM_NLS is m4_require'd but not m4_defun'd
buildutil/intltool.m4:27: IT_PROG_INTLTOOL is expanded from...
configure.ac:521: the top level
autoreconf: configure.ac: adding subdirectory test/mocklibc to autoreconf
autoreconf: Entering directory `test/mocklibc'
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:11: installing './compile'
configure.ac:8: installing './missing'
src/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `test/mocklibc'
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'buildutil'.
libtoolize: copying file 'buildutil/libtool.m4'
libtoolize: copying file 'buildutil/ltoptions.m4'
libtoolize: copying file 'buildutil/ltsugar.m4'
libtoolize: copying file 'buildutil/ltversion.m4'
libtoolize: copying file 'buildutil/lt~obsolete.m4'
libtoolize: Consider adding '-I buildutil' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:521: 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:521: the top level
configure.ac:521: warning: AM_NLS is m4_require'd but not m4_defun'd
buildutil/intltool.m4:27: IT_PROG_INTLTOOL is expanded from...
configure.ac:521: the top level
configure.ac:521: warning: AM_NLS is m4_require'd but not m4_defun'd
buildutil/intltool.m4:27: IT_PROG_INTLTOOL is expanded from...
configure.ac:521: the top level
configure:19500: error: possibly undefined macro: AM_NLS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

If I copy /usr/share/gettext-tiny/m4/nls.m4 to /usr/share/aclocal/nls.m4, it works correctly:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: adding subdirectory test/mocklibc to autoreconf
autoreconf: Entering directory `test/mocklibc'
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:11: installing './compile'
configure.ac:8: installing './missing'
src/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `test/mocklibc'
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'buildutil'.
libtoolize: copying file 'buildutil/libtool.m4'
libtoolize: copying file 'buildutil/ltoptions.m4'
libtoolize: copying file 'buildutil/ltsugar.m4'
libtoolize: copying file 'buildutil/ltversion.m4'
libtoolize: copying file 'buildutil/lt~obsolete.m4'
libtoolize: Consider adding '-I buildutil' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:26: installing './compile'
configure.ac:5: installing './missing'
src/examples/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'

This is the first failure of this kind, in about 600 packages.

@xhebox
Copy link
Collaborator

xhebox commented Jul 11, 2018

i am not fimiliar with autoxxx. But running autogen.sh with polkit 0.114 seems fine. autopoint will copy all m4 files in to ./m4, but that did not work out this problem.

Any idea, @rofl0r ?

@rofl0r
Copy link
Member

rofl0r commented Jul 11, 2018

does the real gettext copy nls.m4 to /usr/share/aclocal/nls.m4 ? if so maybe we should too.

@awilfox
Copy link
Contributor Author

awilfox commented Jul 12, 2018

Yes, actually:

awilcox on elaine /usr/src $ tar tzf /srv/alpha4/system/ppc/gettext-dev-0.19.8.1-r1.apk
usr/
usr/share/
usr/share/aclocal/
usr/share/aclocal/stdint_h.m4
usr/share/aclocal/wint_t.m4
usr/share/aclocal/printf-posix.m4
usr/share/aclocal/nls.m4
usr/share/aclocal/xsize.m4
usr/share/aclocal/lock.m4
usr/share/aclocal/glibc21.m4
usr/share/aclocal/intlmacosx.m4
usr/share/aclocal/lib-ld.m4
usr/share/aclocal/fcntl-o.m4
usr/share/aclocal/gettext.m4
usr/share/aclocal/progtest.m4
usr/share/aclocal/extern-inline.m4
usr/share/aclocal/po.m4
usr/share/aclocal/inttypes-pri.m4
usr/share/aclocal/inttypes_h.m4
usr/share/aclocal/intl.m4
usr/share/aclocal/intmax.m4
usr/share/aclocal/uintmax_t.m4
usr/share/aclocal/visibility.m4
usr/share/aclocal/lib-prefix.m4
usr/share/aclocal/intldir.m4
usr/share/aclocal/lcmessage.m4
usr/share/aclocal/size_max.m4
usr/share/aclocal/codeset.m4
usr/share/aclocal/wchar_t.m4
usr/share/aclocal/iconv.m4
usr/share/aclocal/lib-link.m4
usr/share/aclocal/threadlib.m4
usr/share/aclocal/longlong.m4
usr/share/aclocal/glibc2.m4
usr/share/aclocal/intdiv0.m4

@rofl0r
Copy link
Member

rofl0r commented Jul 12, 2018

ok. my suggestion would be to install the m4s to the gettext-tiny dir as usual, and symlink those m4's to ../../aclocal. how does that sound, @awilfox & @xhebox ?

@xhebox
Copy link
Collaborator

xhebox commented Jul 12, 2018

OK, like so?

[xhe@xhe-PC gettext-tiny]$ ls -sl ss/usr/local/share/
总用量 4
0 lrwxrwxrwx 1 xhe users   15 Jul 12 10:41 aclocal -> gettext-tiny/m4
4 drwxr-xr-x 4 xhe users 4096 Jul 12 10:41 gettext-tiny
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ bindir=$(prefix)/bin
 includedir=$(prefix)/include
 libdir=$(prefix)/lib
 sysconfdir=$(prefix)/etc
 -datadir=$(prefix)/share/gettext-tiny
+datarootdir=$(prefix)/share
+datadir=$(datarootdir)/gettext-tiny
 
 ifeq ($(LIBINTL), MUSL)
@@ -43,6 +44,7 @@ BUILDCFLAGS=$(CFLAGS)
 all: $(ALL_LIBS) $(ALL_TOOLS)
 
 install: $(ALL_LIBS:lib%=$(DESTDIR)$(libdir)/lib%) $(ALL_INCLUDES:%=$(DESTDIR)$(includedir)/%) $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%) $(ALL_M4S:%=$(DESTDIR)$(datadir)/%) $(ALL_DATA:%=$(DESTDIR)$(datadir)/%)
+       ln -s gettext-tiny/m4 $(DESTDIR)$(datarootdir)/aclocal
 
 clean:
        rm -f $(ALL_LIBS)
@@ -82,6 +84,3 @@ $(DESTDIR)$(datadir)/%: %
        install -D -m 644 $< $@
 
 .PHONY: all clean install
-
-
-

@rofl0r
Copy link
Member

rofl0r commented Jul 13, 2018

OK, like so?

not exactly what i had in mind. other packages (e.g. automake, curl, libxml2...) install stuff into $prefix/share/aclocal too, so those files would end up in the gettext-tiny dir. worse yet, when you install gettext-tiny after curl, we would replace the existing stuff in the directory with the symlink.
we need to create the directory and install every single .m4 as a symlink. since the standard install command is not capable of making symlinks, we need to exchange it for https://github.com/rofl0r/install.sh sabotage-linux/netbsd-curses@f891377

xhebox added a commit that referenced this issue Jul 14, 2018
follow #27.

According to @awilfox, GNU gettext will install m4 files to aclocal dir.
But gettext-tiny did not. So autoreconf just stops working and complains
that it can not find needed macros.

Suggested by rofl0r, symlinking all m4 files into $(dataroot)/aclocal is
a good idea. Save a little disk space.
@xhebox
Copy link
Collaborator

xhebox commented Jul 14, 2018

@awilfox what about the commit? It's tested with msys2. I think it should work out your problem.

@awilfox
Copy link
Contributor Author

awilfox commented Jul 21, 2018

I can confirm this fixes the issue. Thank you very much!

@awilfox awilfox closed this as completed Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants