From ripley at stats.ox.ac.uk  Fri Oct 27 10:36:30 2017
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 27 Oct 2017 09:36:30 +0100
Subject: [Rd] javareconf issue
In-Reply-To: <CAHpUa1Kotb15Qdhbkhbf1kSwM=TTGp89E=apzRhyj-6xrgpkbg@mail.gmail.com>
References: <CAHpUa1Kotb15Qdhbkhbf1kSwM=TTGp89E=apzRhyj-6xrgpkbg@mail.gmail.com>
Message-ID: <e6d17493-fa4d-54f7-62cd-fe009147ce0f@stats.ox.ac.uk>

On 27/10/2017 04:13, rosseji wrote:

Using a real name and a signature are regarded as polite here.

> Hi,
> 
> Wasn't able to see a bug report on this issue yet... Hope I'm not doublng
> up.

This is a problem on your system.  Also, macOS issues should be reported 
to R-sig-mac ... and you should give the 'at a minimum' information 
requested by the posting guide.

> There seems to be little info around for what "R CMD javareconf" does but
> it has some deprecation errors seemingly.

See R CMD javareconf --help , and the R-admin manual.

> 
> On running cmd in terminal:
> 
> Java interpreter : /usr/bin/java
> 
> Java version     : 9
> 
> Java home path   : /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
> 
> Java compiler    : /usr/bin/javac
> 
> Java headers gen.: /usr/bin/javah
> 
> Java archive tool: /usr/bin/jar
> 
> System Java on macOS

Try updating your R (as suggested by the posting guide): javareconf did 
not detect Java 9 on macOS until the it was released recently.  You are 
trying to use an obsolete system installation of Java (not Oracle Java).

 From the NEWS for R 3.4.2.patched (and R-devel)

     ? R CMD javareconf has been updated to recognize the use of a Java
       9 SDK on macOS.


> 
> 
> *trying to compile and link a JNI program *
> 
> *detected JNI cpp flags    :
> -I/System/Library/Frameworks/JavaVM.framework/Headers*
> 
> *detected JNI linker flags : -framework JavaVM*
> 
> *clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
> -I/System/Library/Frameworks/JavaVM.framework/Headers  -I/usr/local/include
>    -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o*
> 
> *conftest.c:4:5: warning: 'JNI_CreateJavaVM' is deprecated
> [-Wdeprecated-declarations]*
> 
> *    JNI_CreateJavaVM(0, 0, 0);*
> 
> *    ^*
> 
> */System/Library/Frameworks/JavaVM.framework/Headers/jni.h:1936:39: note:
> 'JNI_CreateJavaVM' has*
> 
> *      been explicitly marked deprecated here*
> 
> *_JNI_IMPORT_OR_EXPORT_ __attribute__((deprecated)) jint JNICALL*
> 
> *                                      ^*
> 
> *1 warning generated.*
> 
> *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
> conftest.so conftest.o -framework JavaVM
> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
> -Wl,CoreFoundation*
> 
> 
> 
> *JAVA_HOME        :
> /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home*
> 
> *Java library path: *
> 
> *JNI cpp flags    : -I/System/Library/Frameworks/JavaVM.framework/Headers*
> 
> *JNI linker flags : -framework JavaVM*
> 
> *Updating Java configuration in /Library/Frameworks/R.framework/Resources*
> 
> *Done.*
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



[Rd] javareconf issue
Prof Brian Ripley