From nilsson.henric at gmail.com  Wed Feb 22 12:44:41 2017
From: nilsson.henric at gmail.com (Henric Winell)
Date: Wed, 22 Feb 2017 12:44:41 +0100
Subject: [Rd] Registration of native routines
In-Reply-To: <9dc2a8bb-b324-f865-be05-499860562741@stats.ox.ac.uk>
References: <1514271c-2d83-b373-fdb7-7052c3170112@stats.ox.ac.uk>
	<9dc2a8bb-b324-f865-be05-499860562741@stats.ox.ac.uk>
Message-ID: <96a6cb1f-1efa-28a1-db1e-81b1b76c0daf@gmail.com>

On 2017-02-19 09:19, Prof Brian Ripley wrote:

> On 14/02/2017 16:25, Prof Brian Ripley wrote:
>> Registration of 'native routines' (entry points in compiled code loaded
>> into R) has been available for over 14 years,
> 
> ...
> 
>> (There are reports that the check in 'R CMD check' on Windows sometimes
>> fails to detect use of registration.  This is being looked into:
>> meanwhile say so in a CRAN submission if it happens to you.)
> 
> One instance has been resolved: for at least 5 years R CMD check for a 
> package with compiled code has assumed commands 'nm' and (on Windows) 
> 'objdump' were on the PATH: these are also needed to detect use of 
> registration.  There is now a warning if they are not found.

Many thanks for this!  However, I think that there's a subtlety here:

On a newly installed Windows 10 64-bit system, with the latest R-devel 
and Rtools, 'R CMD check' failed to detect use of registration despite 
the fact that both 'nm' and 'objdump' were on the path.  It turned out 
that I had the 32-bit versions on the path, i.e., 
'\\...\Rtools\mingw_32\bin', which, I believe, is the default setting in 
the Rtools installer.

After switching to the 64-bit versions, the use of registration now 
seems to be reliably detected.


Henric Winell



[Rd] Registration of native routines
Henric Winell