openrndr / orx

A growing library of assorted data structures, algorithms and utilities for OPENRNDR
https://openrndr.org
BSD 2-Clause "Simplified" License
121 stars 37 forks source link

Change arm64 to aarch64 #274

Closed Vechro closed 1 year ago

Vechro commented 2 years ago

It needs to be verified whether this fix is actually necessary. This can be done by building the project on Linux/MacOS with ARM64 architecture.

edwinRNDR commented 2 years ago

Let's ask someone with access to such hardware. @morisil could you have a look?

anoniim commented 2 years ago

I am trying to build the template project on M1 and am getting an error which looks like this change should fix: https://openrndr.discourse.group/t/running-on-apple-m1/324/23?u=anoniim

However, I'm getting the same issue even after building orx from this branch and using that in the template project.

Vechro commented 1 year ago

This might be an issue with openrndr-template itself. Can you open up your build.gradle.kts and change the line https://github.com/openrndr/openrndr-template/blob/master/build.gradle.kts#L222 to "aarch64" -> "macos-arm64" and report back?

anoniim commented 1 year ago

Yes, that helped! It resolved the issue for me and the template project now runs fine even with v0.4.1 of orx. I was gonna create a PR but noticed you've already created one :) Thank you!

Is there any other test you want me to perform on M1 regarding this change?

Vechro commented 1 year ago

Glad to hear it. Well, I am curious to know about cases where the os.arch property on macOS M1 reports "arm-v8". It's there in openrndr-template because it's supposedly worked in the past. One theory is that it might be dependent on the JDK distribution that you're using (in this case the JDK you've set up for running Gradle). I'm not really interested in supporting "arm-v8" for the template/orx on macOS unless I actually see a notable JDK distribution still returning that value. If you ever happen to come across it, let us know.

anoniim commented 1 year ago

I use Azul Zulu builds of OpenJDK and have 13 and 16 installed:

Tried building orx with both and it worked fine. Will shout out if I come across a problem with another JDK.

Vechro commented 1 year ago

Can you run the following line in a build.gradle.kts file and tell me what it prints out?

println("My arch is: ${DefaultNativePlatform.getCurrentArchitecture().name}")
anoniim commented 1 year ago

Sorry, missed this message, need to setup notifications.

DefaultNativePlatform.getCurrentArchitecture().name prints aarch64 on my system.