Problem with path conversion since update from/of ash to bash?
Eric Blake
ericblake@comcast.net
Tue Jul 26 21:08:00 GMT 2005
> 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/
More information about the Cygwin
mailing list