From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19233 invoked from network); 10 Feb 2006 08:45:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 10 Feb 2006 08:45:35 -0000 Received: (qmail 34671 invoked from network); 10 Feb 2006 08:45:29 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Feb 2006 08:45:29 -0000 Received: (qmail 25710 invoked by alias); 10 Feb 2006 08:45:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22208 Received: (qmail 25700 invoked from network); 10 Feb 2006 08:45:25 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 10 Feb 2006 08:45:25 -0000 Received: (qmail 34334 invoked from network); 10 Feb 2006 08:45:25 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 10 Feb 2006 08:45:23 -0000 Received: from 212.red-80-35-44.staticip.rima-tde.net ([80.35.44.212]:32805 helo=localhost) by ns9.hostinglmi.net with esmtpa (Exim 4.52) id 1F7Tu8-0007lV-VJ for zsh-workers@sunsite.dk; Fri, 10 Feb 2006 09:45:25 +0100 Date: Fri, 10 Feb 2006 09:46:30 +0100 From: DervishD To: Zsh-workers Subject: Re: Libtool/zsh quoting problem Message-ID: <20060210084630.GA189@DervishD> Mail-Followup-To: Zsh-workers References: <20060209233201.GA5875@fargo> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20060209233201.GA5875@fargo> User-Agent: Mutt/1.4.2.1i Organization: DervishD X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns9.hostinglmi.net X-AntiAbuse: Original Domain - sunsite.dk X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dervishd.net X-Source: X-Source-Args: X-Source-Dir: Hi David :) * David dixit: > From some time till now i was having problems compiling certaing > packages, in particular those ones that used macros in the command > with spaces in it. I thought it was a libtool problem, but the > culprit seems zsh ;). It's not exactly a "culprit" ;) In fact zsh is behaving correctly according to the SUS standard, as far as I know. More below. > A example, with the littlecms source (http://www.littlecms.com): [Non relevant parts of the command stripped] > if /bin/sh ../libtool [...] -DPACKAGE_STRING=\"lcms\ 1.15\" > gcc [...] -DPACKAGE_STRING=\"lcms 1.15\" cmscnvrt.c -o .libs/cmscnvrt.o > gcc: 1.15": No such file or directory [...] > Where -DPACKAGE_STRING=\"lcms 1.15\" in the gcc command should be > quoted to avoid the error. Exactly. If it is not quoted (I mean, with additional double quotes or something like that), gcc will do the above. The problem is that libtool may be using some bash-only construct to do the additional quoting. That's the standard (SUS/POSIX) behaviour: by default unquoted strings are splitted in spaces. But the problem is a bit more subtle ;) Look at the "libtool" invocation: there, the space is properly quoted with a backslash that, after that, is lost. The "gcc" invocation no longer has that backslash. This may be a problem in libtool, which is not correctly propagating that backslash, or in the makefile, which is passing that backslash to the shell invoking libtool so it is lost (the shell strips it after processing the command line, so if the same string is passed, unquoted, to another command (gcc in this case), it is interpreted as TWO arguments. > Is there any option in zsh to avoid this problem? Not that I know of, because I think that SH_WORDSPLIT doesn't apply here. I can investigate (if you want), where the problem lies and why Bash behaves differently from zsh to see if the culprit is zsh, bash or libtool. I recently discovered that bash was the culprit because it violates the standard and I thought that the problem was in zsh O:) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net http://www.pleyades.net & http://www.gotesdelluna.net It's my PC and I'll cry if I want to... RAmen!