[LU-7700] autoreconf does not work Created: 22/Jan/16 Updated: 21/Mar/18 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Christopher Morrone | Assignee: | Christopher Morrone |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
Lets say you have a clean checkout of Lustre's master branch, and you do the following: $ sh autogen.sh $ ./configure $ <edit lustre/autoconf/lustre-version.ac and increment the LUSTRE_PATCH number> $ make cd . && /bin/sh /home/morrone/src/lustre/config/missing automake-1.13 --foreign autoMakefile.am:122: error: SERVER does not appear in AM_CONDITIONAL make: *** [autoMakefile.in] Error 1 One way or another, the autotools are smart enough to recognize that the configure script needs to be regenerated. However, we are currently hitting the above bug. AM_CONDITIONAL calls all must be made unconditionally. My guess, without looking at the code, is that SERVER is defined from an AM_CONDITIONAL that is burried under conditional calls, and that is triggeing the about error. NOTE: My first guess was wrong, read the comments below for more details. |
| Comments |
| Comment by Christopher Morrone [ 22/Jan/16 ] |
|
I think my guess was incorrect. It looks like autotools are trying to refresh the files using autoreconf. If I run autoreconf with verbosity enabled I see: $ autoreconf --verbose autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal autoreconf: configure.ac: tracing autoreconf: configure.ac: not running libtoolize: --install not given autoreconf: running: /usr/bin/autoconf autoreconf: running: /usr/bin/autoheader autoreconf: running: automake --no-force autoMakefile.am:122: error: SERVER does not appear in AM_CONDITIONAL autoreconf: automake failed with exit status: 1 So now I suspect this is an issue left over from the days when we had multiple CVS repositories kludged together into one Frankenstein build. The problem is that we are hiding some linkage in the autogen.sh, and not expressing it in a way that the autotools will remember. In particular, in autogen.sh we add multiple include paths on aclocal's command line in autogen.sh ("aclocal -I $pw/config $ACLOCAL_FLAGS") but those don't seem to be known by autoconf later on. I can get exactly the same error if I run the autogen.sh commands leaving out only the includes: $ libtoolize -q $ aclocal $ autoheader $ automake -a -c configure.ac:12: installing 'config/config.guess' configure.ac:12: installing 'config/config.sub' configure.ac:14: installing 'config/install-sh' configure.ac:14: installing 'config/missing' autoMakefile.am:122: error: SERVER does not appear in AM_CONDITIONAL So I think the we need to figure out if/how we can express those includes to the autotools more correctly. |
| Comment by Christopher Morrone [ 22/Jan/16 ] |
|
I think my guess was incorrect. It looks like autotools are trying to refresh the files using autoreconf. If I run autoreconf with verbosity enabled I see: $ autoreconf --verbose autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal autoreconf: configure.ac: tracing autoreconf: configure.ac: not running libtoolize: --install not given autoreconf: running: /usr/bin/autoconf autoreconf: running: /usr/bin/autoheader autoreconf: running: automake --no-force autoMakefile.am:122: error: SERVER does not appear in AM_CONDITIONAL autoreconf: automake failed with exit status: 1 So now I suspect this is an issue left over from the days when we had multiple CVS repositories kludged together into one Frankenstein build. The problem is that we are hiding some linkage in the autogen.sh, and not expressing it in a way that the autotools will remember. In particular, in autogen.sh we add multiple include paths on aclocal's command line in autogen.sh ("aclocal -I $pw/config $ACLOCAL_FLAGS") but those don't seem to be known by autoconf later on. I can get exactly the same error if I run the autogen.sh commands leaving out only the includes: $ libtoolize -q $ aclocal $ autoheader $ automake -a -c configure.ac:12: installing 'config/config.guess' configure.ac:12: installing 'config/config.sub' configure.ac:14: installing 'config/install-sh' configure.ac:14: installing 'config/missing' autoMakefile.am:122: error: SERVER does not appear in AM_CONDITIONAL So I think the we need to figure out if/how we can express those includes to the autotools more correctly. |
| Comment by Gerrit Updater [ 22/Jan/16 ] |
|
Christopher J. Morrone (morrone2@llnl.gov) uploaded a new patch: http://review.whamcloud.com/18099 |
| Comment by Christopher Morrone [ 22/Jan/16 ] |
|
I think I figured out the solution, but it might only work with automake 1.13 and newer. We should be using AC_CONFIG_MACRO_DIRS. |