bug#20186: Failure to create directory during info-building phase of "make distcheck"

2015-03-24 Thread James Youngman
I'm seeing a failure of "make distcheck" which I think is caused by
the fact that Automake 1.14.1's rule for .texi.info is trying to
create a backup directory in a read-only directory:

(sorry about what appear to be problems with leading space)

$ cat doc/Makefile.in
...
.texi.info:
$(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am" && \
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
 for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9]
$(@:.info=).i[0-9][0-9]; do \
   if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
 done; \
else :; fi && \
cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $@ $<; \
then \
 rc=0; \
 $(am__cd) $(srcdir); \
else \
 rc=$$?; \
 $(am__cd) $(srcdir) && \
 $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
...


$ make distcheck
...
make[3]: Entering directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/doc'
cp ../locate/dblocation.texi dblocation.texi
restore=: && backupdir=".am$$" && \
am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd ../../doc && \
rm -rf $backupdir && mkdir $backupdir && \
if (/bin/sh 
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/build-aux/missing
makeinfo --version) >/dev/null 2>&1; then \
  for f in ../../doc/find.info ../../doc/find.info-[0-9]
../../doc/find.info-[0-9][0-9] ../../doc/find.i[0-9]
../../doc/find.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
  done; \
else :; fi && \
cd "$am__cwd"; \
if /bin/sh 
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/build-aux/missing
makeinfo   -I ../../doc \
 -o ../../doc/find.info ../../doc/find.texi; \
then \
  rc=0; \
  CDPATH="${ZSH_VERSION+.}:" && cd ../../doc; \
else \
  rc=$?; \
  CDPATH="${ZSH_VERSION+.}:" && cd ../../doc && \
  $restore $backupdir/* `echo "./../../doc/find.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
mkdir: cannot create directory '.am22323': Permission denied
could not open ../../doc/find.texi: No such file or directory
Makefile:1648: recipe for target '../../doc/find.info' failed
make[3]: *** [../../doc/find.info] Error 1
make[3]: Leaving directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/doc'
Makefile:1695: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build'
Makefile:1635: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build'
Makefile:1910: recipe for target 'distcheck' failed
make: *** [distcheck] Error 1


$ ls -l -d 
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/doc
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/
 /home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/
dr-xr-xr-x 14 james lp 4096 Mar 23 23:52
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/
drwxr-xr-x 12 james lp 4096 Mar 23 23:53
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/
drwxr-xr-x  2 james lp 4096 Mar 23 23:54
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/doc

$ automake --version
automake (GNU automake) 1.14.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey 
   and Alexandre Duret-Lutz .


In case it matters, my regular compile directory (in which "make
distcheck" was invoked) is also a VPATH build, as is the build
configuration created by "make distcheck".

I see that this part of the Automake code changed since the release of
1.14.1, At first glance it looks to me as if git comit
cdba479fe5739555ad9ec30e0224f24b2facf548 might fix the problem.  Is
this likely?

I experimented with "AM_MAKEINFOHTMLFLAGS = --no-split" but this
didn't seem to mitigate my problem.  What else could I try as a
workaround (apart from "install source-built packages of things into
/usr/local until the problem goes away")?

Thanks,
James.





bug#20186: Failure to create directory during info-building phase of "make distcheck"

2015-03-24 Thread Peter Breitenlohner

On Tue, 24 Mar 2015, James Youngman wrote:


I'm seeing a failure of "make distcheck" which I think is caused by
the fact that Automake 1.14.1's rule for .texi.info is trying to
create a backup directory in a read-only directory:


Hi James,

the .info file in the read-only directory should not be older than the .texi
file (and other dependencies), thus the rule for .texi.info should never be
used during "make distcheck".  Something wrong with your timestamps and or
filesystem?

Regards
Peter Breitenlohner 





bug#20186: Failure to create directory during info-building phase of "make distcheck"

2015-03-24 Thread James Youngman
On Tue, Mar 24, 2015 at 10:49 AM, Peter Breitenlohner  wrote:
> On Tue, 24 Mar 2015, James Youngman wrote:
>
>> I'm seeing a failure of "make distcheck" which I think is caused by
>> the fact that Automake 1.14.1's rule for .texi.info is trying to
>> create a backup directory in a read-only directory:
>
>
> Hi James,
>
> the .info file in the read-only directory should not be older than the .texi
> file (and other dependencies), thus the rule for .texi.info should never be
> used during "make distcheck".

The timestamps look OK to me:

$ ls -ltri --full-time $( find
/home/james/source/GNU/findutils/git/gnu/findutils
/home/james/source/GNU/findutils/git/gnu/compile/64 \( -name
find.info\* -o -name find.texi \) )
3967808 -r--r--r-- 1 james lp 220524 2015-03-23 09:45:58.0
+ 
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/find.texi
2983056 -rw-r--r-- 1 james lp 220524 2015-03-23 09:45:58.424857809
+ /home/james/source/GNU/findutils/git/gnu/findutils/doc/find.texi
3967801 -r--r--r-- 1 james lp  11671 2015-03-23 22:39:18.0
+ 
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/find.info-2
3965120 -r--r--r-- 1 james lp 302487 2015-03-23 22:39:18.0
+ 
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/find.info-1
3967805 -r--r--r-- 1 james lp   6293 2015-03-23 22:39:18.0
+ 
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/find.info
2983128 -rw-r--r-- 1 james lp 302487 2015-03-23 22:39:18.595150555
+ /home/james/source/GNU/findutils/git/gnu/findutils/doc/find.info-1
2983129 -rw-r--r-- 1 james lp  11671 2015-03-23 22:39:18.659148601
+ /home/james/source/GNU/findutils/git/gnu/findutils/doc/find.info-2
2983130 -rw-r--r-- 1 james lp   6293 2015-03-23 22:39:18.667148357
+ /home/james/source/GNU/findutils/git/gnu/findutils/doc/find.info

$ make -C  
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc
-n  find.info
make: Entering directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc'
make: 'find.info' is up to date.
make: Leaving directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc'

Perhaps the cause is this rule, though:

dblocation.texi: ../locate/dblocation.texi
cp ../locate/dblocation.texi $@

This will clearly update the mtime of dblocation.texi.

However, this rule is intended as a workaround for what would
otherwise be a failure in "make dvi".   The texi file is changed:

$ git diff doc/find.texi  | cat
diff --git a/doc/find.texi b/doc/find.texi
index 7aa20e5..fe0b2ce 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -7,7 +7,7 @@
 @c %**end of header

 @include version.texi
-@include ../locate/dblocation.texi
+@include dblocation.texi

 @iftex
 @finalout

However, the old version of this code no longer works with the
combination of TeX and texinfo I have installed.   Reverting the
change, rebuilding the makefiles (i.e. re-running gnulib-tool etc.)
and doing make dist again we see the failure that I made the above
change to evade:



make[2]: Entering directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/doc'
TEXINPUTS="../../build-aux:$TEXINPUTS" \
MAKEINFO='/bin/sh
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/build-aux/missing
makeinfo   -I ../../doc' \
texi2dvi  --build-dir=find.t2d -o find.dvi  \
../../doc/find.texi
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live
2015/dev/Debian) (preloaded format=etex)
 restricted \write18 enabled.
entering extended mode

(/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/f
ind.texi
(/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/t
exinfo.tex Loading texinfo [version 2014-05-05.10]: pdf, fonts, markup,
glyphs, page headings, tables, conditionals, indexing, sectioning, toc,
environments, defuns, macros, cross references, insertions,
(/usr/share/texlive/texmf-dist/tex/generic/epsf/epsf.tex
This is `epsf.tex' v2.7.4 <14 February 2011>
) localization, formatting, and turning on texinfo input format.)
(/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/v
ersion.texi)
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/fi
nd.texi:10: I can't find file `../locate/dblocation.texi'.
@temp ->@input ../locate/dblocation.texi

@includezzz ...and @input #1 }@expandafter }@temp
  @popthisfilestack
l.10 @include ../locate/dblocation.texi

(Press Enter to retry, or Control-D to exit)
Please type another input file name:
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/doc/fi
nd.texi:10: I can't find file `../locate/dblocation.texi'.
@temp ->@input ../locate/dblocation.texi

@includezzz ...and @input #1 }@expandafter }@temp
  @

bug#20186: Failure to create directory during info-building phase of "make distcheck"

2015-03-25 Thread Peter Breitenlohner

On Tue, 24 Mar 2015, James Youngman wrote:


The timestamps look OK to me:

...

Perhaps the cause is this rule, though:

dblocation.texi: ../locate/dblocation.texi
   cp ../locate/dblocation.texi $@

This will clearly update the mtime of dblocation.texi.


Hi James,

indeed.  You could use the modified rule
dblocation.texi: ../locate/dblocation.texi
$(LN_S) ../locate/dblocation.texi $@
where $(LN_S) is 'ln -s' on systems with working symlinks or otherwise one
of 'ln' or 'cp'.  I assume your Makefile.in already contains
LN_S = @LN_S@
otherwise you should add
AC_PROG_LN_S
to your configure.ac.

I assume 'make distcheck' will never run on systems without working symlinks
so this should be OK.

Regards
Peter





bug#20186: Failure to create directory during info-building phase of "make distcheck"

2015-05-09 Thread James Youngman
Peter,

Thank you for your suggestion.Though it didn't work immediately,
it did help to solve the problem.  Switching to $(LN_S) wasn't as
simple as I had hoped since I had included the dblocation.texi file in
the distribution, and "make dist" will invoke tar with the -h option
and dereference the symbolic link.   I didn't conclusively prove that
this made my problem persist, but certainly removing dblocation.texi
from the source distribution seemed to resolve the problem.  Though it
may mean that it will now be necessary for users to have makeinfo when
building and installing even if they didn't modify any of the Texinfo
sources.

In case you're interested, I attach the patch I ended up using.

Thanks for your help, everybody.
James.

On Wed, Mar 25, 2015 at 12:47 PM, Peter Breitenlohner  wrote:
> On Tue, 24 Mar 2015, James Youngman wrote:
>
>> The timestamps look OK to me:
>>
>> ...
>>
>> Perhaps the cause is this rule, though:
>>
>> dblocation.texi: ../locate/dblocation.texi
>>cp ../locate/dblocation.texi $@
>>
>> This will clearly update the mtime of dblocation.texi.
>
>
> Hi James,
>
> indeed.  You could use the modified rule
> dblocation.texi: ../locate/dblocation.texi
> $(LN_S) ../locate/dblocation.texi $@
> where $(LN_S) is 'ln -s' on systems with working symlinks or otherwise one
> of 'ln' or 'cp'.  I assume your Makefile.in already contains
> LN_S = @LN_S@
> otherwise you should add
> AC_PROG_LN_S
> to your configure.ac.
>
> I assume 'make distcheck' will never run on systems without working symlinks
> so this should be OK.
>
> Regards
> Peter



-- 
--
This email is intended solely for the use of its addressee, sender,
and any readers of a mailing list archive in which it happens to
appear.   If you have received this email in error, please say or type
three times, "I believe in the utility of email disclaimers," and then
reply to the author correcting any spellings (and, optionally, any
incorrect spellings), accompanying these with humorous jests about the
author's parentage.   If you are not the addressee, you are
nevertheless permitted to both copy and forward this email since
without such permissions email systems are unable to transmit email to
anybody, intended recipient or not.  To those still reading by this
point, the author would like to apologise for being unable to maintain
a consistent level of humour throughout this disclaimer.  Contents may
settle during transit.  Do not feed the animals.
From f59d88e456553dfe0b5185caf75e4041285fd595 Mon Sep 17 00:00:00 2001
From: James Youngman 
Date: Sat, 9 May 2015 21:54:10 +0100
Subject: [PATCH] Don't include dblocation.texi from original spot, symlink it.
To: findutils-patc...@gnu.org

* doc/Makefile.am (dblocation.texi): Create this as a symbolic
link.  We do this because Automake now invokes texi2dvi in "tidy"
mode and hence changes the working directory.  That means that
relative path includes no longer works in Texinfo files, so we
need to avoid doing that.  Avoid distributing dblocation.texi
(since tar would dereference the symbolic link when making the
source archive, since the -h option is passed).
* doc/find.texi: Include dblocation.texi instead of
../locate/dblocation.texi.
* configure.ac: use AC_PROG_LN_S.
* locate/Makefile.am (EXTRA_DIST): Don't distribute dblocation.texi.
---
 configure.ac   | 2 +-
 doc/Makefile.am| 8 +++-
 doc/find.texi  | 2 +-
 locate/Makefile.am | 4 ++--
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7b53a17..498ee0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@ AC_PROG_CPP
 
 dnl for gnulib
 gl_EARLY
-
+AC_PROG_LN_S
 AC_PROG_INSTALL
 AC_CHECK_TOOLS([AR], [ar])
 AC_CHECK_TOOLS([RANLIB], [ranlib], [:])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 56ae953..79f305d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,9 +2,11 @@ AM_CFLAGS = $(WARN_CFLAGS)
 
 info_TEXINFOS = find.texi find-maint.texi
 find_TEXINFOS = perm.texi parse-datetime.texi regexprops.texi fdl.texi
+BUILT_SOURCES = dblocation.texi
+nodist_find_TEXINFOS = dblocation.texi
 find_maint_TEXINFOS = fdl.texi
 MOSTLYCLEANFILES = find.cps
-CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz
+CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz dblocation.texi
 
 MAKEINFOTXT = $(MAKEINFO) --plaintext
 
@@ -53,3 +55,7 @@ find_mono.html: find.texi
 # for "make all" or "make install" (or even "make check").
 findutils.texi_html_node.tar.gz: find.html
 	tar zcf $@ $<
+
+
+dblocation.texi: ../locate/dblocation.texi
+	$(LN_S) ../locate/dblocation.texi $@
diff --git a/doc/find.texi b/doc/find.texi
index 7aa20e5..fe0b2ce 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -7,7 +7,7 @@
 @c %**end of header
 
 @include version.texi
-@include ../locate/dblocation.texi
+@include dblocation.texi
 
 @iftex
 @finalout
diff --git a/locate/Makefile.am b/locate/Makefile.am
index d57b5d8..a8efb7