GNU bug report logs - #11029
bootstrap problems

Previous Next

Package: libtool;

Reported by: Peter Rosin <peda <at> lysator.liu.se>

Date: Fri, 16 Mar 2012 22:02:01 UTC

Severity: normal

Done: Mike Frysinger <vapier <at> gentoo.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11029 in the body.
You can then email your comments to 11029 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#11029; Package libtool. (Fri, 16 Mar 2012 22:02:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Rosin <peda <at> lysator.liu.se>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Fri, 16 Mar 2012 22:02:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Rosin <peda <at> lysator.liu.se>
To: bug-libtool <at> gnu.org
Subject: bootstrap problems
Date: Fri, 16 Mar 2012 22:30:37 +0100
Hi!

I just bootstrapped a git-checkout, but I had to manually cludge
around a couple of problems.  Namely:

1. gl/top/README-release.diff didn't apply -> "rm gl/top/README-release.diff"
2. Automake didn't like that ChangeLog was missing -> "touch ChangeLog"

After that, ./bootstrap completed.

Cheers,
Peter




Information forwarded to bug-libtool <at> gnu.org:
bug#11029; Package libtool. (Sat, 17 Mar 2012 04:24:02 GMT) Full text and rfc822 format available.

Message #8 received at 11029 <at> debbugs.gnu.org (full text, mbox):

From: Peter O'Gorman <peter <at> pogma.com>
To: Peter Rosin <peda <at> lysator.liu.se>
Cc: 11029 <at> debbugs.gnu.org
Subject: Re: bug#11029: bootstrap problems
Date: Fri, 16 Mar 2012 22:53:02 -0500
Hi Peter,

On 03/16/2012 04:30 PM, Peter Rosin wrote:
> Hi!
>
> I just bootstrapped a git-checkout, but I had to manually cludge
> around a couple of problems.  Namely:
>
> 1. gl/top/README-release.diff didn't apply ->  "rm gl/top/README-release.diff"

Please do this as git rm and commit.

> 2. Automake didn't like that ChangeLog was missing ->  "touch ChangeLog"
>

I had a look at this, bootstrap is supposed to add a dummy ChangeLog for 
this, but does not, depending upon what bs_echo got set to.

func_ifcontains has this:
    # The embedded echo is to squash whitespace before globbing.
    _G_wslist=`$bs_echo " "$1" "`
    _G_member=$2
    _G_yes_cmd=$3
    _G_no_cmd=${4-":"}

    case $_G_wslist in
      *" $_G_member "*)

and is called like this:
func_ifcontains '
        announce-gen
        do-release-commit-and-tag
        gendocs
        git-version-gen
        gitlog-to-changelog
        gnu-web-doc-update
        gnupload
        maintainer-makefile
        readme-release
' gitlog-to-changelog func_ensure_changelog

If bs_echo is printf '%s\n' then the embedded newlines in $_G_wslist do 
not get eliminated by the `$bs_echo " "$1" "` and " gitlog-to-changelog 
" (with those spaces on both sides) is not in the string, so no 
ChangeLog is created.

This function doesn't appear to be part of gnulib yet, and I'm not sure 
how best to fix it.

Changing $bs_echo to 'echo' should work, so should using set foo $1; 
shift (after assigning $2,3 and 4) and then assigning _G_wslist=" $@ ".

I'll look to see how we eliminate spaces and newlines elsewhere in 
libtool and use the same idiom.

Peter




Information forwarded to bug-libtool <at> gnu.org:
bug#11029; Package libtool. (Sat, 17 Mar 2012 19:51:02 GMT) Full text and rfc822 format available.

Message #11 received at 11029 <at> debbugs.gnu.org (full text, mbox):

From: Peter Rosin <peda <at> lysator.liu.se>
To: Peter O'Gorman <peter <at> pogma.com>
Cc: 11029 <at> debbugs.gnu.org
Subject: Re: bug#11029: bootstrap problems
Date: Sat, 17 Mar 2012 20:19:52 +0100
Peter O'Gorman skrev 2012-03-17 04:53:
> On 03/16/2012 04:30 PM, Peter Rosin wrote:
>> I just bootstrapped a git-checkout, but I had to manually cludge
>> around a couple of problems.  Namely:
>>
>> 1. gl/top/README-release.diff didn't apply ->  "rm gl/top/README-release.diff"
> 
> Please do this as git rm and commit.

Ok, done.

*snip* revealing analysis of the ChangeLog situation.

Cheers,
Peter




Information forwarded to bug-libtool <at> gnu.org:
bug#11029; Package libtool. (Mon, 19 Mar 2012 09:19:02 GMT) Full text and rfc822 format available.

Message #14 received at 11029 <at> debbugs.gnu.org (full text, mbox):

From: Peter Rosin <peda <at> lysator.liu.se>
To: Peter O'Gorman <peter <at> pogma.com>
Cc: 11029 <at> debbugs.gnu.org
Subject: Re: bug#11029: bootstrap problems
Date: Mon, 19 Mar 2012 09:48:11 +0100
Peter O'Gorman skrev 2012-03-17 04:53:
> On 03/16/2012 04:30 PM, Peter Rosin wrote:
>> 2. Automake didn't like that ChangeLog was missing ->  "touch ChangeLog"
>>
> 
> I had a look at this, bootstrap is supposed to add a dummy ChangeLog for this, but does not, depending upon what bs_echo got set to.
> 
> func_ifcontains has this:
>     # The embedded echo is to squash whitespace before globbing.
>     _G_wslist=`$bs_echo " "$1" "`
>     _G_member=$2
>     _G_yes_cmd=$3
>     _G_no_cmd=${4-":"}
> 
>     case $_G_wslist in
>       *" $_G_member "*)
> 
> and is called like this:
> func_ifcontains '
>         announce-gen
>         do-release-commit-and-tag
>         gendocs
>         git-version-gen
>         gitlog-to-changelog
>         gnu-web-doc-update
>         gnupload
>         maintainer-makefile
>         readme-release
> ' gitlog-to-changelog func_ensure_changelog
> 
> If bs_echo is printf '%s\n' then the embedded newlines in $_G_wslist do not get eliminated by the `$bs_echo " "$1" "` and " gitlog-to-changelog " (with those spaces on both sides) is not in the string, so no ChangeLog is created.
> 
> This function doesn't appear to be part of gnulib yet, and I'm not sure how best to fix it.
> 
> Changing $bs_echo to 'echo' should work, so should using set foo $1; shift (after assigning $2,3 and 4) and then assigning _G_wslist=" $@ ".
> 
> I'll look to see how we eliminate spaces and newlines elsewhere in libtool and use the same idiom.

Something like this also works:

diff --git a/bootstrap b/bootstrap
index 7b26d00..21d2268 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1803,10 +1803,12 @@ func_ifcontains ()
     _G_member=$2
     _G_yes_cmd=$3
     _G_no_cmd=${4-":"}
+    nl='
+'
 
     case $_G_wslist in
-      *" $_G_member "*)
-        eval "$_G_yes_cmd"
+      *[\ $nl]$_G_member[\ $nl]*)
+	eval "$_G_yes_cmd"
 	_G_status=$?
 	;;
       *)

It fixes the common case when bs_echo is printf '%s\n' at least.  But it doesn't
fix the real bug of course (feeding multiple args to bs_echo).

Cheers,
Peter




Information forwarded to bug-libtool <at> gnu.org:
bug#11029; Package libtool. (Mon, 19 Mar 2012 09:36:02 GMT) Full text and rfc822 format available.

Message #17 received at 11029 <at> debbugs.gnu.org (full text, mbox):

From: Peter Rosin <peda <at> lysator.liu.se>
To: Peter O'Gorman <peter <at> pogma.com>
Cc: 11029 <at> debbugs.gnu.org
Subject: Re: bug#11029: bootstrap problems
Date: Mon, 19 Mar 2012 10:05:11 +0100
Peter Rosin skrev 2012-03-19 09:48:
> Peter O'Gorman skrev 2012-03-17 04:53:
>> On 03/16/2012 04:30 PM, Peter Rosin wrote:
>>> 2. Automake didn't like that ChangeLog was missing ->  "touch ChangeLog"
>>>
>>
>> I had a look at this, bootstrap is supposed to add a dummy ChangeLog for this, but does not, depending upon what bs_echo got set to.
>>
>> func_ifcontains has this:
>>     # The embedded echo is to squash whitespace before globbing.
>>     _G_wslist=`$bs_echo " "$1" "`
>>     _G_member=$2
>>     _G_yes_cmd=$3
>>     _G_no_cmd=${4-":"}
>>
>>     case $_G_wslist in
>>       *" $_G_member "*)
>>
>> and is called like this:
>> func_ifcontains '
>>         announce-gen
>>         do-release-commit-and-tag
>>         gendocs
>>         git-version-gen
>>         gitlog-to-changelog
>>         gnu-web-doc-update
>>         gnupload
>>         maintainer-makefile
>>         readme-release
>> ' gitlog-to-changelog func_ensure_changelog
>>
>> If bs_echo is printf '%s\n' then the embedded newlines in $_G_wslist do not get eliminated by the `$bs_echo " "$1" "` and " gitlog-to-changelog " (with those spaces on both sides) is not in the string, so no ChangeLog is created.
>>
>> This function doesn't appear to be part of gnulib yet, and I'm not sure how best to fix it.
>>
>> Changing $bs_echo to 'echo' should work, so should using set foo $1; shift (after assigning $2,3 and 4) and then assigning _G_wslist=" $@ ".
>>
>> I'll look to see how we eliminate spaces and newlines elsewhere in libtool and use the same idiom.
> 
> Something like this also works:
> 
> diff --git a/bootstrap b/bootstrap
> index 7b26d00..21d2268 100755
> --- a/bootstrap
> +++ b/bootstrap
> @@ -1803,10 +1803,12 @@ func_ifcontains ()
>      _G_member=$2
>      _G_yes_cmd=$3
>      _G_no_cmd=${4-":"}
> +    nl='
> +'
>  
>      case $_G_wslist in
> -      *" $_G_member "*)
> -        eval "$_G_yes_cmd"
> +      *[\ $nl]$_G_member[\ $nl]*)
> +	eval "$_G_yes_cmd"
>  	_G_status=$?
>  	;;
>        *)
> 
> It fixes the common case when bs_echo is printf '%s\n' at least.  But it doesn't
> fix the real bug of course (feeding multiple args to bs_echo).

Oh crap, I forgot the part that made me send any response at all...

I.e. I think the standard way to deal with this in libtool is to
use $NL2SP.  To make up for failing to add that bit, I'm providing a
patch as well...

diff --git a/bootstrap b/bootstrap
index 7b26d00..d118109 100755
--- a/bootstrap
+++ b/bootstrap
@@ -206,6 +206,17 @@ copy=false
 # "auto".
 vc_ignore=
 
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  bs_SP2NL='tr \040 \012'
+  bs_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  bs_SP2NL='tr \100 \n'
+  bs_NL2SP='tr \r\n \100\100'
+  ;;
+esac
 
 ## ------------------- ##
 ## Hookable functions. ##
@@ -1799,14 +1810,14 @@ func_ifcontains ()
     $debug_cmd
 
     # The embedded echo is to squash whitespace before globbing.
-    _G_wslist=`$bs_echo " "$1" "`
+    _G_wslist=`$bs_echo " $1 " | $bs_NL2SP`
     _G_member=$2
     _G_yes_cmd=$3
     _G_no_cmd=${4-":"}
 
     case $_G_wslist in
       *" $_G_member "*)
-        eval "$_G_yes_cmd"
+	eval "$_G_yes_cmd"
 	_G_status=$?
 	;;
       *)

Cheers,
Peter




Information forwarded to bug-libtool <at> gnu.org:
bug#11029; Package libtool. (Wed, 17 Jan 2024 07:57:01 GMT) Full text and rfc822 format available.

Message #20 received at 11029 <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: Peter Rosin <peda <at> lysator.liu.se>
Cc: Peter O'Gorman <peter <at> pogma.com>, 11029 <at> debbugs.gnu.org
Subject: Re: bug#11029: bootstrap problems
Date: Wed, 17 Jan 2024 07:55:53 +0000 (UTC)
this all looks like issues in the bootstrap script which is not maintained in
libtool.  feel free to finish it upstream, if there are still pending issues.
-mike




bug closed, send any further explanations to 11029 <at> debbugs.gnu.org and Peter Rosin <peda <at> lysator.liu.se> Request was from Mike Frysinger <vapier <at> gentoo.org> to control <at> debbugs.gnu.org. (Wed, 17 Jan 2024 07:57:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Feb 2024 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.