Re: [PATCH] improve 'autotools-install'
Hello Stefano, Stefano Lattarini wrote, On 02/22/2013 02:30 AM: On 02/22/2013 12:08 AM, Assaf Gordon wrote: I think this explanation should go in the commit message of the second patch, as it makes clear why such patch is needed. Good idea, attached an improved patch. Sadly, autotools-install still doesn't complete, because gettext0.18.1 fails to compile with stpncpy() related problem (exactly as solved in coreutils [2]) but that's is not a coreutil bug. Is the issue still present with the latest gettext version (1.18.2)? If not, you could update the '$tarballs' definition to point to that instead. No, 0.18.2 doesn't compile either. Eric Blake already found the fix for this, I'll just send the gettext people a bug report. Also, I see that the Automake version referenced by '$tarballs' is still 1.12.3; I think it should be updated to the latest available version (1.13.2 at the moment of writing). I can send a separate patch for that, but perhaps others would chime in as to whether this should be done? I assume changing version (1.12 vs 1.13) should be done when it's explicitly needed? -gordon From ba2c30e47e808c60bd5e899caca1207dae5aa95a Mon Sep 17 00:00:00 2001 From: Assaf Gordon assafgor...@gmail.com Date: Thu, 21 Feb 2013 17:50:28 -0500 Subject: [PATCH 1/2] maint: print errors with autotools-install fails * scripts/autotools-install: call die() when configure/make fail. Point the user to the relevant error log file. --- scripts/autotools-install |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/autotools-install b/scripts/autotools-install index bd49664..419806d 100755 --- a/scripts/autotools-install +++ b/scripts/autotools-install @@ -148,8 +148,12 @@ for pkg in $pkgs; do rm -rf $dir gzip -dc $pkg | tar xf - cd $dir - ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix makerr-config 21 - $MAKE makerr-build 21 + ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix makerr-config 21 \ +|| die configuring package $dir failed. \ +check '$tmpdir/$dir/makerr-config' for possible details. + $MAKE makerr-build 21 \ +|| die building package $dir failed. \ +check '$tmpdir/$dir/makerr-build' for possible details. if test $make_check = yes; then case $pkg in # FIXME: these are out of date and very system-sensitive -- 1.7.7.4 From 49c577432325de449239ce5ed5e2b82e401eee14 Mon Sep 17 00:00:00 2001 From: Assaf Gordon assafgor...@gmail.com Date: Thu, 21 Feb 2013 17:58:55 -0500 Subject: [PATCH 2/2] maint: add special config flags for pkg-config * scripts/autotools-install: force pkg-config to use internal 'glib' files when compiling from source. Recent pkg-config has a cyclic requirement of glib, explained in the pkg-config's README: http://cgit.freedesktop.org/pkg-config/tree/README?id=pkg-config-0.27.1 pkg-config depends on glib. Note that glib build-depends on pkg-config, but you can just set the corresponding environment variables to build it. If this requirement is too cumbersome, a bundled copy of a recent glib stable release is included. Pass --with-internal-glib to configure to use this copy. --- scripts/autotools-install |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/scripts/autotools-install b/scripts/autotools-install index 419806d..2b626ff 100755 --- a/scripts/autotools-install +++ b/scripts/autotools-install @@ -144,11 +144,13 @@ pkgs=`get_sources` export PATH=$prefix/bin:$PATH for pkg in $pkgs; do echo building/installing $pkg... + extra= + case $pkg in pkg-config*) extra=--with-internal-glib;; esac dir=`basename $pkg .tar.gz` rm -rf $dir gzip -dc $pkg | tar xf - cd $dir - ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix makerr-config 21 \ + ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix $extramakerr-config 21 \ || die configuring package $dir failed. \ check '$tmpdir/$dir/makerr-config' for possible details. $MAKE makerr-build 21 \ -- 1.7.7.4
Re: [PATCH] improve 'autotools-install'
On 02/22/2013 05:15 PM, Assaf Gordon wrote: [SNIP] No, 0.18.2 doesn't compile either. Eric Blake already found the fix for this, I'll just send the gettext people a bug report. Good idea. Also, I see that the Automake version referenced by '$tarballs' is still 1.12.3; I think it should be updated to the latest available version (1.13.2 at the moment of writing). Erm, s/1.13.2/1.13.1/. Sorry for the confusion. I can send a separate patch for that, but perhaps others would chime in as to whether this should be done? I assume changing version (1.12 vs 1.13) should be done when it's explicitly needed? Actually, I believe the purpose of the 'autotools-install' script is to fetch and install the *latest* available version of the autotools (and of gettext); so the version bump should be automatic whenever a new m4, autoconf, automake, libtool or gettext version comes along. Thanks, Stefano
[PATCH] improve 'autotools-install'
Hello, Trying to use 'scripts/autotools-install' on a problematic system (Mac OS X 10.6.8, already has few other related bugs), building pkg-config fails. Two patches attached: 1. When ./configure or make fail, use die() to print an error, pointing the user to the error log file. This helps when troubleshooting errors, because the script has set -e and simply exits on errors. 2. Recent pkg-config has a cyclic requirement of glib, explained in the README [1]: pkg-config depends on glib. Note that glib build-depends on pkg-config, but you can just set the corresponding environment variables (ZLIB_LIBS, ZLIB_CFLAGS are the only needed ones when this is written) to build it. If this requirement is too cumbersome, a bundled copy of a recent glib stable release is included. Pass --with-internal-glib to configure to use this copy. The second patch adds this --with-internal-glib flag when configuring pkg-config . Sadly, autotools-install still doesn't complete, because gettext0.18.1 fails to compile with stpncpy() related problem (exactly as solved in coreutils [2]) but that's is not a coreutil bug. -gordon [1] http://cgit.freedesktop.org/pkg-config/tree/README?id=pkg-config-0.27.1 [2] http://bugs.gnu.org/13495 From ba2c30e47e808c60bd5e899caca1207dae5aa95a Mon Sep 17 00:00:00 2001 From: Assaf Gordon assafgor...@gmail.com Date: Thu, 21 Feb 2013 17:50:28 -0500 Subject: [PATCH 1/2] maint: print errors with autotools-install fails * scripts/autotools-install: call die() when configure/make fail. Point the user to the relevant error log file. --- scripts/autotools-install |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/autotools-install b/scripts/autotools-install index bd49664..419806d 100755 --- a/scripts/autotools-install +++ b/scripts/autotools-install @@ -148,8 +148,12 @@ for pkg in $pkgs; do rm -rf $dir gzip -dc $pkg | tar xf - cd $dir - ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix makerr-config 21 - $MAKE makerr-build 21 + ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix makerr-config 21 \ +|| die configuring package $dir failed. \ +check '$tmpdir/$dir/makerr-config' for possible details. + $MAKE makerr-build 21 \ +|| die building package $dir failed. \ +check '$tmpdir/$dir/makerr-build' for possible details. if test $make_check = yes; then case $pkg in # FIXME: these are out of date and very system-sensitive -- 1.7.7.4 From c3d135c51e20ceb72d5b453081bea1e1899f9ef1 Mon Sep 17 00:00:00 2001 From: Assaf Gordon assafgor...@gmail.com Date: Thu, 21 Feb 2013 17:58:55 -0500 Subject: [PATCH 2/2] maint: add special config flags for pkg-config * scripts/autotools-install: force pkg-config to use internal 'glib' files when compiling from source. --- scripts/autotools-install |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/scripts/autotools-install b/scripts/autotools-install index 419806d..2b626ff 100755 --- a/scripts/autotools-install +++ b/scripts/autotools-install @@ -144,11 +144,13 @@ pkgs=`get_sources` export PATH=$prefix/bin:$PATH for pkg in $pkgs; do echo building/installing $pkg... + extra= + case $pkg in pkg-config*) extra=--with-internal-glib;; esac dir=`basename $pkg .tar.gz` rm -rf $dir gzip -dc $pkg | tar xf - cd $dir - ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix makerr-config 21 \ + ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix $extramakerr-config 21 \ || die configuring package $dir failed. \ check '$tmpdir/$dir/makerr-config' for possible details. $MAKE makerr-build 21 \ -- 1.7.7.4
Re: [PATCH] improve 'autotools-install'
On 02/22/2013 12:08 AM, Assaf Gordon wrote: 2. Recent pkg-config has a cyclic requirement of glib, explained in the README [1]: pkg-config depends on glib. Note that glib build-depends on pkg-config, but you can just set the corresponding environment variables (ZLIB_LIBS, ZLIB_CFLAGS are the only needed ones when this is written) to build it. If this requirement is too cumbersome, a bundled copy of a recent glib stable release is included. Pass --with-internal-glib to configure to use this copy. I think this explanation should go in the commit message of the second patch, as it makes clear why such patch is needed. The second patch adds this --with-internal-glib flag when configuring pkg-config . Sadly, autotools-install still doesn't complete, because gettext0.18.1 fails to compile with stpncpy() related problem (exactly as solved in coreutils [2]) but that's is not a coreutil bug. Is the issue still present with the latest gettext version (1.18.2)? If not, you could update the '$tarballs' definition to point to that instead. Also, I see that the Automake version referenced by '$tarballs' is still 1.12.3; I think it should be updated to the latest available version (1.13.2 at the moment of writing). -gordon [1] http://cgit.freedesktop.org/pkg-config/tree/README?id=pkg-config-0.27.1 [2] http://bugs.gnu.org/13495 Thanks, Stefano