I am working on a mac with catalina 10.15.5, having updated R recently there is now a warning when I call data.table which indicates it is single-threading. I followed the instructions here, removed the package and reinstalled from cran, however, the warning remains and getDTthreads() still returns 1 (even following stDTthreads(2)).
How can I resolve this issue?
the notice is
remove.packages("data.table")
install.packages("data.table")
library(data.table)
data.table 1.12.8 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.
If this is a Mac, please ensure you are using R>=3.4.0 and have followed our Mac instructions here:
https://github.com/Rdatatable/data.table/wiki/Installation.
This warning message should not occur on Windows or Linux. If it does, please file a GitHub issue.
**********
getDTthreads()
[1] 1
My sessioninfo (after calling library) is
sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.5
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.0/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
other attached packages:
[1] data.table_1.12.8
loaded via a namespace (and not attached):
[1] compiler_4.0.2 tools_4.0.2
and my user/.R/Makevars has
CC = /usr/bin/gcc64
CXX = /usr/bin/g++
SHLIB_OPENMP_CFLAGS = -fopenmp
# if you downloaded llvm manually above, replace with your chosen NEW_PATH/clang
LLVM_LOC = /usr/local/opt/llvm
CC=$(LLVM_LOC)/bin/clang -fopenmp
CXX=$(LLVM_LOC)/bin/clang++ -fopenmp
# -O3 should be faster than -O2 (default) level optimisation ..
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
Edit:
install.packages("data.table", type = "source")
trying URL 'https://cran.rstudio.com/src/contrib/data.table_1.12.8.tar.gz'
Content type 'application/x-gzip' length 4948391 bytes (4.7 MB)
==================================================
downloaded 4.7 MB
* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** using staged installation
*** pkg-config is installed but 'pkg-config --exists zlib' did not return 0.
*** Compilation will now be attempted and if it works you can ignore this message. However,
*** if compilation fails, try 'locate zlib.h zconf.h' and ensure the zlib development library
*** is installed :
*** deb: zlib1g-dev (Debian, Ubuntu, ...)
*** rpm: zlib-devel (Fedora, EPEL, ...)
*** brew: zlib (OSX)
*** Note that zlib is required to compile R itself so you may find the advice in the R-admin
*** guide helpful regarding zlib. On Debian/Ubuntu, zlib1g-dev is a dependency of r-base as
*** shown by 'apt-cache showsrc r-base | grep ^Build-Depends | grep zlib', and therefore
*** 'sudo apt-get build-dep r-base' should be sufficient too.
*** To silence this message, please ensure that :
*** 1) 'pkg-config --exists zlib' succeeds (i.e. $? -eq 0)
*** 2) 'pkg-config --libs zlib' contains -lz
*** Compilation will now be attempted ...
** libs
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c assign.c -o assign.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c between.c -o between.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c bmerge.c -o bmerge.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c chmatch.c -o chmatch.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c cj.c -o cj.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c coalesce.c -o coalesce.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c dogroups.c -o dogroups.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c fastmean.c -o fastmean.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c fcast.c -o fcast.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c fifelse.c -o fifelse.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c fmelt.c -o fmelt.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c forder.c -o forder.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c frank.c -o frank.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c fread.c -o fread.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c freadR.c -o freadR.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c froll.c -o froll.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c frollR.c -o frollR.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c frolladaptive.c -o frolladaptive.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c fsort.c -o fsort.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c fwrite.c -o fwrite.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c fwriteR.c -o fwriteR.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c gsumm.c -o gsumm.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c ijoin.c -o ijoin.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c init.c -o init.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c inrange.c -o inrange.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c nafill.c -o nafill.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c nqrecreateindices.c -o nqrecreateindices.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c openmp-utils.c -o openmp-utils.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c quickselect.c -o quickselect.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c rbindlist.c -o rbindlist.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c reorder.c -o reorder.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c shift.c -o shift.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c subset.c -o subset.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c transpose.c -o transpose.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c types.c -o types.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c uniqlist.c -o uniqlist.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c utils.c -o utils.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c vecseq.c -o vecseq.o
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c wrappers.c -o wrappers.o
clang -mmacosx-version-min=10.13 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/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 ijoin.o init.o inrange.o nafill.o nqrecreateindices.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.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
mv data.table.so datatable.so
if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id datatable.so datatable.so; fi
installing to /Library/Frameworks/R.framework/Versions/4.0/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
** 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
* DONE (data.table)
The downloaded source packages are in
‘/private/var/folders/2p/75d89bf97ml3frtv1ylcw3nw0000gn/T/RtmpXjVzPR/downloaded_packages’
library(data.table)
data.table 1.12.8 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. If this is a Mac, please ensure you are using R>=3.4.0 and have followed our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/Installation. This warning message should not occur on Windows or Linux. If it does, please file a GitHub issue.
**********
Related
I'm trying to install rJava, an xlsx package dependency, but I'm having issues getting it to work. Every time I run the install.packages function, I get a long output culminating in the error:
"ld: library not found for -lpcre2-8"
What exactly can I do to circumvent this?
relevant info:
RStudio 2022.07.2+576 "Spotted Wakerobin"
R 4.2.2 "Innocent and Trusting"
Java 1.8.0_352 (arm64) "Azul Systems, Inc." - "Zulu 8.66.0.15"
Below are the function call and warnings/error I got in the R console. I noticed several warnings throughout after the "checking" phase.
Function call:
install.packages("rJava",type='source')
Warnings and error:
1 warning generated.
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c arrayc.c -o arrayc.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c callJNI.c -o callJNI.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c callback.c -o callback.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c fields.c -o fields.o
fields.c:91:13: warning: unused variable 'c' [-Wunused-variable]
char *c = clnam;
^
fields.c:149:9: warning: unused variable 'clnam' [-Wunused-variable]
char *clnam = 0, *detsig = 0;
^
2 warnings generated.
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -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. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c jri_glue.c -o jri_glue.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c loader.c -o loader.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c otables.c -o otables.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c rJava.c -o rJava.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c registration.c -o registration.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c tools.c -o tools.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 rJava.so Rglue.o arrayc.o callJNI.o callback.o fields.o init.o jri_glue.o loader.o otables.o rJava.o registration.o tools.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
(cd ../jri && make)
make -C src JRI.jar
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/javac -target 1.4 -source 1.4 -d . ../Mutex.java ../RBool.java ../RConsoleOutputStream.java ../REXP.java ../RFactor.java ../RList.java ../RMainLoopCallbacks.java ../RVector.java ../Rengine.java ../package-info.java
warning: [options] bootstrap class path not set in conjunction with -source 1.4
warning: [options] source value 1.4 is obsolete and will be removed in a future release
warning: [options] target value 1.4 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
4 warnings
if [ -n "/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/javah" ]; then /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/javah -d . -classpath . org.rosuda.JRI.Rengine; fi
clang -arch arm64 -c -o Rengine.o Rengine.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include
clang -arch arm64 -c -o jri.o jri.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include
clang -arch arm64 -c -o Rcallbacks.o Rcallbacks.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include
clang -arch arm64 -c -o Rinit.o Rinit.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -fno-common -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include
clang -arch arm64 -c -o globals.o globals.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin
clang -arch arm64 -c -o rjava.o rjava.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -DHAVE_CONFIG_H -falign-functions=64 -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/../include/darwin
clang -arch arm64 -o libjri.jnilib Rengine.o jri.o Rcallbacks.o Rinit.o globals.o rjava.o -dynamiclib -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/server -ljvm -L/opt/R/arm64/lib -F/Library/Frameworks/R.framework/.. -framework R -L/opt/R/arm64/lib -lpcre2-8 -llzma -lbz2 -lz -licucore -ldl -lm -liconv
ld: library not found for -lpcre2-8
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libjri.jnilib] Error 1
make[1]: *** [src/JRI.jar] Error 2
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rJava’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rJava’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rJava’
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/bw/15yqlzdd3gbd_r0trwcsy8h40000gn/T/RtmpZj51Iw/downloaded_packages’
lpcre2-8 is only needed to compile JRI, if you don't need it, you can use --disable-jri to install rJava without JRI. If you need JRI, either compile pcre2 yourself or download it from https://mac.R-project.org/libs-4/.
Have a look at the raised issue here: https://github.com/s-u/rJava/issues/153
I'm installing R on a new laptop (no migration from a previous laptop or OS version).
R 4.0.1 installed fine.
> sessionInfo()
R version 4.0.1 (2020-06-06)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.5
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/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.0.1 tools_4.0.1
Then I move on to install data.table:
> install.packages("data.table")
trying URL 'https://cran.revolutionanalytics.com/bin/macosx/contrib/4.0/data.table_1.12.8.tgz'
Content type 'application/octet-stream' length 2070859 bytes (2.0 MB)
==================================================
downloaded 2.0 MB
The downloaded binary packages are in
/var/folders/tg/5sw17w2n28g_2n1c_cs0ydlw0000gn/T//RtmpU0QnBY/downloaded_packages
Seems fine. But when I load it:
> library(data.table)
data.table 1.12.8 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. If this is a Mac, please ensure you are using R>=3.4.0 and have followed our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/Installation. This warning message should not occur on Windows or Linux. If it does, please file a GitHub issue.
**********
I want to use multiple cores so I go to the suggested web page above and follow instructions there. I do all three steps and they all seem to work (no error messages).
install command line tools with "xcode-select --install"
install Brew and then "brew update && brew install llvm"
finally create and edit "~/.R/Makevars" as suggested.
At this point I go back and try installing data.table and compiling it with:
> install.packages("data.table", type = "source",
+ repos = "https://Rdatatable.gitlab.io/data.table")
trying URL 'https://Rdatatable.gitlab.io/data.table/src/contrib/data.table_1.12.9.tar.gz'
Content type 'application/gzip' length 5207555 bytes (5.0 MB)
==================================================
downloaded 5.0 MB
* installing *source* package ‘data.table’ ...
** using staged installation
*** pkg-config is not installed.
*** Compilation will now be attempted and if it works you can ignore this message. However,
*** if compilation fails, try 'locate zlib.h zconf.h' and ensure the zlib development library
*** is installed :
*** deb: zlib1g-dev (Debian, Ubuntu, ...)
*** rpm: zlib-devel (Fedora, EPEL, ...)
*** brew: zlib (OSX)
*** Note that zlib is required to compile R itself so you may find the advice in the R-admin
*** guide helpful regarding zlib. On Debian/Ubuntu, zlib1g-dev is a dependency of r-base as
*** shown by 'apt-cache showsrc r-base | grep ^Build-Depends | grep zlib', and therefore
*** 'sudo apt-get build-dep r-base' should be sufficient too.
*** To silence this message, please ensure that :
*** 1) 'pkg-config --exists zlib' succeeds (i.e. $? -eq 0)
*** 2) 'pkg-config --libs zlib' contains -lz
*** Compilation will now be attempted ...
** libs
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c assign.c -o assign.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c between.c -o between.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c bmerge.c -o bmerge.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c chmatch.c -o chmatch.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c cj.c -o cj.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c coalesce.c -o coalesce.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c dogroups.c -o dogroups.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fastmean.c -o fastmean.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fcast.c -o fcast.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fifelse.c -o fifelse.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fmelt.c -o fmelt.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c forder.c -o forder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frank.c -o frank.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fread.c -o fread.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c freadR.c -o freadR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c froll.c -o froll.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frollR.c -o frollR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frolladaptive.c -o frolladaptive.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fsort.c -o fsort.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwrite.c -o fwrite.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwriteR.c -o fwriteR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c gsumm.c -o gsumm.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c ijoin.c -o ijoin.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c init.c -o init.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c inrange.c -o inrange.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c nafill.c -o nafill.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c nqrecreateindices.c -o nqrecreateindices.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c openmp-utils.c -o openmp-utils.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c quickselect.c -o quickselect.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c rbindlist.c -o rbindlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c reorder.c -o reorder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c shift.c -o shift.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c snprintf.c -o snprintf.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c subset.c -o subset.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c transpose.c -o transpose.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c types.c -o types.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c uniqlist.c -o uniqlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c utils.c -o utils.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c vecseq.c -o vecseq.o
/usr/local/opt/llvm/bin/clang -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c wrappers.c -o wrappers.o
/usr/local/opt/llvm/bin/clang -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/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 ijoin.o init.o inrange.o nafill.o nqrecreateindices.o openmp-utils.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 -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.0/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 library.dynam(lib, package, package.lib):
shared object ‘datatable.so’ not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/data.table’
The downloaded source packages are in
‘/private/var/folders/tg/5sw17w2n28g_2n1c_cs0ydlw0000gn/T/RtmpU0QnBY/downloaded_packages’
Warning message:
In install.packages("data.table", type = "source", repos = "https://Rdatatable.gitlab.io/data.table") :
installation of package ‘data.table’ had non-zero exit status
Didn't work.
What does the error message mean "Error: package or namespace load failed for ‘data.table’ in library.dynam(lib, package, package.lib):
shared object ‘datatable.so’ not found" ???
Thanks for clicking in. I've been trying to solve this for hours but nothing seem to work.
My operating system: MacOS sierra OS version: 10.12.3
R version: 3.3.3
I've followed the data.table download instruction here: https://github.com/Rdatatable/data.table/wiki/Installation
But it's still not working
the error message is as below:
*> install.packages("data.table", type = "source",
+ repos = "http://Rdatatable.github.io/data.table")
嘗試 URL 'http://Rdatatable.github.io/data.table/src/contrib/data.table_1.10.5.tar.gz'
Content type 'application/octet-stream' length 2843331 bytes (2.7 MB)
==================================================
downloaded 2.7 MB
* installing *source* package ‘data.table’ ...
** libs
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c assign.c -o assign.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c between.c -o between.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c bmerge.c -o bmerge.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c chmatch.c -o chmatch.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c dogroups.c -o dogroups.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c fastmean.c -o fastmean.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c fcast.c -o fcast.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c fmelt.c -o fmelt.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c forder.c -o forder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c frank.c -o frank.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c fread.c -o fread.o
fread.c:64:19: warning: unused variable 'TypeName' [-Wunused-const-variable]
static const char TypeName[NUMTYPE][10] = {"LGL","INT","INT64","REAL","STR","NULL"}; // for messages and errors
^
1 warning generated.
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c fsort.c -o fsort.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c fwrite.c -o fwrite.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c gsumm.c -o gsumm.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c ijoin.c -o ijoin.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c init.c -o init.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c inrange.c -o inrange.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c openmp-utils.c -o openmp-utils.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c quickselect.c -o quickselect.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c rbindlist.c -o rbindlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c reorder.c -o reorder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c shift.c -o shift.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c subset.c -o subset.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c transpose.c -o transpose.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c uniqlist.c -o uniqlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c vecseq.c -o vecseq.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -Wall -mtune=core2 -g -O2 -c wrappers.c -o wrappers.o
/usr/local/opt/llvm/bin/clang -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -o data.table.so assign.o between.o bmerge.o chmatch.o dogroups.o fastmean.o fcast.o fmelt.o forder.o frank.o fread.o fsort.o fwrite.o gsumm.o ijoin.o init.o inrange.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o uniqlist.o vecseq.o wrappers.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
mv data.table.so datatable.so
if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id datatable.so datatable.so; fi
installing to /Library/Frameworks/R.framework/Versions/3.3/Resources/library/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
Error in dyn.load(file, DLLpath = DLLpath, ...) :
無法載入共享物件 '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table/libs/datatable.so' :
dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table/libs/datatable.so, 6): Library not loaded: #rpath/libomp.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table/libs/datatable.so
Reason: image not found
錯誤: loading failed
停止執行
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table’
Warning in install.packages :
installation of package ‘data.table’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/n3/4f7rv1dj4ys_1z2hwh95z79h0000gn/T/RtmplcaPNQ/downloaded_packages’*
The first is a warning about a no longer used variable as of a few days ago since you are installing the latest development version (which is fine) :
fread.c:64:19: warning: unused variable 'TypeName' [-Wunused-const-variable]
static const char TypeName[NUMTYPE][10]
That's a correct warning and I'll remove that variable.
The second is the error :
Error in dyn.load(file, DLLpath = DLLpath, ...) :
無法載入共享物件 '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table/libs/datatable.so' :
dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table/libs/datatable.so, 6):
Library not loaded: #rpath/libomp.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/data.table/libs/datatable.so
Reason: image not found
Other people are finding that too on MacOS and seem to be having some success with the solutions here using gcc instead of clang. The problems appears to be clang on MacOS, not data.table. No problems have been reported on Linux or Windows.
While installing R package rgeos, I typed the code below in R-studio:
>install.packages("rgeos")
The output shows like this:
ld: framework not found R
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rgeos.so] Error 1
ERROR: compilation failed for package ‘rgeos’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgeos’
Warning in install.packages :
installation of package ‘rgeos’ had non-zero exit status
What's wrong with clang? How to fix that?
Any advice would be appreciate!
I'm using Mac Os X Yosemite.
Upate
## Whole contents when I failed to install
configure: CC: clang
configure: CXX: clang++
configure: rgeos: 0.3-17
checking for /usr/bin/svnversion... yes
configure: svn revision: 520
checking for geos-config... /usr/local/bin/geos-config
checking geos-config usability... yes
configure: GEOS version: 3.4.2
checking geos version at least 3.2.0... yes
checking geos-config clibs... yes
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking geos: linking with libgeos_c... yes
configure: PKG_CPPFLAGS: -I/usr/local/Cellar/geos/3.4.2/include
configure: PKG_LIBS: -L/usr/local/Cellar/geos/3.4.2/lib -lgeos -L/usr/local/Cellar/geos/3.4.2/lib -lgeos_c
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c dummy.cc -o dummy.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c init.c -o init.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c local_stubs.c -o local_stubs.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos.c -o rgeos.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_R2geos.c -o rgeos_R2geos.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_R2geosMP.c -o rgeos_R2geosMP.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_bbox.c -o rgeos_bbox.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_buffer.c -o rgeos_buffer.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_coord.c -o rgeos_coord.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_geos2R.c -o rgeos_geos2R.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_misc.c -o rgeos_misc.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_poly2nb.c -o rgeos_poly2nb.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_predicate_binary.c -o rgeos_predicate_binary.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_predicate_unary.c -o rgeos_predicate_unary.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_topology.c -o rgeos_topology.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_topology_binary.c -o rgeos_topology_binary.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_validate.c -o rgeos_validate.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/Cellar/geos/3.4.2/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.2/Resources/library/sp/include" -fPIC -Wall -mtune=core2 -g -O2 -c rgeos_wkt.c -o rgeos_wkt.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o rgeos.so dummy.o init.o local_stubs.o rgeos.o rgeos_R2geos.o rgeos_R2geosMP.o rgeos_bbox.o rgeos_buffer.o rgeos_coord.o rgeos_geos2R.o rgeos_misc.o rgeos_poly2nb.o rgeos_predicate_binary.o rgeos_predicate_unary.o rgeos_topology.o rgeos_topology_binary.o rgeos_validate.o rgeos_wkt.o -L/usr/local/Cellar/geos/3.4.2/lib -lgeos -L/usr/local/Cellar/geos/3.4.2/lib -lgeos_c -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: framework not found R
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rgeos.so] Error 1
ERROR: compilation failed for package ‘rgeos’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgeos’
The downloaded source packages are in
‘/private/var/folders/wg/d26_jxbj2p9gp7nkl90q0fbm0000gn/T/Rtmp55wbAF/downloaded_packages’
Warning message:
In install.packages("rgeos", type = "source") :
installation of package ‘rgeos’ had non-zero exit status
When I install the mvtnorm package in R using package.install("mvtnorm"), I get this error:
clang -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/include -fPIC -g -O2 -c C_FORTRAN_interface.c -o C_FORTRAN_interface.o
clang -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/include -fPIC -g -O2 -c miwa.c -o miwa.o
/usr/local/bin/gfortran -fPIC -g -O2 -c mvt.f -o mvt.o
/var/folders/_0/bvqq9l5d2ngg0stvkf53jrbr0000gn/T//ccxlxy4X.s:2601:suffix or operands invalid for `movq'
/var/folders/_0/bvqq9l5d2ngg0stvkf53jrbr0000gn/T//ccxlxy4X.s:2614:suffix or operands invalid for `movq'
I suspect the problem could be with the version of clang and gfortran, so I unlinked gcc-5.3.0 and use clang-3.6.0 and gfortran 4.9.2 instead. The compiled version of gfortran is obtained from this site.
This got me further, but I still see this warning:
clang -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/include -fPIC -g -O2 -c C_FORTRAN_interface.c -o C_FORTRAN_interface.o
clang -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/include -fPIC -g -O2 -c miwa.c -o miwa.o
/usr/local/bin/gfortran -fPIC -g -O2 -c mvt.f -o mvt.o
clang -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/include -fPIC -g -O2 -c mvtnorm-init.c -o mvtnorm-init.o
/usr/local/bin/gfortran -fPIC -g -O2 -c tvpack.f -o tvpack.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/3.2.3/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/usr/local/lib -o mvtnorm.so C_FORTRAN_interface.o miwa.o mvt.o mvtnorm-init.o tvpack.o -L/usr/local/opt/gcc/lib/gcc/5/gcc/x86_64-apple-darwin14.5.0/5.3.0 -L/usr/local/opt/gcc/lib/gcc/5 -lgfortran -lquadmath -lm -F/usr/local/Cellar/r/3.2.3/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
ld: warning: could not create compact unwind for _mvkbrv_: stack subq instruction is too different from dwarf stack size
What is the best way to build R packages that requires gfortran, on homebrewed GCC on OSX 10.10 and above?