[R-pkg-devel] cmake, Windows

Matthias Gondan m@tth|@@-gond@n @end|ng |rom gmx@de
Sun Mar 6 18:57:00 CET 2022


Dear Dirk, dear others,

thank you for the helpful hints. I have looked into each package in turn,

1. nanonext: under Windows, invokes a script named winlibs.R in the folder tools that downloads a preconfigured (precompiled?) zip file. At the end of winlibs.R, a comment # cmake -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -fPIC" -G "MSYS Makefiles" .. indicates that this is probably meant to mimic cmake’s behavior.

2. neuronorm: Does not seem to use cmake at all.

3. nloptr: Under Rtools4, downloads nlopt binaries using again a winlibs.R workaround. Under Rtools42 (Makevars.ucrt), links to nlopt which is provided by the build system. Again, cmake is not involved.

4. rkeops: Windows Version is not available on CRAN

5. ROpenCVLite: pure source package, and Windows users are told to install Rtools and cmake

6. symengine: winlibs.R again.

What I am wondering, sorry for this beginner’s question: what do I need to do to mimic R’s winbuilder behavior on my computer? So far, I 

• downloaded rtools40 and rtools42, 
• did a pacman -Syu 
• and then installed, also using pacman -S, the libraries and tools (including cmake) that I needed to build the package

It seems as if I broke compatibility with the winbuilder in the last step? So, where can I find information which RTools packages are compatible with CRAN’s winbuilder?

Thank you all in advance for your support.

Best regards,

Matthias





Von: Dirk Eddelbuettel
Gesendet: Samstag, 5. März 2022 21:36
An: matthias-gondan
Cc: r-package-devel using r-project.org
Betreff: Re: [R-pkg-devel] cmake, Windows


On 5 March 2022 at 18:17, matthias-gondan wrote:
| Dear package developers, I have submitted a source package to CRAN, and it is rejected because installation fails on Windows.https://github.com/mgondan/rologThe compilation needs cmake, which is available on RTools4+.Is there any chance that cmake is included on the build system? If not, does anyone know a good solution for this problem?Best regards,Matthias 

You can treat the corpus of CRAN packages as a reference, and search it
either directly (GitHub search works as https://github.com/cran is an
informal mirror of CRAN), or in the aggregate via base R tools"

> db <- tools::CRAN_package_db()
> db[ grepl("cmake", db[,"SystemRequirements"]), "Package" ]
[1] "nanonext"    "neuronorm"   "nloptr"      "rkeops"      "ROpenCVLite" "symengine"   "tiledb"     
> 

These seven packages may provide an example. (I am behind 'tiledb' and we
only use cmake iff compilation of the underlying TileDB Embedded library is
selected, and which is not the default on Windows so that one is of no use to
you. Package 'nloptr' uses 'cmake' to build libnlopt.a (unless nlopt is
already installed).

Hth, Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list