As discussed here before packages should *never* set -mmacosx-version-min or similar flags by hand. As documented in R-exts 1.2 packages should retrieve compiler flags from R (this includes compiling 3rd party dependencies). Incidentally, older versions of R have included -mmacosx-version-min in the CC setting (high-sierra builds) which current ones don't, but complying packages will automatically use the correct compilers and flags regardless of the R version and build. Note that this is important as R can be built for different systems and targets so the package should not assume anything - just ask R.
The implied question was about the target macOS version for CRAN binaries: it is always included in the build name, so high-sierra build was targeting macOS 10.13 (High Sierra) and big-sur build is targeting macOS 11 (Big Sur). It is clearly stated next to the download for each macOS R binary on CRAN: https://cran.r-project.org/bin/macosx/ where the current releases target macOS 11. Anyone distributing macOS binaries should subscribe to R-SIG-Mac where we discuss details such as repository locations etc. Developers writing packages just need to pay attention to R-exts and CRAN policies (the latter if they want to publish on CRAN). I hope this is now clear enough explanation. Cheers, Simon > On Dec 10, 2023, at 10:07 AM, Dirk Eddelbuettel <e...@debian.org> wrote: > > > Last month, I had asked about the setting '-mmacosx-version-min' here. The > setting can be used to specify what macOS version one builds for. It is, > oddly enough, not mentioned in Writing R Extension but for both r-release and > r-devel the R Administration manual states > > • Current CRAN macOS distributions are targeted at Big Sur so it is > wise to ensure that the compilers generate code that will run on > Big Sur or later. With the recommended compilers we can use > CC="clang -mmacosx-version-min=11.0" > CXX="clang++ -mmacosx-version-min=11.0" > FC="/opt//gfortran/bin/gfortran -mmacosx-version-min=11.0" > or set the environment variable > export MACOSX_DEPLOYMENT_TARGET=11.0 > > which is clear enough. (There is also an example in the R Internals manual > still showing the old (and deprecated ?) value of 10.13.) It is also stated > at the top of mac.r-project.org. But it is still in a somewhat confusing > contradiction to the matrix of tests machines, described e.g. at > > https://cran.r-project.org/web/checks/check_flavors.html > > which still has r-oldrel-macos-x86_64 with 10.13. > > I found this confusing, and pressed the CRAN macOS maintainer to clarify but > apparently did so in an insuffciently convincing manner. (There was a word > about it being emailed to r-sig-mac which is a list I am not on as I don't > have a macOS machine.) So in case anybody else wonders, my hope is that the > above is of help. At my day job, we will now switch to 11.0 to take advantage > of some more recent C++ features. > > Dirk > > -- > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel > ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel