From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30860 invoked by alias); 19 Aug 2012 20:09:06 -0000 Received: (qmail 30848 invoked by uid 22791); 19 Aug 2012 20:09:04 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.lysator.liu.se (HELO mail.lysator.liu.se) (130.236.254.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Aug 2012 20:08:50 +0000 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 36C354030B; Sun, 19 Aug 2012 22:08:48 +0200 (CEST) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id CB1E140313; Sun, 19 Aug 2012 22:08:47 +0200 (CEST) Message-ID: <50314800.4010408@lysator.liu.se> Date: Sun, 19 Aug 2012 20:56:00 -0000 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Libtool Patches List CC: cygwin@cygwin.com, aschiffler@ferzkopp.net Subject: Re: libtool quoting error References: <50311C56.8050607@ferzkopp.net> In-Reply-To: <50311C56.8050607@ferzkopp.net> Content-Type: multipart/mixed; boundary="------------080709090709090408050701" Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-08/txt/msg00463.txt.bz2 --------------080709090709090408050701 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 1790 [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" Content-length: 1832 >From c50b8d27d5832ca1c962bf3dec46c1b85eff5bad Mon Sep 17 00:00:00 2001 From: Peter Rosin 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@fairlite.co.uk Alexei Sheplyakov varg@theor.jinr.ru Alon Bar-Lev alon.barlev@gmail.com + Andreas Schiffler aschiffler@ferzkopp.net Andreas Schwab schwab@suse.de Andrey Slepuhin pooh@msu.ru Aneesh Kumar K.V kvaneesh@hotmail.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 Content-length: 218 -- 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--