[R-SIG-Mac] configure tests for OpenMP fail when building CRAN binary packages
Jeroen Ooms
jeroenoom@ @end|ng |rom gm@||@com
Tue Dec 30 00:04:48 CET 2025
FWIW, the binaries on r-universe are built with the documented CRAN
instructions and all pick up on openmp as expected, both for R-release
and R-devel:
https://rdatatable.r-universe.dev/data.table/buildlog
https://rcppcore.r-universe.dev/RcppArmadillo/buildlog
The libomp.dylib file is included with base R, so my guess would be
that the openmp include dir somehow got removed from the CRAN machine?
On Mon, Dec 29, 2025 at 11:09 PM Ivan Krylov via R-SIG-Mac
<r-sig-mac using r-project.org> wrote:
>
> Hello,
>
> Some packages that use a configure test for OpenMP support now don't
> detect it when being compiled for macOS:
>
> https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/RcppArmadillo-00install.html
> https://www.r-project.org/nosvn/R.check/r-release-macos-x86_64/data.table-00install.html
>
> The test for working OpenMP support used by these two packages is
>
> PKG_CFLAGS='-Xclang -fopenmp' PKG_LIBS=-lomp R CMD SHLIB test.c
>
> ...completing with an exit status of 0. (Where test.c contains some
> valid OpenMP directives.) It's not ideal, but it's prone to false
> positives, not false negatives.
>
> The problem does not happen on the macOS builder.
>
> Could the CRAN builder be possibly missing some configuration
> pertaining to libomp.dylib? Is there anything I could do to help
> diagnose the problem?
>
> --
> Best regards,
> Ivan
>
> _______________________________________________
> 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