Support for Apple Silicon M1

The new Apple Silicon Macs report the following os properties:
os.arch: aarch64 Mac mac os x
os.version: 11.0.1

this yields a javacpp.platform of “macosx-arm64” which causes maven + nd4j-native-platform to try to pull artifacts that don’t exist.

I can override this on the command-line using -Djavacpp.platform=macosx-x86_64 (and then run the app using Rosetta)…

But VSCode still reports the following errors because I’m unable to override javacpp.platform directly in my pom:
Missing artifact org.bytedeco:javacpp:jar:macosx-arm64:1.5.3
Missing artifact org.bytedeco:openblas:jar:macosx-arm64:0.3.9-1-1.5.3
Missing artifact org.nd4j:nd4j-native:jar:macosx-arm64:1.0.0-beta7

It would be great to get prebuilt jars for macosx-arm64 or at least to add a default profile activation which sets the os.arch to x86_64 when running on Apple Silicon so that we don’t get the errors in our IDEs.

This is indeed a serious issue. I expect more and more people picking up the new M1 cpu and struggle with this issue. Is this something that is at least planned?

For anyone interested, I did create a question on StackOverflow. One solution that at least makes it work is to use non M1 jdk and use that in Maven and for executing the code. Performance is not great, I get a lot of OOM that I don’t get on other machines.

Here is the link to the SO question: Apple M1 - Maven Java dependency that is not yet available for macosx-arm64 - Stack Overflow