Skip to content

.jinit() fails on Apple silicon with hardened run-time #267

@ablaette

Description

@ablaette

Thank you so much for rJava! The new Apple M1 chip is great, yet it is a challenge... I am sure you have seen already that the current rJava release (v1.0-4) does not pass CRAN checks: https://cran.r-project.org/web/checks/check_results_rJava.html

On my local Mac mini the error I get is as follows

library(rJava)
.jinit()

zsh: trace trap R

So the R session crashes entirely. I have tried with different versions of JDK (the Azul Zulu Builds), but the Java version does not make a difference.

Looking inside .jinit(), I can reconstruct this scenario for the R crash:

parameters <- getOption("java.parameters")
boot.classpath <- file.path(rJava:::.rJava.base.path, "java", "boot")
.External(rJava:::RinitJVM, boot.classpath, parameters)

I have also tried to install older versions of rJava, but the framework JavaVM is apparently missing from the latest versions of Xcode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions