[R-pkg-devel] [EXTERNAL] Re: CMake on CRAN Systems

Sameh Abdulah @@meh@@bdu|@h @end|ng |rom k@u@t@edu@@@
Thu Jan 18 05:52:27 CET 2024


Thank you, Ivan and everyone else, for your help. We are working on modifying the package in line with your suggestions.

Regarding the Rcpp template we previously advertised, we are updating it to align better with the rules and constraints of R-exts. If you believe the template is still a potential example, we seek the community’s contribution to making it more tailored for the CRAN and R-exts rules, if not just ignore it.

Again, thanks for helping.


Best,
--Sameh

From: R-package-devel <r-package-devel-bounces using r-project.org> on behalf of Reed A. Cartwright <racartwright using gmail.com>
Date: Thursday, January 18, 2024 at 1:59 AM
To: R Package Development <r-package-devel using r-project.org>
Subject: [EXTERNAL] Re: [R-pkg-devel] CMake on CRAN Systems
I think this is the same group that advertised an R package template a
while back that also clearly didn't follow R-exts rules or use any of
the best practices mentioned on this mailing list.

https://urldefense.com/v3/__https://github.com/stsds/Template-Rcpp__;!!Nmw4Hv0!2sMfEIGCOkf4K4xnMD01roSPe6BozSTq0MZKf1vY_MT-f6l4c-jX2I6SVogak9830IrKvZrbNEQkBIjkZfFeLm3SrrUW$<https://urldefense.com/v3/__https:/github.com/stsds/Template-Rcpp__;!!Nmw4Hv0!2sMfEIGCOkf4K4xnMD01roSPe6BozSTq0MZKf1vY_MT-f6l4c-jX2I6SVogak9830IrKvZrbNEQkBIjkZfFeLm3SrrUW$>


On Wed, Jan 17, 2024 at 3:24 PM Simon Urbanek
<simon.urbanek using r-project.org> wrote:
>
> I had a quick look and that package (assuming it's https://urldefense.com/v3/__https://github.com/stsds/MPCR__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nsZNGlfE$<https://urldefense.com/v3/__https:/github.com/stsds/MPCR__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nsZNGlfE$> ) does not adhere to any rules from R-exts (hence the removal from CRAN I presume) so the failure to detect cmake is the least problem. I would strongly recommend reading the  R documentation as cmake is just the wrong tool for the job in this case. R already has a fully working build system which will compile the package using the correct flags and tools - you only need to provide the C++ sources. You cannot generate the package shared object with cmake by definition - you must let R build it. [In rare case dependent static libraries are sometimes built with cmake inside the package if there is no other option and cmake is used upstream, but those are rare and you still have to use R to build the final shared object].
>
> Cheers,
> Simon
>
>
> > On Jan 17, 2024, at 8:54 PM, Ivan Krylov via R-package-devel <r-package-devel using r-project.org> wrote:
> >
> > Dear Sameh,
> >
> > Regarding your question about the MPCR package and the use of CMake
> > <https://urldefense.com/v3/__https://cran-archive.r-project.org/web/checks/2024/2024-01-12_check_results_MPCR.html__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6ntE5gM59$ >:
> > on a Mac, you have to look for the cmake executable in more than one
> > place because it is not guaranteed to be on the $PATH. As described in
> > Writing R Extensions
> > <https://urldefense.com/v3/__https://cran.r-project.org/doc/manuals/R-exts.html*Using-cmake__;Iw!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nhk6H1bw$ >, the
> > following is one way to work around the problem:
> >
> > if test -z "$CMAKE"; then CMAKE="`which cmake`"; fi
> > if test -z "$CMAKE"; then
> > CMAKE=/Applications/CMake.app/Contents/bin/cmake;
> > fi
> > if test -f "$CMAKE"; then echo "no ‘cmake’ command found"; exit 1; fi
> >
> > Please don't reply to existing threads when starting a new topic on
> > mailing lists. Your message had a mangled link that went to
> > urldefense.com instead of cran-archive.r-project.org, letting Amazon
> > (who host the website) know about every visit to the link:
> > https://urldefense.com/v3/__https://stat.ethz.ch/pipermail/r-package-devel/2024q1/010328.html__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nnj6jJF1$<https://urldefense.com/v3/__https:/stat.ethz.ch/pipermail/r-package-devel/2024q1/010328.html__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nnj6jJF1$>
> >
> > --
> > Best regards,
> > Ivan
> >
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nsmyJVkA$<https://urldefense.com/v3/__https:/stat.ethz.ch/mailman/listinfo/r-package-devel__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nsmyJVkA$>
> >
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nsmyJVkA$<https://urldefense.com/v3/__https:/stat.ethz.ch/mailman/listinfo/r-package-devel__;!!IKRxdwAv5BmarQ!Yc-rZLeUomy6UfK2hWnlm7jSdZkb90h9QCvh1B8HkY97GxPB-zes4t2gnSD2fTupOOXR-HtLQODuWJl_l5l6nsmyJVkA$>

______________________________________________
R-package-devel using r-project.org mailing list
https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!Nmw4Hv0!2sMfEIGCOkf4K4xnMD01roSPe6BozSTq0MZKf1vY_MT-f6l4c-jX2I6SVogak9830IrKvZrbNEQkBIjkZfFeLuuaByd8$<https://urldefense.com/v3/__https:/stat.ethz.ch/mailman/listinfo/r-package-devel__;!!Nmw4Hv0!2sMfEIGCOkf4K4xnMD01roSPe6BozSTq0MZKf1vY_MT-f6l4c-jX2I6SVogak9830IrKvZrbNEQkBIjkZfFeLuuaByd8$>

-- 

This message and its contents, including attachments are intended solely 
for the original recipient. If you are not the intended recipient or have 
received this message in error, please notify me immediately and delete 
this message from your computer system. Any unauthorized use or 
distribution is prohibited. Please consider the environment before printing
this email.

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list