|
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? Thanks, Matthew ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
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 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
In reply to this post by Matthew Dowle
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 ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
In reply to this post by Matthew Dowle
On Jun 12, 2012, at 6:39 PM, Matthew Dowle wrote: > 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? > Something like all: $(SHLIB) mv $(SHLIB) datatable$(SHLIB_EXT) should do the trick (resist the temptation to create a datatable$(SHLIB_EXT) target - it doesn't work due to the makefile loading sequence, unfortunately). AFAIR you don't need to mess with install.libs because the default is to install all shlibs in the directory. Cheers, Simon > Thanks! > Matthew > > ______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
On Tue, 2012-06-12 at 20:38 -0400, Simon Urbanek wrote:
> Something like > > all: $(SHLIB) > mv $(SHLIB) datatable$(SHLIB_EXT) > > should do the trick (resist the temptation to create a datatable$(SHLIB_EXT) target - it doesn't work due to the makefile loading sequence, unfortunately). AFAIR you don't need to mess with install.libs because the default is to install all shlibs in the directory. > > Cheers, > Simon Huge thank you, Simon. Works perfectly. +100! Matthew ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
Matthew Dowle <mdowle <at> mdowle.plus.com> writes:
> > On Tue, 2012-06-12 at 20:38 -0400, Simon Urbanek wrote: > > Something like > > > > all: $(SHLIB) > > mv $(SHLIB) datatable$(SHLIB_EXT) > > > > should do the trick (resist the temptation to create a datatable$(SHLIB_EXT) target - it doesn't work due > to the makefile loading sequence, unfortunately). AFAIR you don't need to mess with install.libs > because the default is to install all shlibs in the directory. > > > > Cheers, > > Simon > > Huge thank you, Simon. Works perfectly. +100! > > Matthew I guess the 'mv' command works on Mac, too. For Windows I think I need to create pkg/src/Makevars.win with 'mv' replaced by 'rename'. Is that right? all: $(SHLIB) rename $(SHLIB) datatable$(SHLIB_EXT) I could try that and submit to winbuilder and see, but asking here as well in case theres anything else to consider for Windows. Thanks again, Matthew ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
On 12-06-13 4:45 AM, Matthew Dowle wrote:
> Matthew Dowle<mdowle<at> mdowle.plus.com> writes: > >> >> On Tue, 2012-06-12 at 20:38 -0400, Simon Urbanek wrote: >>> Something like >>> >>> all: $(SHLIB) >>> mv $(SHLIB) datatable$(SHLIB_EXT) >>> >>> should do the trick (resist the temptation to create a > datatable$(SHLIB_EXT) target - it doesn't work due >> to the makefile loading sequence, unfortunately). AFAIR you don't need to > mess with install.libs >> because the default is to install all shlibs in the directory. >>> >>> Cheers, >>> Simon >> >> Huge thank you, Simon. Works perfectly. +100! >> >> Matthew > > I guess the 'mv' command works on Mac, too. For Windows I think I need to > create pkg/src/Makevars.win with 'mv' replaced by 'rename'. Is that right? > > all: $(SHLIB) > rename $(SHLIB) datatable$(SHLIB_EXT) > > I could try that and submit to winbuilder and see, but asking here as well in > case theres anything else to consider for Windows. > mv should be fine on Windows. If you have a makefile, you have Rtools installed, and mv is in Rtools. Duncan Murdoch ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
> On 12-06-13 4:45 AM, Matthew Dowle wrote:
>> Matthew Dowle<mdowle<at> mdowle.plus.com> writes: >> >>> >>> On Tue, 2012-06-12 at 20:38 -0400, Simon Urbanek wrote: >>>> Something like >>>> >>>> all: $(SHLIB) >>>> mv $(SHLIB) datatable$(SHLIB_EXT) >>>> >>>> should do the trick (resist the temptation to create a >> datatable$(SHLIB_EXT) target - it doesn't work due >>> to the makefile loading sequence, unfortunately). AFAIR you don't need >>> to >> mess with install.libs >>> because the default is to install all shlibs in the directory. >>>> >>>> Cheers, >>>> Simon >>> >>> Huge thank you, Simon. Works perfectly. +100! >>> >>> Matthew >> >> I guess the 'mv' command works on Mac, too. For Windows I think I need >> to >> create pkg/src/Makevars.win with 'mv' replaced by 'rename'. Is that >> right? >> >> all: $(SHLIB) >> rename $(SHLIB) datatable$(SHLIB_EXT) >> >> I could try that and submit to winbuilder and see, but asking here as >> well in >> case theres anything else to consider for Windows. >> > > mv should be fine on Windows. If you have a makefile, you have Rtools > installed, and mv is in Rtools. > > Duncan Murdoch Neat. Glad I asked, thanks. Matthew ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
| Powered by Nabble | Edit this page |
