rJava on macOS High Sierra 10.13.6

Hello everyone,
I am having a hard time installing rJava. I ultimately need it have XLConnect working.
I am getting this message:

  • installing source package ‘rJava’ ...
    ** package ‘rJava’ successfully unpacked and MD5 sums checked
    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/wait.h that is POSIX.1 compatible... 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 for string.h... (cached) yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking for unistd.h... (cached) yes
    checking for an ANSI C-conforming const... yes
    checking whether time.h and sys/time.h may both be included... yes
    configure: checking whether clang supports static inline...
    yes
    checking whether setjmp.h is POSIX.1 compatible... yes
    checking whether sigsetjmp is declared... yes
    checking whether siglongjmp is declared... yes
    checking Java support in R... present:
    interpreter : '/usr/bin/java'
    archiver : '/usr/bin/jar'
    compiler : '/usr/bin/javac'
    header prep.: '/usr/bin/javah'
    cpp flags : '-I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin'
    java libs : '-L/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/lib/server -ljvm'
    checking whether Java run-time works... yes
    checking whether -Xrs is supported... yes
    checking whether -Xrs will be used... yes
    checking whether JVM will be loaded dynamically... yes
    checking whether JNI programs can be compiled... yes
    checking whether JNI programs run... yes
    checking JNI data types... ok
    checking whether JRI should be compiled (autodetect)... yes
    checking whether debugging output should be enabled... no
    checking whether memory profiling is desired... no
    checking whether threads support is requested... no
    checking whether callbacks support is requested... no
    checking whether JNI cache support is requested... no
    checking whether headless init is enabled... yes
    checking whether JRI is requested... yes
    configure: creating ./config.status
    config.status: creating src/Makevars
    config.status: creating R/zzz.R
    config.status: creating src/config.h
    === configuring in jri (/private/var/folders/8m/617xlrcj053368dr3bvh855h007vyb/T/RtmpgFkbZD/R.INSTALL175da7feb9f25/rJava/jri)
    configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=.
    checking build system type... x86_64-apple-darwin17.7.0
    checking host system type... x86_64-apple-darwin17.7.0
    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 Java version... 14
    checking Java compatibility version (integer)... 14
    checking whether /usr/bin/javah actually works... no
    checking whether javah was replaced by javac -h... yes
    checking for target flags... -h . -target 1.8 -source 1.8
    checking whether Java interpreter works... checking whether JNI programs can be compiled... yes
    checking whether JNI programs can be run... yes
    checking JNI data types... ok
    checking whether Rinterface.h exports R_CStackXXX variables... yes
    checking whether Rinterface.h exports R_SignalHandlers... yes
    configure: creating ./config.status
    config.status: creating src/Makefile
    config.status: creating Makefile
    config.status: creating run
    config.status: creating src/config.h
    ** libs
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c Rglue.c -o Rglue.o
    Rglue.c:872:13: warning: unused function 'new_jrectRef' [-Wunused-function]
    static SEXP new_jrectRef(JNIEnv *env, jobject a, const char *sig, SEXP dim ) {
    ^
    1 warning generated.
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c arrayc.c -o arrayc.o
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c callJNI.c -o callJNI.o
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c callback.c -o callback.o
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c fields.c -o fields.o
    fields.c:105:11: warning: unused variable 'c' [-Wunused-variable]
    char *c = clnam;
    ^
    1 warning generated.
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c init.c -o init.o
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c jri_glue.c -o jri_glue.o
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c loader.c -o loader.o
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c otables.c -o otables.o
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c rJava.c -o rJava.o
    clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/usr/local/include -fPIC -Wall -g -O2 -c tools.c -o tools.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 rJava.so Rglue.o arrayc.o callJNI.o callback.o fields.o init.o jri_glue.o loader.o otables.o rJava.o tools.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
    ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
    (cd ../jri && make)
    make -C src JRI.jar
    /usr/bin/javac -h . -target 1.8 -source 1.8 -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 8
    ../Rengine.java:120: warning: 'yield' may become a restricted identifier in a future release
    while (!alive && !died) yield();
    ^
    (to invoke a method called yield, qualify the yield with a receiver or type name)
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    2 warnings
    if [ -n "" ]; then -d . -classpath . org.rosuda.JRI.Rengine; fi
    clang -c -o Rengine.o Rengine.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include
    clang -c -o jri.o jri.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include
    clang -c -o Rcallbacks.o Rcallbacks.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include
    clang -c -o Rinit.o Rinit.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -fno-common -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include
    clang -c -o globals.o globals.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin
    clang -c -o rjava.o rjava.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -Wall -g -O2 -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin -fno-common -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/include/darwin
    clang -o libjri.jnilib Rengine.o jri.o Rcallbacks.o Rinit.o globals.o rjava.o -dynamiclib -framework JavaVM -fopenmp -L/usr/local/lib -F/Library/Frameworks/R.framework/.. -framework R -lpcre -llzma -lbz2 -lz -licucore -lm -liconv
    clang: error: unsupported option '-fopenmp'
    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/3.5/Resources/library/rJava’
    Warning in install.packages :
    installation of package ‘rJava’ had non-zero exit status
    ERROR: dependency ‘rJava’ is not available for package ‘XLConnect’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/XLConnect’
    Warning in install.packages :
    installation of package ‘XLConnect’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/8m/617xlrcj053368dr3bvh855h007vyb/T/RtmpPRhgLg/downloaded_packages’

source('~/.active-rstudio-document', echo=TRUE)
Error in source("~/.active-rstudio-document", echo = TRUE) :
~/.active-rstudio-document:1:30: unexpected symbol

Any help, really appreciated!
Cheers and stay Corona free!

Try installing rJava first, separately. If it tells you that a binary version exists, but the source version is later and asks if you want to install from source, choose "n".

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.