Mail Archives: cygwin/2012/08/19/16:09:19
--------------080709090709090408050701
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
[Cygwinners: Taking this to the Libtool lists]
[Libtoolers: Following up on a post on the cygwin mailing list]
On 2012-08-19 19:03, Andreas Schiffler wrote:
> The libtool distributed with cygwin has a bug that prevents use in paths containing spaces.
> This was encountered when trying to build SDL2 on Windows (see http://bugzilla.libsdl.org/show_bug.cgi?id=1575 for details or repro).
>
> # Which release of libtool.m4 was used?
> macro_version=2.2.6
> macro_revision=1.3012
>
> The fix is simple: add additional quoting.
>
> $ diff libtool libtool-fixed
> 2797c2797
> < exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
> ---
>> exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
> 8321c8321
> < if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
> ---
>> if test "X$ECHO" = "X$SHELL \"$progpath\" --fallback-echo"; then
> 8323,8324c8323,8324
> < [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
> < *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
> ---
>> [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL \"$progpath\" --fallback-echo";;
>> *) qecho="$SHELL `pwd`/\"$progpath\" --fallback-echo";;
> 8559c8559
> < relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
> ---
>> relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
The code changed in the two middle hunks went out after 2.2.6 and
are thus gone in 2.2.8 and later, so that no longer applies.
I also took the liberty of changing ltmain.m4sh instead of the
generated libtool script.
So, this is a better attempt for a patch, with Andreas added to
THANKS.
Ok to push?
Cheers,
Peter
--------------080709090709090408050701
Content-Type: text/x-patch;
name="0001-libtool-quote-progpath-properly.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0001-libtool-quote-progpath-properly.patch"
From c50b8d27d5832ca1c962bf3dec46c1b85eff5bad Mon Sep 17 00:00:00 2001
From: Peter Rosin <peda AT lysator DOT liu DOT se>
Date: Sun, 19 Aug 2012 22:06:06 +0200
Subject: [PATCH] libtool: quote progpath properly
Attempt to handle spaces in paths better.
* build-aux/ltmain.m4sh (func_mode_install, func_mode_link): Quote
$progpath.
* THANKS: Update.
---
THANKS | 1 +
build-aux/ltmain.m4sh | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/THANKS b/THANKS
index 84cb6c9..24f1c91 100644
--- a/THANKS
+++ b/THANKS
@@ -70,6 +70,7 @@
Alan Hourihane alanh AT fairlite DOT co DOT uk
Alexei Sheplyakov varg AT theor DOT jinr DOT ru
Alon Bar-Lev alon DOT barlev AT gmail DOT com
+ Andreas Schiffler aschiffler AT ferzkopp DOT net
Andreas Schwab schwab AT suse DOT de
Andrey Slepuhin pooh AT msu DOT ru
Aneesh Kumar K.V kvaneesh AT hotmail DOT com
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh
index 30f99f4..968b727 100644
--- a/build-aux/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -2449,7 +2449,7 @@ func_mode_install ()
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
$opt_dry_run && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
else
exit $EXIT_SUCCESS
fi
@@ -8506,7 +8506,7 @@ EOF
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command="(cd `pwd`; $SHELL "$progpath" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
if test yes = "$hardcode_automatic"; then
relink_command=
--
1.7.9
--------------080709090709090408050701
Content-Type: text/plain; charset=us-ascii
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--------------080709090709090408050701--
- Raw text -