gearman / gearmand

http://gearman.org/
Other
740 stars 137 forks source link

Alpine 3.20 build error: configure.ac:11: warning: file 'version.m4' included several times #407

Closed esabol closed 3 months ago

esabol commented 4 months ago

Building on Alpine 3.20 fails at the bootstrap (libtoolize) stage:

`/usr/bin/libtoolize --copy --install --force' 
libtoolize: found 'configure.ac'
libtoolize: export M4='/usr/bin/m4'
libtoolize: ac_aux_dir='build-aux'
libtoolize: ltdl mode=''
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: cp -f /usr/share/libtool/build-aux/config.guess build-aux
libtoolize: cp -f /usr/share/libtool/build-aux/config.sub build-aux
libtoolize: cp -f /usr/share/libtool/build-aux/install-sh build-aux
libtoolize: cp -f /usr/share/libtool/build-aux/ltmain.sh build-aux
libtoolize: found 'Makefile.am'
libtoolize: aclocal_amflags=-I m4'
libtoolize: am_macro_dir='m4'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: cp -f /usr/share/aclocal/libtool.m4 m4
libtoolize: Not copying 'm4/ltargz.m4', libltdl not used.
libtoolize: Not copying 'm4/ltdl.m4', libltdl not used.
libtoolize: cp -f /usr/share/aclocal/ltoptions.m4 m4
libtoolize: cp -f /usr/share/aclocal/ltsugar.m4 m4
libtoolize: cp -f /usr/share/aclocal/ltversion.m4 m4
libtoolize: cp -f /usr/share/aclocal/lt~obsolete.m4 m4
libtoolize: found LT_INIT invocation
`/usr/bin/autoreconf --install --force --verbose' 
autoreconf: export WARNINGS=all,error
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --install --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: true --copy --force
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --install --force -I m4
autoreconf: running: /usr/bin/autoconf --force
configure.ac:11: warning: file 'version.m4' included several times
autoreconf: error: /usr/bin/autoconf failed with exit status: 1
./bootstrap.sh:11:  Cannot execute /usr/bin/autoreconf
Error: Process completed with exit code 1.

https://github.com/gearman/gearmand/actions/runs/10027061889/job/27712225025?pr=362#step:10:32

Alpine 3.20.1 has autoconf 2.72-r0 and libtool 2.4.7-r3.

Bootstrap on Alpine 3.17 works. It has autoconf 2.71-r3 and libtool 2.4.7-r1.

esabol commented 4 months ago

Bootstrap on Alpine 3.19 also works. It has autoconf 2.71-r2 and libtool 2.4.7-r3.

That would seem to imply the problem is with autoconf 2.72-r0?

esabol commented 4 months ago

https://lists.gnu.org/archive/html/bug-autoconf/2024-01/msg00012.html says this:

To work around the warning in autoconf-2.72, you can change the spelling of version.m4 to something functionally equivalent, for example:

m4_include([./version.m4])

You can also just go in and delete the indication that Autoconf uses to produce this warning, for example:

m4_builtin([undefine], [m4_include(version.m4)])

Incidentally, while not relevant to your example, Autoconf 2.72 also installs its own version.m4 file to the global m4 include search path, so if you were previously using M4PATH or autoconf's -I option to locate a file with this name then actually m4_include([version.m4]) will pick up the one shipped with Autoconf instead of what probably anyone would actually want to happen in this scenario.

esabol commented 4 months ago

m4_include([./version.m4]) seems to work well, and I think it should avoid the issue with the version.m4 file the autoconf/m4 maintainers have added to the global m4 include search path.

esabol commented 3 months ago

Fixed by PR #409. Closing.