Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-18 Thread Corinna Vinschen
On Jun 17 16:29, Fahlgren, Eric wrote:
 Vadim Zeitlin wrote:
   Could someone else please test this under Windows 7 to confirm the bug?
 
 Windows 7 Pro 64-bit
 
 $ ls C:/cygwin/lib/X11/../libc.a
 C:/cygwin/lib/X11/../libc.a
 $ ls C:/cygwin/lib/X11/..//libc.a
 ls: cannot access C:/cygwin/lib/X11/..//libc.a: No such file or directory
 
 $ uname -a
 CYGWIN_NT-6.1-WOW64 LM-XERXES 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin

Don't use Windows paths, use POSIX paths:

  $ ls /lib/X11/../libc.a
  libc.a
  $ ls /lib/X11/..//libc.a
  libc.a


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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



Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-18 Thread Vadim Zeitlin
Corinna Vinschen corinna-cygwin at cygwin.com writes:

 On Jun 17 16:29, Fahlgren, Eric wrote:
  Vadim Zeitlin wrote:
Could someone else please test this under Windows 7 to confirm the bug?
  
  Windows 7 Pro 64-bit
  
  $ ls C:/cygwin/lib/X11/../libc.a
  C:/cygwin/lib/X11/../libc.a
  $ ls C:/cygwin/lib/X11/..//libc.a
  ls: cannot access C:/cygwin/lib/X11/..//libc.a: No such file or directory
  
  $ uname -a
  CYGWIN_NT-6.1-WOW64 LM-XERXES 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin
 
 Don't use Windows paths, use POSIX paths:

 As I wrote in my first message[*], I unfortunately can't avoid using
Windows paths because the original path comes from g++ -print-search-dirs
output of a MinGW compiler. This explains its format and also the trailing
slash that I can't easily remove neither because the path is processed by
libtool. And while in the future I might try switching to Cygwin MinGW
cross-compiler, this can't be done right now so I'd really like to find
some way of making Windows paths with ..// in them work with Cygwin.

 Regards,
VZ

[*] http://article.gmane.org/gmane.os.cygwin/127246



--
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



Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-18 Thread Corinna Vinschen
On Jun 18 11:18, Vadim Zeitlin wrote:
 Corinna Vinschen corinna-cygwin at cygwin.com writes:
 
  On Jun 17 16:29, Fahlgren, Eric wrote:
   Vadim Zeitlin wrote:
 Could someone else please test this under Windows 7 to confirm the bug?
   
   Windows 7 Pro 64-bit
   
   $ ls C:/cygwin/lib/X11/../libc.a
   C:/cygwin/lib/X11/../libc.a
   $ ls C:/cygwin/lib/X11/..//libc.a
   ls: cannot access C:/cygwin/lib/X11/..//libc.a: No such file or directory
   
   $ uname -a
   CYGWIN_NT-6.1-WOW64 LM-XERXES 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 
   Cygwin
  
  Don't use Windows paths, use POSIX paths:
 
  As I wrote in my first message[*], I unfortunately can't avoid using
 Windows paths because the original path comes from g++ -print-search-dirs
 output of a MinGW compiler. This explains its format and also the trailing
 slash that I can't easily remove neither because the path is processed by
 libtool. And while in the future I might try switching to Cygwin MinGW
 cross-compiler, this can't be done right now so I'd really like to find
 some way of making Windows paths with ..// in them work with Cygwin.

cygpath -pm `some-mingw-g++ -print-search-dirs`

Other than that, I fixed that in CVS.  It's a Win32 path coversion problem
which only occurs if there are multiple backslashes trailing a .. path
component.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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



Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-18 Thread Vadim Zeitlin
Corinna Vinschen corinna-cygwin at cygwin.com writes:

 On Jun 18 11:18, Vadim Zeitlin wrote:
  Corinna Vinschen corinna-cygwin at cygwin.com writes:
   
   Don't use Windows paths, use POSIX paths:
  
   As I wrote in my first message[*], I unfortunately can't avoid using
  Windows paths because the original path comes from g++ -print-search-dirs
  output of a MinGW compiler. This explains its format and also the trailing
  slash that I can't easily remove neither because the path is processed by
  libtool. And while in the future I might try switching to Cygwin MinGW
  cross-compiler, this can't be done right now so I'd really like to find
  some way of making Windows paths with ..// in them work with Cygwin.
 
 cygpath -pm `some-mingw-g++ -print-search-dirs`

 Sorry to sound like a broken record but, quoting my first message: I
can't even apply cygpath to convert it because this is all done by
libtool.. I.e. it's libtool that calls g++ -print-search-dirs and then
uses ls $dir/$libname for each directory in the returned path. And I
can't easily change this, even if I somehow could change libtool (but why
should it be changed when its code looks correct?), this is libtool of
another project (libxml2) and not of one of my own so really can't do much
here.

 Other than that, I fixed that in CVS.  It's a Win32 path coversion problem
 which only occurs if there are multiple backslashes trailing a .. path
 component.

 Thanks a lot for fixing this! Just out of idle curiosity, why did the
problem only manifest itself under Windows 7 and not XP? Looking at
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/path.cc.diff?r1=1.629r2=1.630cvsroot=srcf=h
and surrounding code I don't see anything obviously platform-specific.

 Anyhow, the important thing is that it's fixed, thanks again!
VZ





--
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



Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-18 Thread Charles Wilson
On 6/18/2011 7:33 AM, Corinna Vinschen wrote:
 cygpath -pm `some-mingw-g++ -print-search-dirs`

As the OP stated, this is happening deep inside libtool, so it's not
like he can easily insert a call to 'cygpath' in there.  Now, libtool
DOES have some limited support for environments where path formats
differ between the build system and the compiler -- specifically, for
using the native mingw gcc from cygwin -- but you have to take some
special steps to activate it. (By default, when libtool is configured,
it naturally assumes that --build=i686-pc-cygwin --host=i686-pc-mingw32
means 'use the cygwin-hosted mingw cross compiler' and does NOT activate
this path support for the tools, because it is assumed the toolchain
itself understands cygwin paths).

See
info libtool 'Cross compiling'
info libtool 'File name conversion'
info libtool 'Cygwin/Windows File Name Conversion'
and finally
info libtool 'Cygwin to MinGW Cross'
(you want the 'fake' scenario).

Basically, what you have to do is this:

export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32
export PATH=/c/MinGW/bin:${PATH}
configure --build=i686-pc-cygwin \
--host=mingw32 \
NM=/c/MinGW/bin/nm.exe

Which does a number of things: (1) it activates the filename conversion
logic but ONLY for the paths that libtool feeds to the compiler tools,
(2) it ensures that the mingw.org compiler is used by forcing the name
'mingw32-gcc.exe' etc, and (3) ensures that the other mingw utilities
are found first in the PATH.  (4) Finally, there's something special
about $NM, but I forget what.

 Other than that, I fixed that in CVS.  It's a Win32 path coversion problem
 which only occurs if there are multiple backslashes trailing a .. path
 component.

Yay!

--
Chuck


--
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



Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-18 Thread Vadim Zeitlin
Charles Wilson cygwin at cwilson.fastmail.fm writes:

 On 6/18/2011 7:33 AM, Corinna Vinschen wrote:
  cygpath -pm `some-mingw-g++ -print-search-dirs`
 
 As the OP stated, this is happening deep inside libtool, so it's not
 like he can easily insert a call to 'cygpath' in there.  Now, libtool
 DOES have some limited support for environments where path formats
 differ between the build system and the compiler -- specifically, for
 using the native mingw gcc from cygwin -- but you have to take some
 special steps to activate it.

 Thanks for the links, I didn't know about this but it looks like exactly
what I should be doing and I'll test it a.s.a.p.

 And in the longer term I'll try to switch to i686-w64-mingw32
cross-compiler (I can't use i686-pc-mingw32 one because it uses DW2
exceptions while I really need SJLJ ones for catching exceptions from GUI
message handlers).

 Thanks again for the libtool hint and to Corinna for fixing the bug!
VZ



--
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



Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-18 Thread Corinna Vinschen
On Jun 18 13:43, Vadim Zeitlin wrote:
 Corinna Vinschen corinna-cygwin at cygwin.com writes:
  Other than that, I fixed that in CVS.  It's a Win32 path coversion problem
  which only occurs if there are multiple backslashes trailing a .. path
  component.
 
  Thanks a lot for fixing this! Just out of idle curiosity, why did the
 problem only manifest itself under Windows 7 and not XP? Looking at
 http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/path.cc.diff?r1=1.629r2=1.630cvsroot=srcf=h
 and surrounding code I don't see anything obviously platform-specific.

Stracing shows that XP (probably all 5.x kernels) allow to specify paths
with multiple backslashes in calls to NtCreateFile, while the 6.x
kernels fail with STATUS_OBJECT_NAME_INVALID.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
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



Bug with paths containing double slashes after double dot after a mount point

2011-06-17 Thread Vadim Zeitlin
 Hello,

 I think I've discovered a bug with handling specific forms of mixed form
paths in Cygwin 1.7. Here is the briefest possible demonstration:

$ ls C:/cygwin/lib/X11/../libc.a
C:/cygwin/lib/X11/../libc.a
$ ls C:/cygwin/lib/X11/..//libc.a
ls: cannot access C:/cygwin/lib/X11/..//libc.a: No such file or 
directory

This is on a system with perfectly standard Cygwin installation and
standard /usr/lib mount:

$ mount|fgrep lib
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)

The bug is not specific to this machine (at least it also happens in a
freshly created VM with a very minimal Cygwin 1.7 installation too) nor to
this mount point (I originally noticed it with one of my own manually
created ones). Neither is it specific to the concrete file or directory
names.

 The problem does *not* arise with /cygdrive/c/cygwin/lib/X11/..//libc.a
Unix-style paths but unfortunately I can't easily get rid of the mixed
format paths in my situation: the original path comes from g++
-print-search-dirs output from MinGW g++ that I use from Cygwin
environment and I can't even apply cygpath to convert it because this is
all done by libtool. And because the directory containing the libraries has
a trailing slash in g++ output libtool fails to create any libraries in it
resulting in various interesting problems... So while the real solution
would probably be to switch to MinGW cross-compiler and avoid mixing of
MinGW and Cygwin paths in the first place, for now I'd gladly welcome any
ideas about how to work around this bug.

 Thanks in advance,
VZ

P.S. I don't include detailed cygcheck output as I don't think it's of any
 interest because the bug isn't system-dependent but please let me know
 if it would be useful to send it nevertheless, e.g. if you can't
 reproduce this behaviour.


pgp0kdokwnUE4.pgp
Description: PGP signature


Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-17 Thread Vadim Zeitlin
Illia Bobyr Illia.Bobyr at ronin-capital.com writes:

 
 On 6/17/2011 1:59 PM, Vadim Zeitlin wrote:
Hello,
 
I think I've discovered a bug with handling specific forms of mixed form
  paths in Cygwin 1.7. Here is the briefest possible demonstration:
 
  $ ls C:/cygwin/lib/X11/../libc.a
  C:/cygwin/lib/X11/../libc.a
  $ ls C:/cygwin/lib/X11/..//libc.a
  ls: cannot access C:/cygwin/lib/X11/..//libc.a: No such file or 
  directory
 
  [...]
 
  P.S. I don't include detailed cygcheck output as I don't think it's of any
interest because the bug isn't system-dependent but please let me know
if it would be useful to send it nevertheless, e.g. if you can't
reproduce this behaviour.
 
 Does not happen on my box:

 Thanks for testing!

 $ uname -a
 CYGWIN_NT-5.1 WITD-ORL-IBOBY1 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin

 I see the following differences:

- You have 1.7.9 while I have 1.7.8 and 1.7.7.
- You have XP while I have 64 bit Windows 7.

 As I don't see any mention of such bug being fixed in 1.7.9 change log I
suppose the really important difference is between the OS versions and/or
32 vs 64 bits. I'll try to install Cygwin into XP and 32 bit Windows 7 to
check this too if nobody else posts the test results for these platforms
until tomorrow.

 Thanks again,
VZ



--
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



Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-17 Thread Greg Chicares
On 2011-06-17 21:23Z, Vadim Zeitlin wrote:
 Illia Bobyr Illia.Bobyr at ronin-capital.com writes:
 
 
 On 6/17/2011 1:59 PM, Vadim Zeitlin wrote:
Hello,
 
I think I've discovered a bug with handling specific forms of mixed 
  form
  paths in Cygwin 1.7. Here is the briefest possible demonstration:
 
 $ ls C:/cygwin/lib/X11/../libc.a
 C:/cygwin/lib/X11/../libc.a
 $ ls C:/cygwin/lib/X11/..//libc.a
 ls: cannot access C:/cygwin/lib/X11/..//libc.a: No such file or 
  directory
 
  [...]
 
  P.S. I don't include detailed cygcheck output as I don't think it's of any
interest because the bug isn't system-dependent but please let me 
  know
if it would be useful to send it nevertheless, e.g. if you can't
reproduce this behaviour.
 
 Does not happen on my box:
 
  Thanks for testing!
 
 $ uname -a
 CYGWIN_NT-5.1 WITD-ORL-IBOBY1 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin
 
  I see the following differences:
 
 - You have 1.7.9 while I have 1.7.8 and 1.7.7.
 - You have XP while I have 64 bit Windows 7.
 
  As I don't see any mention of such bug being fixed in 1.7.9 change log I
 suppose the really important difference is between the OS versions and/or
 32 vs 64 bits. I'll try to install Cygwin into XP and 32 bit Windows 7 to
 check this too if nobody else posts the test results for these platforms
 until tomorrow.

Another data point--no such problem with XP-SP3 and Cygwin-1.7.7:

$ls C:/cygwin-1_7/lib/X11/../libc.a
C:/cygwin-1_7/lib/X11/../libc.a
$ls C:/cygwin-1_7/lib/X11/..//libc.a
C:/cygwin-1_7/lib/X11/..//libc.a
$uname -a
CYGWIN_NT-5.1 earl 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin

--
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



Re: Bug with paths containing double slashes after double dot after a mount point

2011-06-17 Thread Vadim Zeitlin
Greg Chicares gchicares at sbcglobal.net writes:

 On 2011-06-17 21:23Z, Vadim Zeitlin wrote:
  
   I see the following differences:
  
  - You have 1.7.9 while I have 1.7.8 and 1.7.7.
  - You have XP while I have 64 bit Windows 7.
...
 Another data point--no such problem with XP-SP3 and Cygwin-1.7.7:

 I've tested under 32 bit Windows 7 system and I see the problem there so
it looks like it's Windows 7-specific (it might also happen under Vista and
I could test it there too but, frankly, who cares about Vista...).

 Could someone else please test this under Windows 7 to confirm the bug?

 Thanks,
VZ




--
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



RE: Bug with paths containing double slashes after double dot after a mount point

2011-06-17 Thread Fahlgren, Eric
Vadim Zeitlin wrote:
  Could someone else please test this under Windows 7 to confirm the bug?

Windows 7 Pro 64-bit

$ ls C:/cygwin/lib/X11/../libc.a
C:/cygwin/lib/X11/../libc.a
$ ls C:/cygwin/lib/X11/..//libc.a
ls: cannot access C:/cygwin/lib/X11/..//libc.a: No such file or directory

$ uname -a
CYGWIN_NT-6.1-WOW64 LM-XERXES 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin


--
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