mainAutoconf - Support: sr #109406, autoheader creates config.h.in...

 
 

sr #109406: autoheader creates config.h.in file with wrong timestamp

Submitter:  Bruno Haible <haible>
Submitted:  Sun 29 Oct 2017 03:45:21 PM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 29 Oct 2017 11:01:18 PM UTC, comment #2: 

Thanks for reporting the problem. It is due to a bug in the way that Perl's 'move' function deals with timestamps when it crosses a filesystem boundary. I installed this workaround into Autoconf:

http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e5f5e535adec83b146bfc921d9005ecf6a846464

Paul Eggert <eggert>
Group administrator
Sun 29 Oct 2017 03:46:54 PM UTC, comment #1: 

The workaround is to never run 'autoheader' alone.
Always run 'autoheader && toouch config.h.in' (and hope that you are not on an NFS mounted volume with significant time differences between NFS server and client).

Bruno Haible <haible>
Sun 29 Oct 2017 03:45:21 PM UTC, original submission:  

autoheader creates the config.h.in file with a timestamp that is not the current time, but the latest full second before the current time. This causes trouble later with the Automake-generated rule that tests whether config.h.in needs to be rebuilt.

How to reproduce:

- Use gnulib as of 2017-09-28.

- $ ./gnulib-tool --create-testdir --dir=testdir1 --single-configure get-rusage-as get-rusage-data
  (or any other small set of modules)
This command prints what it does:
executing aclocal -I glm4
executing autoconf
executing autoheader
executing automake --add-missing --copy
As you can see, it generates aclocal.m4, configure, config.h.in, Makefile.in in this order.

- $ cd testdir1

- $ ls -lrt --full-time
total 408
-rw-rw-r-- 1 bruno bruno    150 2017-10-29 16:03:57.054242537 +0100 Makefile.am
-rw-rw-r-- 1 bruno bruno   6695 2017-10-29 16:03:57.574244759 +0100 configure.ac
-rw-rw-r-- 1 bruno bruno  23189 2017-10-29 16:03:58.000000000 +0100 config.h.in
-rw-rw-r-- 1 bruno bruno  42980 2017-10-29 16:03:58.182247356 +0100 aclocal.m4
-rwxrwxr-x 1 bruno bruno 279904 2017-10-29 16:03:58.734249714 +0100 configure
-rw-rw-r-- 1 bruno bruno  36669 2017-10-29 16:03:59.674253730 +0100 Makefile.in
drwxrwxr-x 2 bruno bruno   4096 2017-10-29 16:03:59.754254071 +0100 gllib
drwxrwxr-x 2 bruno bruno   4096 2017-10-29 16:03:59.798254260 +0100 glm4
drwxrwxr-x 2 bruno bruno   4096 2017-10-29 16:03:59.862254533 +0100 build-aux
drwxrwxr-x 2 bruno bruno   4096 2017-10-29 16:03:59.898254687 +0100 gltests

As you can see, config.h.in is now OLDER than aclocal.m4 and configure.

- $ ./configure

- $ make

Here the Automake generate rule kicks in:

$(srcdir)/config.h.in:  $(am__configure_deps)
        ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@

This rule compares the timestamps of config.h.in and aclocal.m4 (in particular), finds that config.h.in is too old, thus regenerates it:

$ make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /media/develdata/devel/GNULIB/gnulib-git/testdir1/build-aux/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
...

The effect is:

  • Useless commands get executed.
  • Noise gets added to the "make" output.
  • The junk directory autom4te.cache, that I took care to remove before, has now been recreated. Arghh!



Versions of software implied:
- autoheader 2.69
- perl 5.22.1
- all on Ubuntu 16.04

Bruno Haible <haible>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eggert (Posted a comment)
  • -email is unavailable- added by haible (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-29 eggert StatusNone Done
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code