[R-SIG-Mac] cmake on build servers

Kevin Ushey kev|nu@hey @end|ng |rom gm@||@com
Mon Jul 27 07:54:53 CEST 2026


Hi Simon,

Thanks, that makes it clear. I'd argue that the world would be simpler
if this was pushed to users; that is, R required users to put cmake on
the PATH via some means before installing packages which use it. Users
who choose to install packages from sources on macOS are already
accepting a (potentially substantial) burden; asking these users to
have cmake on their PATH is simple compared to some other package's
requirements. But I can understand the motivation for the current
behavior.

The other pain point for package authors is that this error isn't
surfaced until after a package has been accepted on CRAN, when failing
checks are later discovered on macOS. Ideally, such an error could be
detected before submission via R CMD check. I've put up a proposal
here that would have R check for usages of plain 'cmake' here:

https://github.com/r-devel/r-svn/pull/277

I can also create a patch on Bugzilla if this is worth considering.

As an aside (also included in the changes above), I suspect this line in R-exts

if test -f "$CMAKE"; then echo "no 'cmake' command found"; exit 1; fi

should be e.g.

if ! test -f "$CMAKE"; then echo "no 'cmake' command found"; exit 1; fi

Best,
Kevin

On Sun, Jul 26, 2026 at 3:53 PM Simon Urbanek
<simon.urbanek using r-project.org> wrote:
>
> Kevin,
>
>
> > On 27 Jul 2026, at 10:13, Kevin Ushey <kevinushey using gmail.com> wrote:
> >
> > Hi Simon,
> >
> > Would you be willing to put cmake on the PATH by default on the macOS
> > CRAN build servers? Or, if you wanted to be judicious, do so only for
> > packages which declare SystemRequirements: CMake in their DESCRIPTION?
> >
>
>
> For the latter, the VM setup is not conditional, so we certainly don't want to mess with the setup as-hoc - it should stay reproducible.
>
> To the former, I'm a bit surprised this is even an issue, since this is the status quo for years and has been always documented, so it boils down to people not bothering to read the manuals. The main reason for cmake not being on the PATH is that CMake officially doesn't do that so we cannot expect users to mess with their PATH (it gets complicated since there is not a single place to change the PATH on macOS as R can be run from applications that don't use the profile), so the packages should be able to deal with that, otherwise they won't install for the users, either. I wouldn't want to make cmake part of recipes, because it is already maintained by Kitware, so we want to rely on official binaries where possible. This is not about CRAN machines, but the ability to install the package from sources at all.
>
> Cheers,
> Simon
>
>
> > On Sun, Jul 26, 2026 at 2:47 PM Simon Urbanek
> > <simon.urbanek using r-project.org> wrote:
> >>
> >> It is available on all machines, please read R-exts 1.2.6:
> >>
> >> [1] https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-cmake
> >>
> >> Cheers,
> >> Simon
> >>
> >>
> >>> On 26 Jul 2026, at 19:28, Jeroen Ooms <jeroenooms using gmail.com> wrote:
> >>>
> >>> Would it be possible to install cmake on the CRAN macos servers (or if
> >>> it is there, add it to the PATH)? Right now it only is available on
> >>> the "sonoma" target (arm64 release), see e.g.
> >>> https://cran.r-project.org/web/checks/check_results_RcppParallel.html
> >>>
> >>> We could add cmake to the 'recipes' but an easier route is just to
> >>> install it from https://cmake.org/download/ (as done for the sonoma
> >>> server).
> >>>
> >>> Thank you!
> >>>
> >>> Jeroen
> >>>
> >>> _______________________________________________
> >>> R-SIG-Mac mailing list
> >>> R-SIG-Mac using r-project.org
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >>>
> >>
> >> _______________________________________________
> >> R-SIG-Mac mailing list
> >> R-SIG-Mac using r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >
>



More information about the R-SIG-Mac mailing list