I just installed data.table binary. It detects openmp support. This is all I
need.
My Mac only has command line tools. My xcode-select version is 2410. How does
it map to Xcode/CLT?
> system("xcode-select --version”)
xcode-select version 2410.
> system("clang --version")
>
Apple clang version 17.0.0 (clang-1700.6.3.2)
Target: x86_64-apple-darwin24.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
!> system("gfortran --version")
GNU Fortran (GCC) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
Thanks,
Naresh
> On Jan 3, 2026, at 9:43 PM, Simon Urbanek <[email protected]> wrote:
>
> Naresh,
>
> as for the original problem, just re-install the package binary from CRAN
> (see [1], i.e., just run
> install.packages("data.table",repos="https://mac.r-project.org")).
>
> As for your secondary problem (which should be irrelevant by now since you
> can get the right binary from CRAN), you have mismatching Xcode and OpenMP
> versions. I suspect you are using Xocde/CLT > 16.2 which is incompatible with
> the clang 17 run-time (see the note on the OpenMP page). So if you really
> want to compile it from sources, the two options you have are a) install
> Xcode/CLT 16.2 (which uses clang 17) or b) use OpenMP from clang 19. For the
> latter, however, you may need some work since that run-time is incompatible
> with the libomp shipped with R so you may need to modify the flags (see the
> note in the flags section of the OpenMP page), but I'm not 100% sure if
> data.table supports that (or you can replace the R run-time with the clang 19
> run-time if you don't use any packages that link to it). Again, it's much
> easier to install the updated CRAN binary.
>
> Cheers,
> Simon
>
> [1] - https://stat.ethz.ch/pipermail/r-sig-mac/2026-January/015314.html
>
>
>> On 30/12/2025, at 11:55, Naresh Gurbuxani <[email protected]>
>> wrote:
>>
>> I should have posted this here.
>>
>> Sent from my iPhone
>>
>> Begin forwarded message:
>>
>> From: Naresh Gurbuxani <[email protected]>
>> Date: December 29, 2025 at 12:02:10 PM EST
>> To: [email protected]
>> Subject: [R] data.table does not find openmp support
>>
>>
>> On my Intel Mac, with R 4.4, data.table worked with openmp support.
>> After installing R 4.5, I reinstalled data.table using
>> install.packages("data.table"). Installation went smoothly, but
>> data.table did not detect openmp support. I removed data.table, then
>> reinstalled using install.packages("data.table", type = "source"). Now
>> data.table install has non-zero exit status.
>>
>> Following instructions at https://mac.r-project.org/openmp/, I installed
>> Open MP support by running on command line
>>
>> curl -O
>> https://mac.r-project.org/openmp/openmp-17.0.6-darwin20-Release.tar.gz
>> sudo tar fvxz openmp-17.0.6-darwin20-Release.tar.gz -C /
>>
>> Below is information from my R session:
>>
>> sessionInfo()
>> R version 4.5.2 (2025-10-31)
>> Platform: x86_64-apple-darwin20
>> Running under: macOS Sequoia 15.7.3
>>
>> Matrix products: default
>> BLAS:
>> /Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/lib/libRblas.0.dylib
>> LAPACK:
>> /Library/Frameworks/R.framework/Versions/4.5-x86_64/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: America/New_York
>> tzcode source: internal
>>
>> attached base packages:
>> [1] stats graphics utils datasets grDevices methods base
>>
>> other attached packages:
>> [1] lattice_0.22-7
>>
>> loaded via a namespace (and not attached):
>> [1] compiler_4.5.2 tools_4.5.2 grid_4.5.2
>> system("gfortran --version")
>> GNU Fortran (GCC) 14.2.0
>> Copyright (C) 2024 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions. There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>> system("xcode-select -version")
>> xcode-select version 2410.
>> system("gcc --version")
>> Apple clang version 17.0.0 (clang-1700.6.3.2)
>> Target: x86_64-apple-darwin24.6.0
>> Thread model: posix
>> InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>> install.packages("data.table", lib = .libPaths()[2], type = "source")
>> trying URL 'https://cran.r-project.org/src/contrib/data.table_1.18.0.tar.gz'
>> Content type 'application/x-gzip' length 6020932 bytes (5.7 MB)
>> ==================================================
>> downloaded 5.7 MB
>>
>> * installing *source* package ‘data.table’ ...
>> ** this is package ‘data.table’ version ‘1.18.0’
>> ** package ‘data.table’ successfully unpacked and MD5 sums checked
>> ** using staged installation
>> zlib 1.3.1 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’
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c assign.c -o assign.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c between.c -o between.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c bmerge.c -o bmerge.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c chmatch.c -o chmatch.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c cj.c -o cj.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c coalesce.c -o coalesce.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c dogroups.c -o dogroups.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c fastmean.c -o fastmean.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c fcast.c -o fcast.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c fifelse.c -o fifelse.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c fmelt.c -o fmelt.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c forder.c -o forder.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c frank.c -o frank.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c fread.c -o fread.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c freadR.c -o freadR.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c froll.c -o froll.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c frollR.c -o frollR.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c frolladaptive.c -o
>> frolladaptive.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c frollapply.c -o frollapply.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c fsort.c -o fsort.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c fwrite.c -o fwrite.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c fwriteR.c -o fwriteR.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c gsumm.c -o gsumm.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c hash.c -o hash.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c idatetime.c -o idatetime.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c ijoin.c -o ijoin.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c inrange.c -o inrange.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c mergelist.c -o mergelist.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c nafill.c -o nafill.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c negate.c -o negate.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c nqrecreateindices.c -o
>> nqrecreateindices.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c openmp-utils.c -o openmp-utils.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c programming.c -o programming.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c quickselect.c -o quickselect.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c rbindlist.c -o rbindlist.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c reorder.c -o reorder.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c shellsort.c -o shellsort.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c shift.c -o shift.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c snprintf.c -o snprintf.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c subset.c -o subset.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c transpose.c -o transpose.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c types.c -o types.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c uniqlist.c -o uniqlist.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c utils.c -o utils.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c vecseq.c -o vecseq.o
>> clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include"
>> -DNDEBUG -I/opt/R/x86_64/include -Xclang -fopenmp -I/opt/local/include
>> -fPIC -falign-functions=64 -Wall -g -O2 -c wrappers.c -o wrappers.o
>> clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined
>> dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib
>> -L/opt/R/x86_64/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 -lomp -L/opt/local/lib -lz -F/Library/Frameworks/R.framework/..
>> -framework R
>> PKG_CFLAGS = -Xclang -fopenmp -I/opt/local/include
>> PKG_LIBS = -lomp -L/opt/local/lib -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-x86_64/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-x86_64/Resources/library/00LOCK-data.table/00new/data.table/libs/data_table.so':
>> dlopen(/Library/Frameworks/R.framework/Versions/4.5-x86_64/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-x86_64/Resources/library/data.table’
>>
>> The downloaded source packages are in
>>
>> ‘/private/var/folders/d5/sbs6108j6qd9jw7g652bm9sr0000gn/T/RtmpqcFVH3/downloaded_packages’
>> Warning message:
>> In install.packages("data.table", lib = .libPaths()[2], type = "source") :
>> installation of package ‘data.table’ had non-zero exit status
>> ______________________________________________
>> [email protected] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> [email protected]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac