[libvirt] the price we pay for using gettext-0.14

Make distcheck currently fails like this: make[2]: Entering directory `/t/libvirt-0.7.6/_build/po' /bin/sh @MKINSTALLDIRS@ /t/libvirt-0.7.6/_inst/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[2]: *** [install-data-yes] Error 127 That is due to our use of a version of gettext that is way too old: $ grep GETT configure.ac AM_GNU_GETTEXT_VERSION([0.14.1]) The work-around is to define (via AC_SUBST) the now-obsolete symbol, MKINSTALLDIRS, so that @MKINSTALLDIRS@ in the autopoint-provided Makefile.in.in (from the old version of gettext) ends up being substituted. As I recall, people insist on using this old version of gettext, because nothing newer is supplied by RHEL5.x. IMHO, that is RHEL5's problem, and should not be allowed to cause continuing problems in upstream projects. It is easy and safe to install a newer version of gettext, especially since any project using autopoint will automatically continue to get the same bit-rotting old files: a gettext installation includes an archive of all older versions of its files, to provide just this type of backwards compatibility. We had a similar problem in libguestfs, and it was not trivial to diagnose there, either, even though I'd seen it at least once or twice before then. Here's the work-around: [just realized this requires a comment. adding that now]
From 16b9418427101a495b7fdd6917f518f254d22720 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Wed, 24 Feb 2010 10:53:44 +0100 Subject: [PATCH] build: ensure that MKINSTALLDIRS is AC_SUBST-defined
since we're using gettext-0.14.1, which uses that now-obsolete automake symbol. Otherwise, make distcheck would fails like this: make[2]: Entering directory `/t/libvirt-0.7.6/_build/po' /bin/sh @MKINSTALLDIRS@ /t/libvirt-0.7.6/_inst/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[2]: *** [install-data-yes] Error 127 * configure.ac (MKINSTALLDIRS): Define. --- configure.ac | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 117cb20..2f79970 100644 --- a/configure.ac +++ b/configure.ac @@ -49,6 +49,8 @@ AC_PROG_CPP AC_OBJEXT +AC_SUBST([MKINSTALLDIRS], [$ac_aux_dir/mkinstalldirs]) + dnl gl_INIT uses m4_foreach_w, yet that is not defined in autoconf-2.59. dnl In order to accommodate developers with such old tools, here's a dnl replacement definition. -- 1.7.0.367.g566c3

Jim Meyering wrote:
Make distcheck currently fails like this:
make[2]: Entering directory `/t/libvirt-0.7.6/_build/po' /bin/sh @MKINSTALLDIRS@ /t/libvirt-0.7.6/_inst/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[2]: *** [install-data-yes] Error 127
That is due to our use of a version of gettext that is way too old:
$ grep GETT configure.ac AM_GNU_GETTEXT_VERSION([0.14.1])
The work-around is to define (via AC_SUBST) the now-obsolete symbol, MKINSTALLDIRS, so that @MKINSTALLDIRS@ in the autopoint-provided Makefile.in.in (from the old version of gettext) ends up being substituted.
As I recall, people insist on using this old version of gettext, because nothing newer is supplied by RHEL5.x. IMHO, that is RHEL5's problem, and should not be allowed to cause continuing problems in upstream projects. It is easy and safe to install a newer version of gettext, especially since any project using autopoint will automatically continue to get the same bit-rotting old files: a gettext installation includes an archive of all older versions of its files, to provide just this type of backwards compatibility.
We had a similar problem in libguestfs, and it was not trivial to diagnose there, either, even though I'd seen it at least once or twice before then.
Here's the work-around: [just realized this requires a comment. adding that now]
Added the comment, and moved it to be right next to the offending GETTEXT 0.14.1 line:
From 7f006798b0e2fe85a1b22c9bdbeae5b953d99596 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Wed, 24 Feb 2010 10:53:44 +0100 Subject: [PATCH] build: ensure that MKINSTALLDIRS is AC_SUBST-defined
since we're using gettext-0.14.1, which uses that now-obsolete automake symbol. Otherwise, make distcheck would fails like this: make[2]: Entering directory `/t/libvirt-0.7.6/_build/po' /bin/sh @MKINSTALLDIRS@ /t/libvirt-0.7.6/_inst/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[2]: *** [install-data-yes] Error 127 * configure.ac (MKINSTALLDIRS): Define. --- configure.ac | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 095e5d2..9934710 100644 --- a/configure.ac +++ b/configure.ac @@ -1655,6 +1655,11 @@ AM_CONDITIONAL([WITH_LIBVIRTD],[test "x$with_libvirtd" = "xyes"]) dnl Check for gettext AM_GNU_GETTEXT_VERSION([0.14.1]) AM_GNU_GETTEXT([external]) +dnl Since we're using such an old version of gettext, we must also define +dnl this symbol, in order to make the autopoint-supplied Makefile.in.in +dnl work properly. +AC_SUBST([MKINSTALLDIRS], [$ac_aux_dir/mkinstalldirs]) + ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'` dnl Extra link-time flags for Cygwin. -- 1.7.0.367.g566c3

ACK. ObLink to the bug: https://bugzilla.redhat.com/show_bug.cgi?id=523713 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw

Jim Meyering wrote: ...
Here's the work-around: [just realized this requires a comment. adding that now]
Added the comment, and moved it to be right next to the offending GETTEXT 0.14.1 line:
From 7f006798b0e2fe85a1b22c9bdbeae5b953d99596 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Wed, 24 Feb 2010 10:53:44 +0100 Subject: [PATCH] build: ensure that MKINSTALLDIRS is AC_SUBST-defined
since we're using gettext-0.14.1, which uses that now-obsolete automake symbol. Otherwise, make distcheck would fails like this:
make[2]: Entering directory `/t/libvirt-0.7.6/_build/po' /bin/sh @MKINSTALLDIRS@ /t/libvirt-0.7.6/_inst/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[2]: *** [install-data-yes] Error 127
* configure.ac (MKINSTALLDIRS): Define. --- configure.ac | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac index 095e5d2..9934710 100644 --- a/configure.ac +++ b/configure.ac @@ -1655,6 +1655,11 @@ AM_CONDITIONAL([WITH_LIBVIRTD],[test "x$with_libvirtd" = "xyes"]) dnl Check for gettext AM_GNU_GETTEXT_VERSION([0.14.1]) AM_GNU_GETTEXT([external]) +dnl Since we're using such an old version of gettext, we must also define +dnl this symbol, in order to make the autopoint-supplied Makefile.in.in +dnl work properly. +AC_SUBST([MKINSTALLDIRS], [$ac_aux_dir/mkinstalldirs])
That was not right. Test failed like this: make[2]: Entering directory `/co/libvirt/libvirt-0.7.6/_build/po' /bin/sh ../build-aux/mkinstalldirs /co/libvirt/libvirt-0.7.6/_inst/share /bin/sh: ../build-aux/mkinstalldirs: No such file or directory Here's the incremental that should solve the problem: diff --git a/configure.ac b/configure.ac index 9934710..77ce7db 100644 --- a/configure.ac +++ b/configure.ac @@ -1658,7 +1658,7 @@ AM_GNU_GETTEXT([external]) dnl Since we're using such an old version of gettext, we must also define dnl this symbol, in order to make the autopoint-supplied Makefile.in.in dnl work properly. -AC_SUBST([MKINSTALLDIRS], [$ac_aux_dir/mkinstalldirs]) +AC_SUBST([MKINSTALLDIRS], ["\$(top_builddir)/$ac_aux_dir/mkinstalldirs"]) ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'`

On 02/24/2010 11:21 AM, Jim Meyering wrote:
Jim Meyering wrote: ...
Here's the work-around: [just realized this requires a comment. adding that now]
Added the comment, and moved it to be right next to the offending GETTEXT 0.14.1 line:
From 7f006798b0e2fe85a1b22c9bdbeae5b953d99596 Mon Sep 17 00:00:00 2001 From: Jim Meyering<meyering@redhat.com> Date: Wed, 24 Feb 2010 10:53:44 +0100 Subject: [PATCH] build: ensure that MKINSTALLDIRS is AC_SUBST-defined
since we're using gettext-0.14.1, which uses that now-obsolete automake symbol. Otherwise, make distcheck would fails like this:
make[2]: Entering directory `/t/libvirt-0.7.6/_build/po' /bin/sh @MKINSTALLDIRS@ /t/libvirt-0.7.6/_inst/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[2]: *** [install-data-yes] Error 127
* configure.ac (MKINSTALLDIRS): Define. --- configure.ac | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac index 095e5d2..9934710 100644 --- a/configure.ac +++ b/configure.ac @@ -1655,6 +1655,11 @@ AM_CONDITIONAL([WITH_LIBVIRTD],[test "x$with_libvirtd" = "xyes"]) dnl Check for gettext AM_GNU_GETTEXT_VERSION([0.14.1]) AM_GNU_GETTEXT([external]) +dnl Since we're using such an old version of gettext, we must also define +dnl this symbol, in order to make the autopoint-supplied Makefile.in.in +dnl work properly. +AC_SUBST([MKINSTALLDIRS], [$ac_aux_dir/mkinstalldirs])
That was not right. Test failed like this:
make[2]: Entering directory `/co/libvirt/libvirt-0.7.6/_build/po' /bin/sh ../build-aux/mkinstalldirs /co/libvirt/libvirt-0.7.6/_inst/share /bin/sh: ../build-aux/mkinstalldirs: No such file or directory
Here's the incremental that should solve the problem:
diff --git a/configure.ac b/configure.ac index 9934710..77ce7db 100644 --- a/configure.ac +++ b/configure.ac @@ -1658,7 +1658,7 @@ AM_GNU_GETTEXT([external]) dnl Since we're using such an old version of gettext, we must also define dnl this symbol, in order to make the autopoint-supplied Makefile.in.in dnl work properly. -AC_SUBST([MKINSTALLDIRS], [$ac_aux_dir/mkinstalldirs]) +AC_SUBST([MKINSTALLDIRS], ["\$(top_builddir)/$ac_aux_dir/mkinstalldirs"])
ALL_LINGUAS=`cd "$srcdir/po"> /dev/null&& ls *.po | sed 's+\.po$++'`
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
ACK, after applying the original + the incremental I have a working build. Dave
participants (3)
-
Dave Allan
-
Jim Meyering
-
Richard W.M. Jones