You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to compile data.table from source to use with R 4.1.2 on macOS 15.6 using the Homebrew LLVM toolchain. The code appropriately finds the OpenMP support and compiles, but the package fails at the testing stage with an error complaining about class ITime being an undefined export Any ideas?
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘data.table’ in namespaceExport(ns, exports):
undefined exports: class ITime
Error: loading failed
Execution halted
Older versions of data.table will not compile do to an issue with the definition of the macro "match" in the R headers and the usage in the OpenMP code. I haven't really explored that.
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/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.1.2 rentrez_1.2.3 fastmap_1.1.0 DBI_1.1.1 htmltools_0.5.2 tools_4.1.2 yaml_2.2.1
[8] rmarkdown_2.11 RMySQL_0.10.22 knitr_1.36 xfun_0.28 digest_0.6.28 jsonlite_1.7.2 rlang_0.4.12
[15] evaluate_0.14 XML_3.99-0.8
Makevars file:
# Homebrew bin / opt / lib locations
HB=/usr/local/bin
HO=/usr/local/opt
HL=/usr/local/lib
HI=/usr/local/include
HF=/usr/local/gfortran
LIBOMP=$(HO)/libomp
# MacOS Xcode header location
# (do "xcrun -show-sdk-path" in terminal to get path)
XH=`xcrun -show-sdk-path`
# Make using all cores (set # to # of cores on your machine)
# MAKE=make -j4
# LLVM (Clang) compiler options
CC=$(HO)/llvm/bin/clang
CXX=$(CC)++
CXX98=$(CC)++
CXX11=$(CC)++
CXX14=$(CC)++
CXX17=$(CC)++
# FORTRAN
FC=$(HF)/bin/gfortran
F77=$(FC)
FLIBS=-L$(HF)/lib -lgfortran -lquadmath -lm
# STD libraries
CXX1XSTD=-std=c++0x
CXX11STD=-std=c++11
CXX14STD=-std=c++14
CXX17STD=-std=c++17
# FLAGS
# STD_FLAGS=-g -O3 -Wall -pedantic -mtune=native -pipe
STD_FLAGS=-g -O3 -mtune=native -pipe
CFLAGS=$(STD_FLAGS)
CXXFLAGS=$(STD_FLAGS)
CXX98FLAGS=$(STD_FLAGS)
CXX11FLAGS=$(STD_FLAGS)
CXX14FLAGS=$(STD_FLAGS)
CXX17FLAGS=$(STD_FLAGS)
# Preprocessor FLAGS
# NB: -isysroot refigures the include path to the Xcode SDK we set above
CPPFLAGS=-isysroot $(XH) \
-I$(HO)/llvm/include -I$(HO)/openssl/include \
-I$(HO)/gettext/include -I$(HO)/tcl-tk/include \
-I$(HI)
# Linker flags (suggested by homebrew)
LDFLAGS+=-L$(HO)/llvm/lib -Wl,-rpath,$(HO)/llvm/lib
# Flags for OpenMP support that should allow packages that want to use
# OpenMP to do so (data.table), and other packages that bork with
# -fopenmp flag (stringi) to be left alone
SHLIB_OPENMP_CFLAGS=-fopenmp
SHLIB_OPENMP_CXXFLAGS=-fopenmp
SHLIB_OPENMP_CXX98FLAGS=-fopenmp
SHLIB_OPENMP_CXX11FLAGS=-fopenmp
SHLIB_OPENMP_CXX14FLAGS=-fopenmp
SHLIB_OPENMP_CXX17FLAGS=-fopenmp
SHLIB_OPENMP_FCFLAGS=-fopenmp
SHLIB_OPENMP_FFLAGS=-fopenmp
The text was updated successfully, but these errors were encountered:
JDMcIninch
changed the title
Compiling on macOS 11.6 with OpenMP (Homebrew LLVM) - export class ITime error on load
Compiling on macOS 10.6 with OpenMP (Homebrew LLVM) - export class ITime error on load
Nov 5, 2021
I'm attempting to compile data.table from source to use with R 4.1.2 on macOS 15.6 using the Homebrew LLVM toolchain. The code appropriately finds the OpenMP support and compiles, but the package fails at the testing stage with an error complaining about class ITime being an undefined export Any ideas?
Older versions of data.table will not compile do to an issue with the definition of the macro "match" in the R headers and the usage in the OpenMP code. I haven't really explored that.
Compilation:
Session info:
Makevars file:
The text was updated successfully, but these errors were encountered: