[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: ksh bug on Tru64 UNIX causes current libtool failure
From: |
Ralf Wildenhues |
Subject: |
FYI: ksh bug on Tru64 UNIX causes current libtool failure |
Date: |
Sun, 5 Jun 2005 19:38:59 +0200 |
User-agent: |
Mutt/1.5.9i |
* Nicolas Joly wrote on Thu, Jun 02, 2005 at 09:00:16PM CEST:
> On Thu, Jun 02, 2005 at 10:37:27AM +0200, Ralf Wildenhues wrote:
> > * Nicolas Joly wrote on Thu, Jun 02, 2005 at 01:02:32AM CEST:
> > > On Wed, May 25, 2005 at 06:22:37PM +0200, Ralf Wildenhues wrote:
> > > >
> > > > OK to apply this patch to branch-2-0 and HEAD, and then backport to
> > > > branch-1-5?
> Ok, with the patch applied, both libtool-1.5.18 and branch-1-5 are
> fine: All 112 tests passed.
Applied the first patch below to HEAD, branch-2-0, the second to
branch-1-5.
> > > Unfortunately, i was unable to bootstrap libtool HEAD on my Tru64 unix
> > > workstation. Next step was to bootstrap it on another machine
> > > (NetBSD/amd64); back to the Tru64 machine ... another failure.
> >
> > that just helped us find more HEAD bug(s). :-/
> >
> > First, could you post the exact output of `bootstrap' on Tru64?
>
> I must have done something weird; `./boostrap' now works ... and
> `./configure' too. But print problems arise with the make command :
Since this is not fixed yet, here's at least a workaround: specify
either one (or both) of CONFIG_SHELL and ECHO resp. lt_ECHO (branch-1-5
resp. branch-2-0/HEAD) while configuring. CONFIG_SHELL needs to be done
like so:
CONFIG_SHELL=/bin/foosh /bin/foosh path/to/configure [OPTIONS..]
and you should provide an echo which does not interpret backslashes
(one of `echo', `/bin/echo', `print -r', `printf %s\\n' should usually
do).
Regards,
Ralf
2005-06-05 Ralf Wildenhues <address@hidden>
* config/ltmain.m4sh (func_mode_compile): In order to find out
about forbidden characters in output, check with grep after checking
func_quote_for_eval result. Also, warn instead of fail.
* config/general.m4sh (func_quote_for_eval, func_quote_for_expand):
Revert SunOS sh bug workaround patch from 2004-12-28 as it
triggers bugs in the Tru64 5.1B shell.
Reported by Albert Chin <address@hidden> and
Nicolas Joly <address@hidden>.
Index: config/general.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/general.m4sh,v
retrieving revision 1.17
diff -u -r1.17 general.m4sh
--- config/general.m4sh 22 Apr 2005 10:10:30 -0000 1.17
+++ config/general.m4sh 5 Jun 2005 17:10:28 -0000
@@ -96,9 +96,6 @@
# Same as above, but do not quote variable references.
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-# Protect character class for func_quote_* by variable expansion.
-quote_scanset='[[@<:@~#^*{};<>?'"'"' ]]'
-
# Re-`\' parameter expansions in output of double_quote_subst that were
# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
# in input to double_quote_subst, that '$' was protected from expansion.
@@ -286,11 +283,9 @@
# Double-quote args containing shell metacharacters to delay
# word splitting, command substitution and and variable
# expansion for a subsequent eval.
- # in scan sets, and some SunOS ksh mistreat backslash-escaping
- # in scan sets (worked around with variable expansion),
- # and furthermore cannot handle '|' '&' '(' ')' in scan sets
- # at all, so we specify them separately.
- *$quote_scanset* | *@:>@* | *\|* | *\&* | *\(* | *\)* | "")
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[[\@<:@\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]]*|*@:>@*|"")
func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
;;
*)
@@ -316,11 +311,8 @@
# Double-quote args containing shell metacharacters to delay
# word splitting and command substitution for a subsequent eval.
# Many Bourne shells cannot handle close brackets correctly
- # in scan sets, and some SunOS ksh mistreat backslash-escaping
- # in scan sets (worked around with variable expansion),
- # and furthermore cannot handle '|' '&' '(' ')' in scan sets
- # at all, so we specify them separately.
- *$quote_scanset* | *@:>@* | *\|* | *\&* | *\(* | *\)* | "")
+ # in scan sets, so we specify it separately.
+ *[[\@<:@\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]]*|*@:>@*|"")
my_arg="\"$my_arg\""
;;
esac
Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.67
diff -u -r1.67 ltmain.m4sh
--- config/ltmain.m4sh 31 May 2005 03:49:05 -0000 1.67
+++ config/ltmain.m4sh 5 Jun 2005 17:10:31 -0000
@@ -1228,7 +1228,8 @@
func_quote_for_eval "$libobj"
test "X$libobj" != "X$func_quote_for_eval_result" \
- && func_fatal_error "libobj name \`$libobj' may not contain shell
special characters."
+ && $ECHO "X$libobj" | $GREP ['[@:>@~#^*{};<>?"'"'"' &()|`$@<:@]'] \
+ && func_warning "libobj name \`$libobj' may not contain shell special
characters."
func_basename "$obj"
objname="$func_basename_result"
func_dirname "$obj" "/" ""
2005-06-05 Ralf Wildenhues <address@hidden>
* ltmain.in (compile mode): In order to find out
about forbidden characters in output, check with grep after checking
func_quote_for_eval result. Also, warn instead of fail.
(func_infer_tag, compile mode, link mode, install mode):
Revert SunOS sh bug workaround patch from 2004-12-28 as it
triggers bugs in the Tru64 5.1B shell.
Reported by Albert Chin <address@hidden> and
Nicolas Joly <address@hidden>.
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.70
diff -u -r1.334.2.70 ltmain.in
--- ltmain.in 31 May 2005 03:47:34 -0000 1.334.2.70
+++ ltmain.in 5 Jun 2005 17:11:21 -0000
@@ -133,7 +133,6 @@
execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
-quote_scanset='[[~#^*{};<>?'"'"' ]'
#####################################
# Shell function definitions:
@@ -192,7 +191,7 @@
CC_quoted=
for arg in $CC; do
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -213,7 +212,7 @@
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -627,7 +626,7 @@
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -662,7 +661,7 @@
# in scan sets (worked around with variable expansion),
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
# at all, so we specify them separately.
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
esac
@@ -737,13 +736,12 @@
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
case $qlibobj in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qlibobj="\"$qlibobj\"" ;;
esac
- if test "X$libobj" != "X$qlibobj"; then
- $echo "$modename: libobj name \`$libobj' may not contain shell special
characters."
- exit $EXIT_FAILURE
- fi
+ test "X$libobj" != "X$qlibobj" \
+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && $echo "$modename: libobj name \`$libobj' may not contain shell
special characters."
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@@ -824,7 +822,7 @@
fi
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
case $qsrcfile in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qsrcfile="\"$qsrcfile\"" ;;
esac
@@ -1111,7 +1109,7 @@
arg="$1"
shift
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite:
skip nested quoting test
;;
*) qarg=$arg ;;
@@ -1543,7 +1541,7 @@
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -1659,7 +1657,7 @@
for flag in $args; do
IFS="$save_ifs"
case $flag in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
@@ -1677,7 +1675,7 @@
for flag in $args; do
IFS="$save_ifs"
case $flag in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
@@ -1710,7 +1708,7 @@
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -1844,7 +1842,7 @@
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5367,7 +5365,7 @@
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5383,7 +5381,7 @@
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@@ -5431,7 +5429,7 @@
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
- *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
- Re: ksh bug on Tru64 UNIX causes current libtool failure, Nicolas Joly, 2005/06/01
- Re: ksh bug on Tru64 UNIX causes current libtool failure, Nicolas Joly, 2005/06/02
- FYI: ksh bug on Tru64 UNIX causes current libtool failure,
Ralf Wildenhues <=
- Re: FYI: ksh bug on Tru64 UNIX causes current libtool failure, Nicolas Joly, 2005/06/07
- Re: FYI: ksh bug on Tru64 UNIX causes current libtool failure, Ralf Wildenhues, 2005/06/07
- Re: FYI: ksh bug on Tru64 UNIX causes current libtool failure, Nicolas Joly, 2005/06/07
- Re: FYI: ksh bug on Tru64 UNIX causes current libtool failure, Ralf Wildenhues, 2005/06/07
- Re: FYI: ksh bug on Tru64 UNIX causes current libtool failure, Nicolas Joly, 2005/06/07