[R-pkg-devel] Compile issues on r-devel-linux-x86_64-debian-clang with OpenMP
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Fri May 24 15:22:04 CEST 2024
Kurt,
Could you do me a favour and run on that clang18-using machine in question
the following one-liner (provided your session has access to a .libPaths()
including Rcpp) and, in the case of success, the resulting function?
> Rcpp::cppFunction("int ompconfigtest() { return omp_get_num_threads(); }", includes="#include <omp.h>", plugin="openmp")
> ompconfigtest()
[1] 1
>
On a "normal" development machine such as mine here it works.
Presumably it will fail at your end because -fopenmp will not be / cannot be
substituted in from the openmp plugin defined by Rcpp:
## built-in OpenMP plugin
.plugins[["openmp"]] <- function() {
list(env = list(PKG_CXXFLAGS="-fopenmp",
PKG_LIBS="-fopenmp"))
}
but it would be nice to know if that does indeed fail.
Thanks, Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list