public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xfsprogs: fix libtoolize issues
@ 2023-01-19 23:39 Dave Chinner
  2023-01-19 23:39 ` [PATCH 1/2] progs: autoconf fails during debian package builds Dave Chinner
  2023-01-19 23:39 ` [PATCH 2/2] progs: just use libtoolize Dave Chinner
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Chinner @ 2023-01-19 23:39 UTC (permalink / raw)
  To: linux-xfs

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] progs: autoconf fails during debian package builds
  2023-01-19 23:39 [PATCH 0/2] xfsprogs: fix libtoolize issues Dave Chinner
@ 2023-01-19 23:39 ` Dave Chinner
  2023-01-20 14:15   ` Carlos Maiolino
  2023-01-19 23:39 ` [PATCH 2/2] progs: just use libtoolize Dave Chinner
  1 sibling, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2023-01-19 23:39 UTC (permalink / raw)
  To: linux-xfs

From: Dave Chinner <dchinner@redhat.com>

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.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 Makefile | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 0edc2700933d..c8455a9e665f 100644
--- a/Makefile
+++ b/Makefile
@@ -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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] progs: just use libtoolize
  2023-01-19 23:39 [PATCH 0/2] xfsprogs: fix libtoolize issues Dave Chinner
  2023-01-19 23:39 ` [PATCH 1/2] progs: autoconf fails during debian package builds Dave Chinner
@ 2023-01-19 23:39 ` Dave Chinner
  2023-01-20 14:16   ` Carlos Maiolino
  1 sibling, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2023-01-19 23:39 UTC (permalink / raw)
  To: linux-xfs

From: Dave Chinner <dchinner@redhat.com>

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 <dchinner@redhat.com>
---
 Makefile | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index c8455a9e665f..c12df98dbef3 100644
--- a/Makefile
+++ b/Makefile
@@ -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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] progs: autoconf fails during debian package builds
  2023-01-19 23:39 ` [PATCH 1/2] progs: autoconf fails during debian package builds Dave Chinner
@ 2023-01-20 14:15   ` Carlos Maiolino
  0 siblings, 0 replies; 5+ messages in thread
From: Carlos Maiolino @ 2023-01-20 14:15 UTC (permalink / raw)
  To: Dave Chinner; +Cc: linux-xfs

On Fri, Jan 20, 2023 at 10:39:05AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> 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.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

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.

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
>  Makefile | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 0edc2700933d..c8455a9e665f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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
> 

-- 
Carlos Maiolino

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] progs: just use libtoolize
  2023-01-19 23:39 ` [PATCH 2/2] progs: just use libtoolize Dave Chinner
@ 2023-01-20 14:16   ` Carlos Maiolino
  0 siblings, 0 replies; 5+ messages in thread
From: Carlos Maiolino @ 2023-01-20 14:16 UTC (permalink / raw)
  To: Dave Chinner; +Cc: linux-xfs

On Fri, Jan 20, 2023 at 10:39:06AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> 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 <dchinner@redhat.com>

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> ---
>  Makefile | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index c8455a9e665f..c12df98dbef3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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
> 

-- 
Carlos Maiolino

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-20 14:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 23:39 [PATCH 0/2] xfsprogs: fix libtoolize issues Dave Chinner
2023-01-19 23:39 ` [PATCH 1/2] progs: autoconf fails during debian package builds Dave Chinner
2023-01-20 14:15   ` Carlos Maiolino
2023-01-19 23:39 ` [PATCH 2/2] progs: just use libtoolize Dave Chinner
2023-01-20 14:16   ` Carlos Maiolino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox