Menu

#2148 cannot write to aux.*

OTHER
closed
nobody
None
Feature
invalid
Behaves_as_Documented
False
2014-01-28
2013-12-14
ting lyx
No

msys from mingw.org (as of Dec 2013) always report that a file named aux.* exists:

mkdir test && cd test
touch a.txt
mv a.txt aux.h
touch a.txt
mv a.txt aux.c

mv: cannot move a.txt' toaux.c': File exists

The same commands work fine on Ubuntu 12.04

Discussion

  • Keith Marshall

    Keith Marshall - 2013-12-15
    • status: unread --> closed
    • Group: MSYS --> OTHER
    • Type: Bug --> Feature
    • Resolution: none --> invalid
    • Category: Unknown --> Behaves_as_Documented
     
  • Keith Marshall

    Keith Marshall - 2013-12-15

    This is not a bug. 'aux' is a reserved device name in Windows; you cannot use it as the stem of a regular file name. You will need to chose something else.

     
    • zyx

      zyx - 2014-01-27

      Well, it's not true. I can create files/directories out of msys environment, thus it's a bug in msys, interpreting 'aux' file name as a device, which is wrong here. Simple:
      mkdir aux
      fails in msys, but works flawlessly under cmd.exe. (There is a big difference between echo aux and echo >aux, even echo example is not that good as the mkdir/cp/mv).

      Note that I cannot choose a different name, if the project I want to compile has a tar.gz file which contains such 'aux' folder. I cannot untar it under msys console, which is a pain.

       
      • Keith Marshall

        Keith Marshall - 2014-01-27

        Well, it's not true.

        It is 100% true.

        I can create files/directories out of msys environment,

        You cannot do so, when you insist on using a forbidden file name, such as 'aux'.

        thus it's a bug in msys,

        No it is not; it is a limitation imposed by Windows itself, which MSYS must honour, since it runs on the Windows platform.

        interpreting 'aux' file name as a device, which is wrong here.

        The only thing which is wrong here is your arrogant refusal to comply with the rules specified for the filesystem. It was not MSYS which set this limiting rule; it was Microsoft.

        Simple:

        mkdir aux
        

        fails in msys, but works flawlessly under cmd.exe.

        Rubbish!!! What it actually does, under cmd.exe, is:

        Microsoft Windows [Version 6.1.7601]
        Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
        
        C:\Users\keith>mkdir aux
        The directory name is invalid.
        
        C:\Users\keith>
        

        (There is a big difference between echo aux and echo >aux,

        Sure, but that's not the issue: 'echo aux' does not attempt to create any filesystem entity called 'aux'; doing so is forbidden.

        even echo example is not that good...

        In fact, it's completely irrelevant.

        as the mkdir/cp/mv).

        Even these three aren't entirely consistent. You can 'cp' to or from the aux device, (i.e. write or read the device stream), but you cannot create either a directory or file with 'aux' as the stem of its name.

        Note that I cannot choose a different name, if the project I want to compile has a tar.gz file which contains such 'aux' folder. I cannot untar it under msys console, which is a pain.

        It's a bug in the providing project, if it is their intent to support Windows; (this is precisely why sane projects, with intent to support Windows, use 'build-aux' as the preferred name; 'aux' is forbidden). If you wish to pursue this, you must do so with the providing project; it is their bug, and we cannot help you.

         

        Last edit: Keith Marshall 2014-01-27
  • zyx

    zyx - 2014-01-28

    You are right, I didn't choose the best wording, and I really sound arrogant. I apologize for that, it wasn't intentional. I also did not test properly what I wrote above, I only assumed that if I can create an 'aux' folder in a Far Manager, then it'll be doable in cmd.exe too, but it's not, neither in explorer, nor winrar. Interesting is that the Far can create it and work with the folder, which was my precedence about functionality, and it was wrong.

    If you are wondering, then the project I try to compile is p11-kit, from http://p11-glue.freedesktop.org/releases/p11-kit-0.20.2.tar.gz and I'll open a request on their side.