Gavin,

thanks, quick updates inline.


> On Apr 25, 2025, at 9:53 PM, Gavin Simpson <ucfa...@gmail.com> wrote:
> 
> Thanks Simon, that's really helpful - I find the R manuals confusing on this 
> issue in part because things MacOS X related are bound up in "Unix-alike" 
> sections and there are often clauses and / or footnotes relating to MacOS X 
> but it's unclear what relates to CRAN builds / configuration vs doing things 
> on one's own system. If I were more knowledgeable about this stuff I would 
> suggest some changes, but perhaps it's clear once one has gained sufficient 
> knowledge :-)
> 
> I've had another close read of data.table's configure script and I think I 
> understand what is needed so that I can try to help Simon (Wood) and Ben and 
> Mollie with getting this configured in mgcv and glmmTMB using the relevant 
> bits from data.table.
> 


Basically, the main part is to detect OpenMP even if R doesn't enable it 
(possibly as an option?) and on macOS also try -Xclang in front of the regular 
-fopemp to see if it works.


> And again, thank you for helping me through all this, and - because I'm sure 
> it doesn't get said enough - for everything you do to support R on Mac!
> 
> FYI: there does seem to be a real problem related to OpenMP with clang 1700 
> provided in Xcode 16.3 (which got installed when or alongside the system 
> updates for Sequoia 15.4.1) - I'm seeing the same issue reported here 
> https://github.com/Rdatatable/data.table/issues/6622 and down some deep 
> rabbit hole I went digging into the error message I saw during compilation of 
> mcgv I saw reports that this was a bug in llvm that was affecting this 
> version of clang, but I can't find the source for that now. I've downgraded 
> to 16.2 now so I just have one problem to solve (compile my own R or ditch 
> homebrew).
> 


Yes, I have confirmed in the meantime that Xcode 16.3 (using LLVM 19) is 
incompatible with earlier OpenMP run-times, and I have added the corresponding 
note on the OpenMP pages:

https://mac.r-project.org/openmp/

including a work-around if you want to use Xcode 16.3 and force the 
corresponding LLVM 19 run-time in the complied package instead of the shared 
one. Note that you still can't mix them in the same R session, so you have to 
to choose which run-time to use for *all* packages that require OpenMP (at 
least the ones you want to load together ;)).


> The other day I said I had R installed from Homebrew and that it was CRAN's 
> binary. This is true, but I neglected the difference between installing R as 
> a formula or as a cask. The latter installs CRAN's binary of R, while 
> installing as a formula would lead to a local compilation from sources using 
> Homebrew. Sorry about that confusion.
> 


No worries, it's all complicated :), but that makes sense.

Cheers,
Simon

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to