GNU bug report logs -
#19418
AC_CONFIG_FILES / stamp-h? problem
Previous Next
To reply to this bug, email your comments to 19418 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#19418
; Package
automake
.
(Sat, 20 Dec 2014 15:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Jeff Squyres (jsquyres)" <jsquyres <at> cisco.com>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Sat, 20 Dec 2014 15:50:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Greetings.
I have found what appears to be a subtle bug in the Autotools, and I *think* it may be in Automake. ...but I am not sure; it could also be a bug in our m4 code.
Short version
=============
The nightly "make distcheck" failed last night in the Open MPI project (www.open-mpi.org) due to several stamp-h? files being left in the build tree.
Close examination shows that the order of $config_headers in config.status -- and therefore the initial generation of stamp-h? files in the build tree -- appears to differ from the numbering of stamp-h? files in the top-level Automake-generated Makefile.in. Hence, the "distclean-hdr" rule is attempting to remove different stamp-h? files than were created by config.status, ultimately resulting in "make distcheck" failing.
Is this a known issue? Or is there a common user/application error that can cause this kind of behavior?
This behavior occurs with AC 2.69, AM 1.14.1, and LT 2.4.2.
More detail
===========
There had been a commit earlier yesterday that added another AC_CONFIG_HEADERS file in the Open MPI configury. This new file seemed to trigger this new behavior (i.e., "make distcheck" was not failing before last night).
Let me give some specifics. In a clean Open MPI git checkout:
1. run "autoreconf -ivf"
2. run "./configure --prefix=/blah"
3. run "find . -name stamp-h\?"
Here's the stamp-h? files that I see -- note that the files marked by (*) are generated by sub-configure scripts that are invoked by Open MPI's main configure script; they're not important to this analysis, and are listed here just for completeness:
-----
./opal/include/stamp-h1
./ompi/include/stamp-h2
./oshmem/include/stamp-h3
./opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/stamp-h4
./opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/stamp-h5
./opal/mca/common/libfabric/libfabric/stamp-h6
(*) ./opal/libltdl/stamp-h1
(*) ./opal/mca/event/libevent2021/libevent/stamp-h1
(*) ./ompi/mca/io/romio/romio/adio/include/stamp-h1
(*) ./ompi/contrib/vt/vt/extlib/otf/stamp-h1
(*) ./ompi/contrib/vt/vt/stamp-h1
-----
The first stamp-h1 - stamp-h6 files are generated by Open MPI's main configure script.
Indeed, looking at the main config.status, you can see that $config_headers agrees with this ordering:
-----
$ egrep '^config_headers=' config.status
config_headers=" opal/include/opal_config.h ompi/include/mpi.h oshmem/include/shmem.h opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/config.h opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/config.h opal/mca/common/libfabric/libfabric/config.h"
-----
The problem is in Open MPI's top-level Makefile.in (which was generated by Automake). The stamp-h? rules and the "rm -f ..." that occurs in distclean-hdr appear to differ in stamp-h<DIGIT> ordering than that of config.status.
Both the stamp-h? rules and the distclean-hdr rule reflect the same ordering, so I'll just show the "rm -f ..." that is in distclean-hdr for brevity (broken into multiple lines for readability):
-----
-rm -f \
opal/mca/common/libfabric/libfabric/config.h \
opal/mca/common/libfabric/libfabric/stamp-h4 \
opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/config.h \
opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/stamp-h5 \
opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/config.h \
opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/stamp-h6
-----
Notice that the "libfabric" directory corresponds to stamp-h4, but the config.status-generated stamp file for this directory is stamp-h6. The two hwloc191 stamp files reflect similar mismatched ordering.
*** Note that the libfabric/config.h is the newly-added
AC_CONFIG_HEADERS file.
This all leads "make distclean-hdr" to (attempting to) remove the wrong (and non-existent) stamp files, and therefore "make distcheck" ultimately fails.
Unfortunately, the configury for Open MPI is *quite* complex; it spans many .m4 files across many directories. I've been trying to create a small reproducer outside of the (very large) Open MPI source tree and have been unable to find the magic set of circumstances to make the same behavior occur. :-(
So before I try to recreate this in a small example even further, let me ask two questions:
1. Is this a known problem?
2. Is there a common user-level mistake (i.e., somewhere in our configure/m4 code) that could cause this behavior to occur?
Thanks for your time.
--
Jeff Squyres
jsquyres <at> cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
Information forwarded
to
bug-automake <at> gnu.org
:
bug#19418
; Package
automake
.
(Mon, 21 Feb 2022 04:04:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 19418 <at> debbugs.gnu.org (full text, mbox):
On Sat, 20 Dec 2014 15:48:49 +0000, Jeff Squyres (jsquyres) wrote:
> I have found what appears to be a subtle bug in the Autotools, and I *think* it may be in Automake. ...but I am not sure; it could also be a bug in our m4 code.
it's been ... a while. have you managed to track this down yourself ?
or is this issue still plaguing the project ?
-mike
Information forwarded
to
bug-automake <at> gnu.org
:
bug#19418
; Package
automake
.
(Tue, 22 Feb 2022 12:54:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 19418 <at> debbugs.gnu.org (full text, mbox):
I'm afraid I can't easily tell.
It looks like I added a workaround in https://github.com/open-mpi/ompi/commit/40dd4c5b766ff62a681692b1fa6b72a1023fc81f on Dec 20, 2014 (the same day that I initially filed this bug report).
Half of that workaround was removed in June of 2015 when we stopped embedding a major component (https://github.com/open-mpi/ompi/commit/3e1b85ceb36d952190934e041b8894db98bb38ef); the other half persisted for several years until we changed packaging of another major component in October of 2020 (https://github.com/open-mpi/ompi/commit/0e9581d478a20b496c579c9510ea0f3d644a460d). Honestly, I think that when I put in the workaround, we forgot about the issue -- the workaround ultimately disappeared organically over time when we made other major changes to the Open MPI code base.
So I can't say whether the bug ultimately got fixed in subsequent versions of Automake, whether it was fixed in Open MPI's m4 code, or whether the other major changes in Open MPI made the issue moot.
--
Jeff Squyres
jsquyres <at> cisco.com
________________________________________
From: Mike Frysinger <vapier <at> gentoo.org>
Sent: Sunday, February 20, 2022 11:03 PM
To: Jeff Squyres (jsquyres)
Cc: 19418 <at> debbugs.gnu.org
Subject: Re: AC_CONFIG_FILES / stamp-h? problem
On Sat, 20 Dec 2014 15:48:49 +0000, Jeff Squyres (jsquyres) wrote:
> I have found what appears to be a subtle bug in the Autotools, and I *think* it may be in Automake. ...but I am not sure; it could also be a bug in our m4 code.
it's been ... a while. have you managed to track this down yourself ?
or is this issue still plaguing the project ?
-mike
Information forwarded
to
bug-automake <at> gnu.org
:
bug#19418
; Package
automake
.
(Sun, 27 Feb 2022 07:40:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 19418 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 22 Feb 2022 12:53, Jeff Squyres (jsquyres) wrote:
> I'm afraid I can't easily tell.
>
> It looks like I added a workaround in https://github.com/open-mpi/ompi/commit/40dd4c5b766ff62a681692b1fa6b72a1023fc81f on Dec 20, 2014 (the same day that I initially filed this bug report).
>
> Half of that workaround was removed in June of 2015 when we stopped embedding a major component (https://github.com/open-mpi/ompi/commit/3e1b85ceb36d952190934e041b8894db98bb38ef); the other half persisted for several years until we changed packaging of another major component in October of 2020 (https://github.com/open-mpi/ompi/commit/0e9581d478a20b496c579c9510ea0f3d644a460d). Honestly, I think that when I put in the workaround, we forgot about the issue -- the workaround ultimately disappeared organically over time when we made other major changes to the Open MPI code base.
>
> So I can't say whether the bug ultimately got fixed in subsequent versions of Automake, whether it was fixed in Open MPI's m4 code, or whether the other major changes in Open MPI made the issue moot.
thanks, that helps. i can reproduce what you're seeing.
i haven't dug deeper yet to see what's going on.
$ git clone https://github.com/open-mpi/ompi
$ cd ompi
$ git checkout 40dd4c5b766ff62a681692b1fa6b72a1023fc81f
$ WANT_AUTOCONF=2.69 WANT_AUTOMAKE=1.14 autoreconf -vfi
$ ./configure
$ grep ^config_headers= config.status
config_headers="
opal/include/opal_config.h
ompi/include/mpi.h
oshmem/include/shmem.h
opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/config.h
opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/config.h
opal/mca/common/libfabric/libfabric/config.h"
$ grep -A1 ^distclean-hdr Makefile.in
distclean-hdr:
-rm -f \
opal/mca/common/libfabric/libfabric/config.h \
opal/mca/common/libfabric/libfabric/stamp-h4 \
opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/config.h \
opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/stamp-h5 \
opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/config.h \
opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/stamp-h6
Automake 1.16 does the same thing.
$ aclocal-1.16 && automake-1.16
$ grep -A1 ^distclean-hdr Makefile.in
distclean-hdr:
-rm -f \
opal/mca/common/libfabric/libfabric/config.h \
opal/mca/common/libfabric/libfabric/stamp-h4 \
opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/config.h \
opal/mca/hwloc/hwloc191/hwloc/include/private/autogen/stamp-h5 \
opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/config.h \
opal/mca/hwloc/hwloc191/hwloc/include/hwloc/autogen/stamp-h6
-mike
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 3 years and 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.