delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/26/16:58:37

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: ericblake AT comcast DOT net (Eric Blake)
To: Frank Wein <mcsmurf AT mcsmurf DOT de>, cygwin AT cygwin DOT com
Subject: Re: Problem with path conversion since update from/of ash to bash?
Date: Tue, 26 Jul 2005 20:58:22 +0000
Message-Id: <072620052058.16006.42E6A3EE0009760400003E8622007456720A050E040D0C079D0A@comcast.net>
X-Authenticated-Sender: ZXJpY2JsYWtlQGNvbWNhc3QubmV0

> i'm reporting this problem based on observations from multiple people.
> The problem is that the configure script of Mozilla/Firefox/etc.
> stopped working since people updated their cygwin. The problem is
> caused by these lines (see
> http://lxr.mozilla.org/mozilla/source/configure.in#1634 for context):
> 
> 1634     MOZ_TOOLS_DIR=`cd $MOZ_TOOLS && pwd`
> 1635     if test "$?" != "0" || test -z "$MOZ_TOOLS_DIR"; then
> 1636         AC_MSG_ERROR([cd \$MOZ_TOOLS failed. MOZ_TOOLS ==?
> $MOZ_TOOLS])
> 1637     fi

Works for me on the command line from bash:

$ DIR='c:\Documents and Settings'
$ NICEDIR=`cd "$DIR" && pwd`
$ echo $? $NICEDIR
0 /cygdrive/c/Documents and Settings
$ bash --version
GNU bash, version 3.00.16(8)-release (i686-pc-cygwin)
Copyright (C) 2004 Free Software Foundation, Inc.

But you're right - sh doesn't like it.  Something about POSIX settings
changes how liberal bash is with pathnames:

bash --posix -c "cd 'c:\Documents and Settings' && pwd"
bash: line 0: cd: c:\Documents and Settings: No such file or directory

I hope to find and fold in a fix in the upcoming bash-3.0-10.

> 
> Now it seems Cygwin (sh?) doesn't do this conversion from a Windows
> path to a cygwin path anymore. Normally you had to set
> MOZ_TOOLS=C:\moztools and the &&pwd would magically convert this to
> /cygdrive/c/moztools AFAIK. But people reported that since they
> started to update to ash-20040127-3 (which also seemed to change the
> default shell to bash, is this correct?)

Yes, the change to bash is correct and intentional.

> Now you have to set MOZ_TOOLS=/cygdrive/c/moztools as a env var (or
> C:/moztools). Now who's to blame for that, ash, bash, the env var?
> Should the build instructions just be changed to say that a POSIX path
> should be used?

You could always update the Mozilla build script to use cygpath to
perform the conversion:

MOZ_TOOLS_DIR=`cygpath -u "$MOZ_TOOLS"`

--
Eric Blake
volunteer cygwin bash maintainer



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019