delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/10/12/18:56:34

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_05,KHOP_THREADED,RP_MATCHES_RCVD,TW_YG
X-Spam-Check-By: sourceware.org
Message-ID: <5078A002.8070407@etr-usa.com>
Date: Fri, 12 Oct 2012 16:56:02 -0600
From: Warren Young <warren AT etr-usa DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1
MIME-Version: 1.0
To: Cygwin-L <cygwin AT cygwin DOT com>
Subject: Re: R 2.15.1-1 sub() function produces unexpected output
References: <E22AEA3456883C41AD71DA029D05F48819AC35BD AT 019-AM1MPN1-011 DOT 019D DOT MGD DOT MSFT DOT NET>
In-Reply-To: <E22AEA3456883C41AD71DA029D05F48819AC35BD@019-AM1MPN1-011.019D.MGD.MSFT.NET>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 10/12/2012 9:18 AM, Toby Johnson wrote:
>
> The sub() function in R 2.15.1-1 produces unexpected output.  Here is
> a minimal piece of R code:

I see the same result here, except that I tested with R 2.15.1 in both 
Windows native and Cygwin versions, as opposed to your test which used a 
different version on Linux.  That means we can rule out a 2.14 -> 2.15 
difference and the OS difference.

I believe sub() is using PCRE for this, per http://goo.gl/XxDyB

I ldd'd the Cygwin R binary[*] and it's linking to cygpcre-1.dll, which 
is PCRE 8.31 if your Cygwin is up to date.  Since the PCRE packaged with 
the R sources is 8.30 (per http://goo.gl/O2UMk) you would think this is 
fine.  If anything, this setup should result in *fewer* bugs, not more.

That said, I don't see any better idea than trying to rebuild Cygwin R 
with different regex libraries.  If I were to go about it, I'd first try 
building R with the packaged PCRE instead of the platform PCRE, then if 
that gave the same result, build without PCRE entirely.




[*] You'd guess "ldd `which R`" but you'd be wrong.  The binary is 
hidden behind two layers of indirection:

     ldd /usr/lib/R/bin/exec/R.exe

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019