CDK-R / cdkr

Integrating R and the CDK
https://cdk-r.github.io/cdkr/
42 stars 27 forks source link

Unable to install rcdk on macOS with JDK 1.9 #56

Closed jorainer closed 6 years ago

jorainer commented 6 years ago

I've problems loading the rcdk package on macOS high sierra with JDK 1.9. The package fails to install with the error:

Error: package or namespace load failed for ‘rcdk’: .onLoad failed in loadNamespace() for 'rcdk', details: call: if (isjavagood == FALSE) { error: missing value where TRUE/FALSE needed Error: loading failed

jorainer commented 6 years ago

Reason seems to be that the jversion that is returned on my system is in the wrong format: "9+181" instead of I guess something like "9.181".

zachcp commented 6 years ago

Although this error is fixed, I am still having issues with Java9 on MacOS high Sierra. I can install and use Java/rJava just fine but despite my best efforts it still defaults to the system java. Grrrr. SO until i can fix that, I can't actually build the new version (it fails the .onload check). I

# documenting for posterity.
export CC=/usr/local/bin/gcc-7
export CXX=/usr/local/bin/g++-7 
export JAVA_HOME=$(/usr/libexec/java_home -v 9)
Rscript -e "install.packages('rJava', type='source')"

going to build with Java 8...

zachcp commented 6 years ago

Although this error is fixed, I am still having issues with Java9 on MacOS high Sierra. I can install and use Java/rJava just fine but despite my best efforts it still defaults to the system java. Grrrr. SO until i can fix that, I can't actually build the new version (it fails the .onload check). I

# documenting for posterity.

# xcode's clang runs into issues so use latter verision of C/C++ compiler from homebre
export CC=/usr/local/bin/gcc-7
export CXX=/usr/local/bin/g++-7 

# set Java home directory.
export JAVA_HOME=$(/usr/libexec/java_home -v 9)

#update R<--> Java
sudo R CMD javareconf

# reinstall java
Rscript -e "install.packages('rJava', type='source')"

going to build with Java 8...

zachcp commented 6 years ago

built and submitted with Java8