| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This issue may be a result of #6418 causing openmp support to be detected, and data.table to be compiled, but not linked with -fopenmp.
dgealow@Dans-P4-MacBook-Pro ~ % R
R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
[...]
> install.packages('data.table')
Installing package into ‘/Users/dgealow/Library/R/arm64/4.2/library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
[selected 0-cloud]
There is a binary version available but the source version is later:
binary source needs_compilation
data.table 1.15.4 1.16.2 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
installing the source package ‘data.table’
trying URL 'https://cloud.r-project.org/src/contrib/data.table_1.16.2.tar.gz'
Content type 'application/x-gzip' length 5490076 bytes (5.2 MB)
==================================================
downloaded 5.2 MB
* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** using staged installation
zlib 1.2.11 is available ok
* checking if R installation supports OpenMP with "-Xclang -fopenmp" ... no
* checking if R installation supports OpenMP with "-fopenmp" ... yes
** libs
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c assign.c -o assign.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c between.c -o between.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c bmerge.c -o bmerge.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c chmatch.c -o chmatch.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c cj.c -o cj.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c coalesce.c -o coalesce.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c dogroups.c -o dogroups.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fastmean.c -o fastmean.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fcast.c -o fcast.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fifelse.c -o fifelse.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fmelt.c -o fmelt.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c forder.c -o forder.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frank.c -o frank.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fread.c -o fread.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c freadR.c -o freadR.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c froll.c -o froll.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frollR.c -o frollR.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frolladaptive.c -o frolladaptive.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fsort.c -o fsort.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwrite.c -o fwrite.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwriteR.c -o fwriteR.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c gsumm.c -o gsumm.o
gsumm.c:1173:38: warning: implicit conversion from 'long long' to 'long double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
1173 | ansd[i] = (ISNAN(s[i]) || s[i]>INT64_MAX || s[i]<=INT64_MIN) ? NA_INTEGER64 : (int64_t)s[i];
| ~^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdint.h:94:26: note: expanded from macro 'INT64_MAX'
94 | #define INT64_MAX 9223372036854775807LL
| ^~~~~~~~~~~~~~~~~~~~~
1 warning generated.
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c idatetime.c -o idatetime.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c ijoin.c -o ijoin.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c inrange.c -o inrange.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nafill.c -o nafill.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c negate.c -o negate.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nqrecreateindices.c -o nqrecreateindices.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c openmp-utils.c -o openmp-utils.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c programming.c -o programming.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c quickselect.c -o quickselect.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c rbindlist.c -o rbindlist.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c reorder.c -o reorder.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c shift.c -o shift.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c snprintf.c -o snprintf.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c subset.c -o subset.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c transpose.c -o transpose.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c types.c -o types.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c uniqlist.c -o uniqlist.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c utils.c -o utils.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c vecseq.c -o vecseq.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c wrappers.c -o wrappers.o
clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o idatetime.o ijoin.o init.o inrange.o nafill.o negate.o nqrecreateindices.o openmp-utils.o programming.o quickselect.o rbindlist.o reorder.o shift.o snprintf.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -lz -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: -single_module is obsolete
ld: warning: -multiply_defined is obsolete
ld: warning: -single_module is obsolete
ld: warning: -multiply_defined is obsolete
PKG_CFLAGS = -fopenmp
PKG_LIBS = -lz
if [ "data.table.so" != "data_table.so" ]; then mv data.table.so data_table.so; fi
if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id data_table.so data_table.so; fi
installing to /Users/dgealow/Library/R/arm64/4.2/library/00LOCK-data.table/00new/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘data.table’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/dgealow/Library/R/arm64/4.2/library/00LOCK-data.table/00new/data.table/libs/data_table.so':
dlopen(/Users/dgealow/Library/R/arm64/4.2/library/00LOCK-data.table/00new/data.table/libs/data_table.so, 0x0006): symbol not found in flat namespace '___kmpc_barrier'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/dgealow/Library/R/arm64/4.2/library/data.table’
* restoring previous ‘/Users/dgealow/Library/R/arm64/4.2/library/data.table’
The downloaded source packages are in
‘/private/var/folders/sr/lw2ng95s3mj1qsqtdxywzjvc0000gn/T/Rtmp0Drt3Z/downloaded_packages’
Warning message:
In install.packages("data.table") :
installation of package ‘data.table’ had non-zero exit status
>
Sys.setenv(PKG_LIBS='-fopenmp') before installing the package, as suggested by aitap below along with a possible package-level solution.
R version 4.2.3 (2023-03-15) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS 15.1.1 Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.2.3
| Back | FazBrowse Home | New Git URL |
Activity
aitap commented on Nov 29, 2024
Does it work if you Sys.setenv(PKG_LIBS='-fopenmp') first? If yes, we might need an export PKG_LIBS="${PKG_LIBS} -fopenmp" here too:
data.table/configure
Line 128 in 546259d
(Interesting how it previously worked when compiling with -fopenmp but linking without it. This is probably better handled by someone with a Mac.)
evg-trushkin commented on Dec 2, 2024
Works in my case (macOS 14.6.1 M1). Thanks!
dvg-p4 commented on Dec 2, 2024
Yes, it does!
dvg-p4 commented on Dec 2, 2024
I'm not sure that it did--previous installations from source of data table on my mac have always started up with a message along the lines of "this installation was compiled without openmp support and is running in single-threaded mode, go complain to Apple"
Here it is in full:data.table 1.15.4 using 1 threads (see ?getDTthreads). Latest news: r-datatable.com
This installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode.
This is a Mac. Please read https://mac.r-project.org/openmp/. Please engage with Apple and ask them for support. Check r-datatable.com for updates, and our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/Installation. After several years of many reports of installation problems on Mac, it's time to gingerly point out that there have been no similar problems on Windows or Linux.
dvg-p4 commented on Dec 2, 2024
Ok so on my R4.4 installation, we take a different branch and hit a similar error that seems resistant to the workaround:
% R R version 4.4.1 (2024-06-14) -- "Race for Your Life" [...] > install.packages('data.table', type = 'source') --- Please select a CRAN mirror for use in this session --- [selected 0-cloud] trying URL 'https://cloud.r-project.org/src/contrib/data.table_1.16.2.tar.gz' Content type 'application/x-gzip' length 5490076 bytes (5.2 MB) ================================================== downloaded 5.2 MB * installing *source* package ‘data.table’ ...** package ‘data.table’ successfully unpacked and MD5 sums checked ** using staged installation zlib 1.2.11 is available ok * checking if R installation supports OpenMP with "-Xclang -fopenmp" ... yes ** libs using C compiler: ‘Homebrew clang version 19.1.3’ using SDK: ‘’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c assign.c -o assign.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c between.c -o between.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c bmerge.c -o bmerge.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c chmatch.c -o chmatch.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c cj.c -o cj.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c coalesce.c -o coalesce.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c dogroups.c -o dogroups.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fastmean.c -o fastmean.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fcast.c -o fcast.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fifelse.c -o fifelse.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fmelt.c -o fmelt.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c forder.c -o forder.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frank.c -o frank.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fread.c -o fread.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c freadR.c -o freadR.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c froll.c -o froll.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frollR.c -o frollR.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frolladaptive.c -o frolladaptive.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fsort.c -o fsort.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwrite.c -o fwrite.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwriteR.c -o fwriteR.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c gsumm.c -o gsumm.o gsumm.c:1173:38: warning: implicit conversion from 'long long' to 'long double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion] 1173 | ansd[i] = (ISNAN(s[i]) || s[i]>INT64_MAX || s[i]<=INT64_MIN) ? NA_INTEGER64 : (int64_t)s[i]; | ~^~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdint.h:94:26: note: expanded from macro 'INT64_MAX' 94 | #define INT64_MAX 9223372036854775807LL | ^~~~~~~~~~~~~~~~~~~~~ 1 warning generated. clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c idatetime.c -o idatetime.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c ijoin.c -o ijoin.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c inrange.c -o inrange.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nafill.c -o nafill.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c negate.c -o negate.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nqrecreateindices.c -o nqrecreateindices.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c openmp-utils.c -o openmp-utils.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c programming.c -o programming.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c quickselect.c -o quickselect.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c rbindlist.c -o rbindlist.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c reorder.c -o reorder.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c shift.c -o shift.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c snprintf.c -o snprintf.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c subset.c -o subset.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c transpose.c -o transpose.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c types.c -o types.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c uniqlist.c -o uniqlist.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c utils.c -o utils.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c vecseq.c -o vecseq.o clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c wrappers.c -o wrappers.o clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o idatetime.o ijoin.o init.o inrange.o nafill.o negate.o nqrecreateindices.o openmp-utils.o programming.o quickselect.o rbindlist.o reorder.o shift.o snprintf.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -lomp -lz -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation PKG_CFLAGS = -Xclang -fopenmp PKG_LIBS = -lomp -lz if [ "data.table.so" != "data_table.so" ]; then mv data.table.so data_table.so; fi if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id data_table.so data_table.so; fi installing to /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-data.table/00new/data.table/libs ** R ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘data.table’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-data.table/00new/data.table/libs/data_table.so': dlopen(/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-data.table/00new/data.table/libs/data_table.so, 0x0006): symbol not found in flat namespace '___kmpc_dispatch_deinit' Error: loading failed Execution halted ERROR: loading failed * removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/data.table’ The downloaded source packages are in ‘/private/var/folders/sr/lw2ng95s3mj1qsqtdxywzjvc0000gn/T/RtmpHgVbPN/downloaded_packages’ Warning message: In install.packages("data.table", type = "source") : installation of package ‘data.table’ had non-zero exit statusThough this time the particular symbol we fail to find is ___kmpc_dispatch_deinit.
aitap commented on Dec 3, 2024
Interesting. The flags seem correct according to the OpenMP on Mac page, but the workaround is apparently not needed and doesn't work with the Homebrew toolchain. Is this R build also from Homebrew?
I suppose we'll have to update the configure test to not only compile a shared library with R CMD SHLIB but also try to load it before declaring the test successful.
It looks like the same workaround should work because the configure script only appends to the user-provided PKG_CFLAGS and PKG_LIBS environment variables, and yet it doesn't. Hard to figure out without running sh -x configure on a real Mac.
dvg-p4 commented on Dec 3, 2024
Well, doing this produces a third scenario for me, in which all of the checks fail.
dvg-p4 commented on Dec 3, 2024
--though it occurs to me that I do have some R makevars set, which could be affecting things
Although I don't see how they'd account for the difference between R4.2 and R4.4
dvg-p4 commented on Dec 3, 2024
Ah, it's probably the fact that R4.3 changed the default C(++) standard to C(++)17. R4.3 behaves the same as R4.4 for me.
aitap commented on Dec 3, 2024
dvg-p4 commented on Dec 3, 2024
(/Library/Frameworks/R.framework/Resources symlinks into whichever R version I have selected as current with the handy Rswitch utility -- 4.3 for the above, though 4.4 yields similar results)
aitap commented on Dec 3, 2024
20 remaining items
twitched commented on Apr 16, 2025
Confirmed. It installs correctly with clang 16.0.0, which can be found in Command Line Tools for Xcode 16.2.
can-taslicukur commented on Apr 17, 2025
Wow, thank you so much @twitched! I was able to install with clang 16.0.0. To be clear, here is what I did:
a. Adding CC=/opt/homebrew/opt/llvm@16/bin/clang to your .R/Makevars
OR
b. Temporarily using clang 16.0.0 only for data.table installation using the withr package:
eyayaw commented on Jul 16, 2025
This worked for me too.
.R/Makevars❯ Rscript -e "install.packages('data.table', type='source')" Installing package into ‘/Users/eyayaw/Library/R/arm64/4.5/library’ (as ‘lib’ is unspecified) trying URL 'https://packagemanager.rstudio.com/all/latest/src/contrib/data.table_1.17.8.tar.gz' Content type 'binary/octet-stream' length 5744656 bytes (5.5 MB) ================================================== downloaded 5.5 MB** this is package ‘data.table’ version ‘1.17.8’
** package ‘data.table’ successfully unpacked and MD5 sums checked
** using staged installation
zlib 1.2.12 is available ok
** libs
using C compiler: ‘Homebrew clang version 16.0.6’
using SDK: ‘MacOSX26.0.sdk’
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c assign.c -o assign.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c between.c -o between.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c bmerge.c -o bmerge.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c chmatch.c -o chmatch.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c cj.c -o cj.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c coalesce.c -o coalesce.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c dogroups.c -o dogroups.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fastmean.c -o fastmean.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fcast.c -o fcast.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fifelse.c -o fifelse.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fmelt.c -o fmelt.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c forder.c -o forder.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frank.c -o frank.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fread.c -o fread.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c freadR.c -o freadR.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c froll.c -o froll.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frollR.c -o frollR.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frolladaptive.c -o frolladaptive.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fsort.c -o fsort.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwrite.c -o fwrite.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwriteR.c -o fwriteR.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c gsumm.c -o gsumm.o
gsumm.c:1177:38: warning: implicit conversion from 'long long' to 'long double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
ansd[i] = (ISNAN(s[i]) || s[i]>INT64_MAX || s[i]<=INT64_MIN) ? NA_INTEGER64 : (int64_t)s[i];
~^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/stdint.h:94:26: note: expanded from macro 'INT64_MAX'
#define INT64_MAX 9223372036854775807LL
^~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c idatetime.c -o idatetime.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c ijoin.c -o ijoin.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c inrange.c -o inrange.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nafill.c -o nafill.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c negate.c -o negate.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nqrecreateindices.c -o nqrecreateindices.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c openmp-utils.c -o openmp-utils.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c programming.c -o programming.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c quickselect.c -o quickselect.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c rbindlist.c -o rbindlist.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c reorder.c -o reorder.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c shift.c -o shift.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c snprintf.c -o snprintf.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c subset.c -o subset.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c transpose.c -o transpose.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c types.c -o types.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c uniqlist.c -o uniqlist.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c utils.c -o utils.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c vecseq.c -o vecseq.o
/opt/homebrew/opt/llvm@16/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/opt/libomp/include -Xclang -fopenmp -I/opt/homebrew/opt/gettext/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c wrappers.c -o wrappers.o
/opt/homebrew/opt/llvm@16/bin/clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -L/opt/homebrew/opt/libomp/lib -lomp -L/opt/homebrew/opt/gettext/lib -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o idatetime.o ijoin.o init.o inrange.o nafill.o negate.o nqrecreateindices.o openmp-utils.o programming.o quickselect.o rbindlist.o reorder.o shift.o snprintf.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -lomp -lz -F/Library/Frameworks/R.framework/.. -framework R
ld: warning: ignoring duplicate libraries: '-lomp'
PKG_CFLAGS = -Xclang -fopenmp
PKG_LIBS = -lomp -lz
if [ "data.table.so" != "data_table.so" ]; then mv data.table.so data_table.so; fi
if [ "" != "Windows_NT" ] && [ uname -s = 'Darwin' ]; then install_name_tool -id data_table.so data_table.so; fi
installing to /Users/eyayaw/Library/R/arm64/4.5/library/00LOCK-data.table/00new/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
The downloaded source packages are in
‘/private/var/folders/rs/rprvvwqd59j4cw51g1bb48dr0000gn/T/RtmpzzbGdy/downloaded_packages’
tdhock commented on Sep 15, 2025
hi! I am having the same issue on github actions, with macos-latest image (same as macos-15 since its release 2 weeks ago). Downgrading to macos-14 image works, consistent with the comment about that downgrading clang works. tdhock/atime#94
This is in the context of running atime tests, one of the cases involves data.table.
Downgrading is a nice temporary work-around, but we should eventually try to get data.table compiling with the newer compilers, right?
So this is perhaps interesting news for this issue, because we could perhaps use github actions with os: macos-15 to test this issue with data.table compilation scripts? Anyone willing to give it a try? @aitap ?
tdhock commented on Sep 15, 2025
this is not a bug in clang. it is a bug in data.table. vllm had the same problem, and fixed it via this PR vllm-project/vllm#16086 which we may use as inspiration for our fix. that pr removes these two flags "-Xpreprocessor"
"-fopenmp"
edwardlavender commented on Feb 12, 2026
Any updates on this issue?
I think I am having the same problem:
> sessionInfo() R version 4.5.2 (2025-10-31) Platform: aarch64-apple-darwin20 Running under: macOS Sequoia 15.7.3 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 time zone: Europe/London tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.5.2 tools_4.5.2 rstudioapi_0.18.0 > install.packages("data.table", type = "source") trying URL 'https://cran.rstudio.com/src/contrib/data.table_1.18.2.1.tar.gz' Content type 'application/x-gzip' length 6023973 bytes (5.7 MB) ================================================== downloaded 5.7 MB * installing *source* package ‘data.table’ ... ** this is package ‘data.table’ version ‘1.18.2.1’ ** package ‘data.table’ successfully unpacked and MD5 sums checked ** using staged installation zlib 1.2.12 is available ok * checking if R installation supports OpenMP with "-Xclang -fopenmp" ... yes ** libs using C compiler: ‘Apple clang version 17.0.0 (clang-1700.6.3.2)’ using SDK: ‘MacOSX26.2.sdk’ /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c assign.c -o assign.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c between.c -o between.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c bmerge.c -o bmerge.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c chmatch.c -o chmatch.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c cj.c -o cj.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c coalesce.c -o coalesce.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c dogroups.c -o dogroups.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fastmean.c -o fastmean.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fcast.c -o fcast.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fifelse.c -o fifelse.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fmelt.c -o fmelt.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c forder.c -o forder.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frank.c -o frank.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fread.c -o fread.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c freadR.c -o freadR.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c froll.c -o froll.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frollR.c -o frollR.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frolladaptive.c -o frolladaptive.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frollapply.c -o frollapply.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fsort.c -o fsort.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwrite.c -o fwrite.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwriteR.c -o fwriteR.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c gsumm.c -o gsumm.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c hash.c -o hash.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c idatetime.c -o idatetime.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c ijoin.c -o ijoin.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c inrange.c -o inrange.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c mergelist.c -o mergelist.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nafill.c -o nafill.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c negate.c -o negate.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nqrecreateindices.c -o nqrecreateindices.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c openmp-utils.c -o openmp-utils.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c programming.c -o programming.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c quickselect.c -o quickselect.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c rbindlist.c -o rbindlist.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c reorder.c -o reorder.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c shellsort.c -o shellsort.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c shift.c -o shift.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c snprintf.c -o snprintf.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c subset.c -o subset.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c transpose.c -o transpose.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c types.c -o types.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c uniqlist.c -o uniqlist.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c utils.c -o utils.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c vecseq.c -o vecseq.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c wrappers.c -o wrappers.o /usr/bin/clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -L/opt/homebrew/lib -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o frollapply.o fsort.o fwrite.o fwriteR.o gsumm.o hash.o idatetime.o ijoin.o init.o inrange.o mergelist.o nafill.o negate.o nqrecreateindices.o openmp-utils.o programming.o quickselect.o rbindlist.o reorder.o shellsort.o shift.o snprintf.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -fvisibility=hidden -lomp -lz -F/Library/Frameworks/R.framework/.. -framework R PKG_CFLAGS = -fvisibility=hidden -Xclang -fopenmp PKG_LIBS = -fvisibility=hidden -lomp -lz if [ "data.table.so" != "data_table.so" ]; then mv data.table.so data_table.so; fi if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id data_table.so data_table.so; fi installing to /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/00LOCK-data.table/00new/data.table/libs ** R ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘data.table’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/00LOCK-data.table/00new/data.table/libs/data_table.so': dlopen(/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/00LOCK-data.table/00new/data.table/libs/data_table.so, 0x0006): symbol not found in flat namespace '___kmpc_dispatch_deinit' Error: loading failed Execution halted ERROR: loading failed * removing ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/data.table’ * restoring previous ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/data.table’ The downloaded source packages are in ‘/private/var/folders/nl/ygb3g6tj24z06jddbqqhj6hw0000gn/T/RtmpLEsYgZ/downloaded_packages’ Warning message: In utils::install.packages("data.table", type = "source") : installation of package ‘data.table’ had non-zero exit statusThe Sys.setenv(PKG_LIBS='-fopenmp') trick does not work for me.
> Sys.setenv(PKG_LIBS='-fopenmp') > install.packages("data.table", type = "source") trying URL 'https://cran.rstudio.com/src/contrib/data.table_1.18.2.1.tar.gz' Content type 'application/x-gzip' length 6023973 bytes (5.7 MB) ================================================== downloaded 5.7 MB * installing *source* package ‘data.table’ ... ** this is package ‘data.table’ version ‘1.18.2.1’ ** package ‘data.table’ successfully unpacked and MD5 sums checked ** using staged installation zlib 1.2.12 is available ok * checking if R installation supports OpenMP with "-Xclang -fopenmp" ... yes ** libs using C compiler: ‘Apple clang version 17.0.0 (clang-1700.6.3.2)’ using SDK: ‘MacOSX26.2.sdk’ /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c assign.c -o assign.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c between.c -o between.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c bmerge.c -o bmerge.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c chmatch.c -o chmatch.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c cj.c -o cj.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c coalesce.c -o coalesce.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c dogroups.c -o dogroups.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fastmean.c -o fastmean.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fcast.c -o fcast.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fifelse.c -o fifelse.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fmelt.c -o fmelt.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c forder.c -o forder.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frank.c -o frank.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fread.c -o fread.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c freadR.c -o freadR.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c froll.c -o froll.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frollR.c -o frollR.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frolladaptive.c -o frolladaptive.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c frollapply.c -o frollapply.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fsort.c -o fsort.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwrite.c -o fwrite.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c fwriteR.c -o fwriteR.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c gsumm.c -o gsumm.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c hash.c -o hash.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c idatetime.c -o idatetime.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c ijoin.c -o ijoin.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c inrange.c -o inrange.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c mergelist.c -o mergelist.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nafill.c -o nafill.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c negate.c -o negate.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c nqrecreateindices.c -o nqrecreateindices.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c openmp-utils.c -o openmp-utils.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c programming.c -o programming.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c quickselect.c -o quickselect.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c rbindlist.c -o rbindlist.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c reorder.c -o reorder.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c shellsort.c -o shellsort.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c shift.c -o shift.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c snprintf.c -o snprintf.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c subset.c -o subset.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c transpose.c -o transpose.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c types.c -o types.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c uniqlist.c -o uniqlist.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c utils.c -o utils.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c vecseq.c -o vecseq.o /usr/bin/clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -I/opt/homebrew/include -fvisibility=hidden -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c wrappers.c -o wrappers.o /usr/bin/clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -L/opt/homebrew/lib -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o frollapply.o fsort.o fwrite.o fwriteR.o gsumm.o hash.o idatetime.o ijoin.o init.o inrange.o mergelist.o nafill.o negate.o nqrecreateindices.o openmp-utils.o programming.o quickselect.o rbindlist.o reorder.o shellsort.o shift.o snprintf.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -fvisibility=hidden -fopenmp -lomp -lz -F/Library/Frameworks/R.framework/.. -framework R clang: error: unsupported option '-fopenmp' make: *** [data.table.so] Error 1 ERROR: compilation failed for package ‘data.table’ * removing ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/data.table’ * restoring previous ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/data.table’My Makevars file looks like:
Any advice would be welcome!
remlapmot commented on Feb 12, 2026
Using the llvm clang 16 works - see the instructions in the message above #6622 (comment)
aitap commented on Feb 12, 2026
edwardlavender commented on Feb 12, 2026
Thank you for the advice!
stefanocoretta commented on Feb 24, 2026
Hi! Having the same issue here, but I do need to build from source because I use renv and when I restore an old project with a slightly older data.table, then the error above occurs. I tried installing from source with the latest data.table and it doesn't work.
I am bit lost in the thread, so I not sure what the current solution would be.
I installed the latest CLI tools with xcode-select --install. I don't have a Makevars and I using the CRAN build of R.
Output of R CMD config --all
DetailsEDIT: So, this worked for me:
Installed libraries with https://mac.r-project.org/bin/ (not sure they are needed for data.table but they are needed for other packages)
Installed OpenMP with https://mac.thecoatlessprofessor.com/macrtools/ (It creates Makevars too, with CPPFLAGS += -Xclang -fopenmp LDFLAGS += -lomp)
brew install llvm@16
Installed data.table from source with:
withr::with_makevars( c(CC = "/opt/homebrew/opt/llvm@16/bin/clang"), install.packages("data.table", type = "source", repos = c(CRAN = "https://cloud.r-project.org/")) )It works. BUT the Makevars break compilation of other packages (like Matrix).
aitap commented on Mar 3, 2026
Thank you for sharing your experience!
Is is possible to install Xcode 14.2/14.3 on macOS Tahoe 26.3? That's the only supported toolchain for the CRAN build of R-4.5 for macOS.
stefanocoretta commented on Mar 5, 2026
R 4.5.2 for macOS arm64 (which is what I have) requires Xcode 16, but I installed Xcode 26 and it worked fine. (I don't think Xcode 16 works on Tahoe, I've seen people reporting errors after installing it).
As far as I know there are no breaking changes between Xcode 16 and 26 (which is the following release despite the number jump), so maybe that's why it works fine but not sure?