xfsprogs: fix libtoolize issues
cover xfsprogs: fix libtoolize issues
HI folks,
Just hit the problem fixed in the first patch trying to build a 6.1.1 release. I don't know when the problem started, or whether it's caused by upgrading userspace on the build machine, but I don't really feel inclined to spend hours trying to track down some whacky environmental issue that we really shouldn't need to care about because the code that is breaking is there to support 15+ year old build tools.
The second patch is just cleaning up the libtoolize mess that MacOS platform support required that is no longer necessary because I noticed it at the same time....
-Dave.
PATCH 1/2 progs: autoconf fails during debian package builds
From: Dave Chinner <[email protected]>
For some reason, a current debian testing build system will fail to build debian packages because the build environment is not correctly detecting that libtoolize needs the "-i" parameter to copy in the files needed by autoconf.
My build scripts run "make -j 16 realclean; make -j 16 deb", and the second step is failing immediately with:
libtoolize -c libtoolize -n -i >/dev/null 2>/dev/null && echo -i -f
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. cp include/install-sh .
aclocal -I m4
autoconf
./configure $LOCAL_CONFIGURE_OPTIONS
configure: error: cannot find required auxiliary files: config.guess config.sub
make: *** [Makefile:131: include/builddefs] Error 1
If I run 'make realclean; make deb' from the command line, the package build runs to completion. I have not been able to work out why the initial build fails, but then succeeds after a 'make realclean' has been run, and I don't feel like spending hours running down this rabbit hole.
This conditional "-i" flag detection was added back in *2009* when default libtoolize behaviour was changed to not copy the config files into the build area, and the "-i" flag was added to provide that behaviour. It is detecting that the "-i" flag is needed that is now failing, but it is most definitely still needed.
Rather than ispending lots of time trying to understand this and then making the detection more complex, just use the "-i" flag unconditionally and require any userspace that this now breaks on to upgrade their 15+ year old version of libtoolize something a little more modern.
--- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
Makefile +1 -7
@@ -115,14 +115,8 @@ else clean: # if configure hasn't run, nothing to clean endif - -# Recent versions of libtool require the -i option for copying auxiliary -# files (config.sub, config.guess, install-sh, ltmain.sh), while older -# versions will copy those files anyway, and don't understand -i. -LIBTOOLIZE_INSTALL = `$(LIBTOOLIZE_BIN) -n -i >/dev/null 2>/dev/null && echo -i` - configure: configure.ac - $(LIBTOOLIZE_BIN) -c $(LIBTOOLIZE_INSTALL) -f + $(LIBTOOLIZE_BIN) -c -i -f cp include/install-sh . aclocal -I m4 autoconf
Signature · 1 line
2.39.0
Re: [PATCH 1/2] progs: autoconf fails during debian package builds
Quoted 39 lines · Dave Chinner
From: Dave Chinner <[email protected]>
For some reason, a current debian testing build system will fail to build debian packages because the build environment is not correctly detecting that libtoolize needs the "-i" parameter to copy in the files needed by autoconf.
My build scripts run "make -j 16 realclean; make -j 16 deb", and the second step is failing immediately with:
libtoolize -c
libtoolize -n -i >/dev/null 2>/dev/null && echo -i-f
libtoolize: putting auxiliary files inAC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros inAC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Consider adding '-I m4' toACLOCAL_AMFLAGSin Makefile.am. cpinclude/install-sh.
aclocal -I m4
autoconf
./configure $LOCAL_CONFIGURE_OPTIONS
configure: error: cannot find required auxiliary files: config.guess config.sub
make: *** [Makefile:131:include/builddefs] Error 1If I run 'make realclean; make deb' from the command line, the package build runs to completion. I have not been able to work out why the initial build fails, but then succeeds after a 'make realclean' has been run, and I don't feel like spending hours running down this rabbit hole.
This conditional "-i" flag detection was added back in *2009* when default libtoolize behaviour was changed to not copy the config files into the build area, and the "-i" flag was added to provide that behaviour. It is detecting that the "-i" flag is needed that is now failing, but it is most definitely still needed.
Quoted 7 lines
Rather than ispending lots of time trying to understand this and then making the detection more complex, just use the "-i" flag unconditionally and require any userspace that this now breaks on to upgrade their 15+ year old version of libtoolize something a little more modern.
Signed-off-by Dave Chinner <[email protected]>
Seems fair enough.
It's still working on debian 11 stable, I'm curious to understand what breaks the detection of -i argument for libtoolize, I'm gonna give it a try on testing.
Quoted 27 lines
--- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)Makefile +1
-8@@ -115,14 +115,8 @@ else clean: # if configure hasn't run, nothing to clean endif - -# Recent versions of libtool require the -i option for copying auxiliary -# files (config.sub, config.guess, install-sh, ltmain.sh), while older -# versions will copy those files anyway, and don't understand -i. -LIBTOOLIZE_INSTALL = `$(LIBTOOLIZE_BIN) -n -i >/dev/null 2>/dev/null && echo -i` - configure: configure.ac - $(LIBTOOLIZE_BIN) -c $(LIBTOOLIZE_INSTALL) -f + $(LIBTOOLIZE_BIN) -c -i -f cp include/install-sh . aclocal -I m4 autoconf --2.39.0
Signature · 1 line
Carlos Maiolino
PATCH 2/2 progs: just use libtoolize
In reply to Dave ChinnerFrom: Dave Chinner <[email protected]>
We no longer support xfsprogs on random platforms other than Linux, so drop the complexity in detecting the libtoolize binary on MacOS from the main makefile.
--- Makefile | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
Makefile +1 -9
@@ -73,14 +73,6 @@ ifneq ("$(XGETTEXT)","") TOOL_SUBDIRS += po endif -# If we are on OS X, use glibtoolize from MacPorts, as OS X doesn't have -# libtoolize binary itself. -LIBTOOLIZE_TEST=$(shell libtoolize --version >/dev/null 2>&1 && echo found) -LIBTOOLIZE_BIN=libtoolize -ifneq ("$(LIBTOOLIZE_TEST)","found") -LIBTOOLIZE_BIN=glibtoolize -endif - # include is listed last so it is processed last in clean rules. SUBDIRS = $(LIBFROG_SUBDIR) $(LIB_SUBDIRS) $(TOOL_SUBDIRS) include
@@ -116,7 +108,7 @@ clean: # if configure hasn't run, nothing to clean endif configure: configure.ac - $(LIBTOOLIZE_BIN) -c -i -f + libtoolize -c -i -f cp include/install-sh . aclocal -I m4 autoconf
Signature · 1 line
2.39.0
Re: [PATCH 2/2] progs: just use libtoolize
Quoted 7 lines · Dave Chinner
From: Dave Chinner <[email protected]>
We no longer support xfsprogs on random platforms other than Linux, so drop the complexity in detecting the libtoolize binary on MacOS from the main makefile.
Signed-off-by Dave Chinner <[email protected]>
Quoted 35 lines
--- Makefile | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)Makefile +1
-10@@ -73,14 +73,6 @@ ifneq ("$(XGETTEXT)","") TOOL_SUBDIRS += po endif -# If we are on OS X, use glibtoolize from MacPorts, as OS X doesn't have -# libtoolize binary itself. -LIBTOOLIZE_TEST=$(shell libtoolize --version >/dev/null 2>&1 && echo found) -LIBTOOLIZE_BIN=libtoolize -ifneq ("$(LIBTOOLIZE_TEST)","found") -LIBTOOLIZE_BIN=glibtoolize -endif - # include is listed last so it is processed last in clean rules. SUBDIRS = $(LIBFROG_SUBDIR) $(LIB_SUBDIRS) $(TOOL_SUBDIRS) include@@ -116,7 +108,7 @@ clean: # if configure hasn't run, nothing to clean endif configure: configure.ac - $(LIBTOOLIZE_BIN) -c -i -f + libtoolize -c -i -f cp include/install-sh . aclocal -I m4 autoconf --2.39.0
Signature · 1 line
Carlos Maiolino