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

Previous Next

Package: automake;

Reported by: James Youngman <jay <at> gnu.org>

Date: Tue, 24 Mar 2015 00:27:01 UTC

Severity: normal

To reply to this bug, email your comments to 20186 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Tue, 24 Mar 2015 00:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Youngman <jay <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Tue, 24 Mar 2015 00:27:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: James Youngman <jay <at> gnu.org>
To: bug-automake <at> gnu.org
Subject: Failure to create directory during info-building phase of "make
 distcheck"
Date: Tue, 24 Mar 2015 00:26:38 +0000
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
<http://gnu.org/licenses/gpl-2.0.html>
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 <tromey <at> redhat.com>
       and Alexandre Duret-Lutz <adl <at> gnu.org>.


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.




Information forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Tue, 24 Mar 2015 10:50:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Breitenlohner <peb <at> mppmu.mpg.de>
To: James Youngman <jay <at> gnu.org>
Cc: 20186 <at> debbugs.gnu.org, bug-automake <at> gnu.org
Subject: Re: bug#20186: Failure to create directory during info-building
 phase of "make distcheck"
Date: Tue, 24 Mar 2015 11:49:17 +0100 (CET)
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 <peb <at> mppmu.mpg.de>




Information forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Tue, 24 Mar 2015 10:50:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Tue, 24 Mar 2015 22:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 20186 <at> debbugs.gnu.org (full text, mbox):

From: James Youngman <jay <at> gnu.org>
To: Peter Breitenlohner <peb <at> mppmu.mpg.de>,
 Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: Eric Blake <eblake <at> redhat.com>, 20186 <at> debbugs.gnu.org, bug-automake <at> gnu.org
Subject: Re: bug#20186: Failure to create directory during info-building phase
 of "make distcheck"
Date: Tue, 24 Mar 2015 22:46:45 +0000
On Tue, Mar 24, 2015 at 10:49 AM, Peter Breitenlohner <peb <at> mppmu.mpg.de> 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.000000000
+0000 /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
+0000 /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.000000000
+0000 /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.000000000
+0000 /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.000000000
+0000 /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
+0000 /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
+0000 /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
+0000 /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
                                                  @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: Emergency stop.
@temp ->@input ../locate/dblocation.texi

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

No pages of output.
Transcript written on find.log.
/usr/bin/texi2dvi: etex exited with bad status, quitting.
make[2]: *** [find.dvi] Error 1
Makefile:1670: recipe for target 'find.dvi' failed
make[2]: Leaving directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/doc'
Makefile:1695: recipe for target 'dvi-recursive' failed
make[1]: *** [dvi-recursive] Error 1
make[1]: Leaving directory
'/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build'
make: *** [distcheck] Error 1
Makefile:1910: recipe for target 'distcheck' failed

$ find /home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/
-name dblocation.texi
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/locate/dblocation.texi
/home/james/source/GNU/findutils/git/gnu/compile/64/findutils-4.5.15-git/_build/locate/dblocation.texi


I suspect the problem here is the texio2dvi argument
--build-dir=find.t2d - in other words, the generated makefile now uses
texi2dvi in "tidy" mode, and that changes the current directory of the
TeX formatter; it can no longer find ../locate/dblocation.texi.
Certainly strace shows that the program tries to open the file using
exactly " ../locate/dblocation.texi" and cannot because that's not any
longer the correct relative path to the input (though it is the
correct relative path to the input if the working directory were the
same directory as contains find.texi).

It looks to me as if the relevant change was introduced by Stefano
Lattarini in commit 205c7572497789676bea3167b9cdeede69236a16.

James.




Information forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Tue, 24 Mar 2015 22:48:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Wed, 25 Mar 2015 12:49:01 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Breitenlohner <peb <at> mppmu.mpg.de>
To: James Youngman <jay <at> gnu.org>
Cc: bug-automake <at> gnu.org, 20186 <at> debbugs.gnu.org,
 Stefano Lattarini <stefano.lattarini <at> gmail.com>,
 Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#20186: Failure to create directory during info-building
 phase of "make distcheck"
Date: Wed, 25 Mar 2015 13:47:57 +0100 (CET)
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




Information forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Wed, 25 Mar 2015 12:49:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Sat, 09 May 2015 21:31:04 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: James Youngman <jay <at> gnu.org>
To: Peter Breitenlohner <peb <at> mppmu.mpg.de>
Cc: bug-automake <at> gnu.org, 20186 <at> debbugs.gnu.org,
 Stefano Lattarini <stefano.lattarini <at> gmail.com>,
 Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#20186: Failure to create directory during info-building phase
 of "make distcheck"
Date: Sat, 9 May 2015 22:30:34 +0100
[Message part 1 (text/plain, inline)]
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 <peb <at> mppmu.mpg.de> 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.
[0001-Don-t-include-dblocation.texi-from-original-spot-sym.patch (text/x-patch, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#20186; Package automake. (Sat, 09 May 2015 21:31:05 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.