Re: [Rd] How to change name of .so/.dll

From: Matthew Dowle <mdowle_at_mdowle.plus.com>
Date: Tue, 12 Jun 2012 23:39:38 +0100

Matthew Dowle wrote :
> Hi,
>
> I've added R_init_data_table to the "data.table" package (which has a dot
> in its name). This works well in R 2.15.0, because of this from the
> Writing R Extensions manual :
>
> " Note that there are some implicit restrictions on this mechanism as the
> basename of the DLL needs to be both a valid file name and valid as part
> of a C entry point (e.g. it cannot contain ‘.’): for portable code it is
> best to confine DLL names to be ASCII alphanumeric plus underscore. As
> from R 2.15.0, if entry point R_init_lib is not found it is also looked
> for with ‘.’ replaced by ‘_’. "
>
> But how do I confine the DLL name, is it an option in Makevars?
>
> The name of the shared object is currently "data.table.so" (data.table.dll
> on Windows). Is it possible to change the file name to "datatable.so"
> (and datatable.dll) in a portable way so that R_init_datatable works
> (without a dot), and, without Depend-ing on R>=2.15.0 and without changing
> the name of the package?

Just to clarify, I'm aware R CMD SHLIB has the -o argument which can be used create datatable.so instead of data.table.so. It's R CMD INSTALL that's the problem as that seems to pass -o <pkg_name> to R CMD SHLIB. I found install.libs.R (added to R in 2.13.1), could that be used to create datatable.so instead of data.table.so? Or a line I could add to pkg/src/Makevars?

Thanks!
Matthew



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 12 Jun 2012 - 23:41:48 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Jun 2012 - 07:50:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive