#1142 "cat" deletes files when appending content

closed-invalid
nobody
MSYS (75)
2009-07-21
2008-04-03
Rolandas R.
No

---------------------------------------
OS = Windows XP
gcc version = 3.4.5
ld version = 2.18.50.20080109
mingw version = MinGW-5.1.3.exe
build environment = MSYS
MSYS version = 1.0.11(0.46/3/2)
mingw-runtime version = 3.14
w32api version = 3.11
cat version = 5.97
---------------------------------------

cat functions fine when executing it from the MSYS command prompt. Works fine from .sh scripts. However... compiling perl 5.8.8 source just fails, because no Makefile is generated. I did some investigation and it appeared that the Makefile simply disappeared after appending content to it. From Makefile.SH:

$spitshell >Makefile <<!GROK!THIS!
...
!GROK!THIS!
<-- if I exit here, the file is created.

$spitshell >>Makefile <<!GROK!THIS!
...
!GROK!THIS!

<-- if I exit here, the file is deleted.

It's quite a weird bug, because it happens only when compiling perl by using ./configure in the root directory, but compiles fine from Windows command prompt from win32 directory of the source.

Discussion

  • Rolandas R.
    Rolandas R.
    2008-04-04

    Logged In: YES
    user_id=1089494
    Originator: YES

    Well, forget this bug report. Looks like it deletes the file automagically.

    Anyway, playing around with strawberry perl showed that it was promissing.
    Added SET PERL5LIB=C:/strawberry/perl/lib;C:/strawberry/perl/site/lib
    to the .bat file. @INC paths are reported correctly, but...

    Modules can not be found. I suppose, there is a bug in perl or somewhere else, since Process Explorer showed incorrect paths.

    perl.exe CreateFile C:\strawberry\perl\lib\HTML\Tagset.pmc PATH NOT FOUND
    perl.exe CreateFile C:\strawberry\perl\lib\HTML NAME NOT FOUND
    perl.exe QueryOpen C:\strawberry\perl\lib\HTML\Tagset.pmc PATH NOT FOUND
    perl.exe CreateFile C:\strawberry\perl\lib\HTML\Tagset.pm PATH NOT FOUND
    perl.exe CreateFile C:\strawberry\perl\lib\HTML NAME NOT FOUND
    perl.exe QueryOpen C:\strawberry\perl\lib\HTML\Tagset.pm PATH NOT FOUND
    perl.exe CreateFile C:\strawberry\perl\site\lib \HTML\Tagset.pmc PATH NOT FOUND
    perl.exe CreateFile C:\strawberry\perl\site\lib \HTML\ PATH NOT FOUND

    Notice a space after the "lib".

     
  • Cesar Strauss
    Cesar Strauss
    2009-07-21

    > Well, forget this bug report. Looks like it deletes the file
    > automagically.

    Closing as invalid.

    Regards,
    Cesar

     
  • Cesar Strauss
    Cesar Strauss
    2009-07-21

    • status: open --> closed-invalid