Skip to content
Prev 14895 / 15075 Next

Clarifying the status of OMP in CRAN binaries on Mac

Thanks Philippe,

I have been able to compile mgcv this way (although with the 4.5.0
update I hit a snag regarding libintl.h not being found, and even
then, there is a problem with XCode CLI tools 16.3 which bumps clang
to 1700 and that is not liking any of the libomp versions on Simon's
https://mac.r-project.org/openmp/ page although it's unclear whether
this is openmp-related for something that is in this version of clang
- I saw a number of references to a bug in this version that was
leading to the |symbol not found in flat namespace
'___kmpc_dispatch_deinit' | errors that have been reported
here today)

But the CRAN binary of R does now ship with libomp.dynlib even on
MacOS X and mgcv (and glmmTMB) has the relevant macros in its
./src/Makevars:

PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CFLAGS)
PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS)

Hence my thinking perhaps now with 4.5.0 this might work out of the
box. Which would be good. But that's what I'm trying to ascertain with
this thread.

All the best

Gavin
On Thu, 24 Apr 2025 at 17:04, webmail.gandi.net <phgrosjean at sciviews.org> wrote:
--
Gavin Simpson, PhD [he/him/his]
[tw] @ucfagls [OrciD] 0000-0002-9084-8413
[web] fromthebottomoftheheap.net
? Assistant Professor
? Department of Animal & Veterinary Sciences, Aarhus University
? Adjunct Professor, Department of Biology, University of Regina.