From murdoch.duncan at gmail.com  Sat Nov 23 14:02:43 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Sat, 23 Nov 2013 08:02:43 -0500
Subject: [Rd] tar binary in RTools 3.1.0.1939 has problems with tar.bz2
 files
In-Reply-To: <1361285312.2432052.1385154630999.JavaMail.root@fhcrc.org>
References: <1361285312.2432052.1385154630999.JavaMail.root@fhcrc.org>
Message-ID: <5290A773.7040808@gmail.com>

On 13-11-22 4:10 PM, Dan Tenenbaum wrote:
>
>
> ----- Original Message -----
>> From: "Duncan Murdoch" <murdoch.duncan at gmail.com>
>> To: "Dan Tenenbaum" <dtenenba at fhcrc.org>, "R-devel" <r-devel at r-project.org>
>> Sent: Friday, November 22, 2013 1:00:04 PM
>> Subject: Re: [Rd] tar binary in RTools 3.1.0.1939 has problems with tar.bz2 files
>>
>> On 22/11/2013 2:51 PM, Dan Tenenbaum wrote:
>>> Hi,
>>>
>>> With Rtools 3.1.0.1936 I can create and extract from .tar.bz2
>>> files:
>>>
>>> (first directory in %PATH% is c:\rtools31.1936\bin)
>>>
>>> E:\>tar jcvf tmp.tar.bz2 tmp
>>> tmp/
>>> tmp/foo.txt
>>>
>>> E:\>tar jtvf tmp.tar.bz2
>>> drwxr-xr-x 4294967295/4294967295 0 2013-11-22 11:35 tmp/
>>> -rw-r--r-- 4294967295/4294967295 3 2013-11-22 11:35 tmp/foo.txt
>>>
>>> E:\>mkdir ex
>>>
>>> E:\>cd ex
>>>
>>> E:\ex>tar jxvf ..\tmp.tar.bz2
>>> tmp/
>>> tmp/foo.txt
>>>
>>> E:\ex>cd ..
>>>
>>> E:\>rm -rf ex
>>>
>>> ...but this fails when using the tar binary in Rtools 3.1.0.1939.
>>> The following lines are run with c:\rtools31.1939 as the first
>>> directory in %PATH% (and there is only one Rtools installation
>>> referenced in %PATH% in both these examples):
>>>
>>> E:\>tar jcvf tmp.tar.bz2 tmp
>>> tmp/
>>> tmp/foo.txt
>>>
>>> E:\>tar jtvf tmp.tar.bz2
>>>
>>> E:\>mkdir ex
>>>
>>> E:\>cd ex
>>>
>>> E:\ex>tar jxvf ..\tmp.tar.bz2
>>>
>>> E:\ex>ls
>>>
>>> E:\ex>
>>>
>>> Can this be fixed?
>>
>> The tar.exe is identical in those two versions of Rtools, just the
>> Cygwin DLLs (and a few other utilities) changed.  So I suspect this
>> is
>> something else, or perhaps a bug in the new Cygwin DLLs -- but the
>> old
>> Cygwin DLLs don't work on Win 8.1.
>
> Do you know which version of the cygwin dll's was used to produce this tar.exe? I can try and report this to the cygwin people if I have the appropriate information.

No.

>
>>
>> Some things you could try:
>>
>> Just use the old Rtools.
>>
>
> I'll probably do this for now, but I will want to be able to keep moving forward as necessary.
>
>> Use the Cygwin tar.exe (available from Cygwin) instead of ours.  At
>> the
>> time we made our custom tar.exe, the Cygwin one would not support
>> Windows drive specs, but perhaps the current one does.
>>
>
> So if I understand correctly, the way to do this would be to simply remove or rename the tar.exe in rtools so that the cygwin one shows up first in the PATH, right? I do not want to move cygwin's tar.exe into the rtools\bin directory because it was probably built against a different DLL.

If you have Cygwin installed and the Rtools versions of the Cygwin DLLs 
are on your path, that could cause this.  You should not mix versions of 
Cygwin DLLs on the same system.  Use the Rtools ones, or the ones in the 
Cygwin installation, but not both.  I suspect that the utilities in 
Rtools won't work with older Cygwin DLLs, but I've never tried that, and 
it could be your problem if you haven't updated Cygwin as recently as 
you updated Rtools.

Cygwin claims that newer versions of their DLLs will always work against 
older exes compiled against them, and in my experience that is usually 
(but not always) true.  They don't claim new exes will work with old DLLs.

Duncan Murdoch


>> Use something else, e.g. bzip to decompress, then tar to get from the
>> tar.
>>
>
> Sure, but this problem arose in the context of a bioconductor package that was expecting (reasonably) that system("tar jxf ...") would work, and as a result the package would not build. This could conceivably happen again in other contexts so I'd rather not work around it each time.
>
> Thanks!
> Dan
>
>
>> Duncan Murdoch
>>



[Rd] tar binary in RTools 3.1.0.1939 has problems with tar.bz2 files
Duncan Murdoch