Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source code project support Apple Silicon natively #2872

Open
blackberrier opened this issue Jun 10, 2021 · 6 comments
Open

Source code project support Apple Silicon natively #2872

blackberrier opened this issue Jun 10, 2021 · 6 comments

Comments

@blackberrier
Copy link

Issue Description

I am reading source code on Apple M1 device, but I get some faults. The error message indicates that Gradle is not support for M1 chips.
Gradle has support for Apple Silicon since version 7.0. Now we are using Gradle version 4.6 in the project, so I got the previous faults.

Expected Behavior

Open azkaban gradle project without error

Things todo

  1. Upgrade Gradle version to 7.0+
  2. Change old version Gradle grammar to new ones, like compile to implementation
  3. Support plugin C natively in module az-exec-util

Current progress

I have done step 1 and 2, and get stuck in step 3, with error message Invalid NativePlatform: osx_arm-v8

@yyt231
Copy link

yyt231 commented Mar 10, 2022

me too

@djaiswal83
Copy link
Member

@blackberrier we are internally using Gradle 5 and have no immediate requirement to move to Gradle 7+. However, if you are willing to upgrade to gradle 7 and contribute, I will help review the code and merge in the open source repo.

@igbanam
Copy link

igbanam commented May 3, 2022

This is legit the only place in the entire Github — as of today1 — where "osx_arm-v8" is mentioned.

I think it's a Gradle problem. But I am too new to Gradle to know where the issue is; let alone propose a fix

Footnotes

  1. The search link may have more when you check

@nick-botticelli
Copy link

nick-botticelli commented May 6, 2022

This is legit the only place in the entire Github — as of today1 — where "osx_arm-v8" is mentioned.

I think it's a Gradle problem. But I am too new to Gradle to know where the issue is; let alone propose a fix

Footnotes

  1. The search link may have more when you check

I am so confused. Why is this the only result? That search was how I found this link, and I'm not even using this project, just a barebones JNI project.

Edit:
Solved my problem (for now). This is definitely a Gradle problem since I am using JDK 17 and Gradle 7.4.2, the latest as of this post. I had to add targetPlatform "osx_x86-64" under model > components > [library](NativeLibrarySpec) { ... }, and it does build an arm64 binary when using arm64 JDK. This solution is hacky at best, and I am very disappointed that this is an issue in 2022. 3 whole Google search results for "osx_arm-v8".

@jeffsteinmetz
Copy link

I have a working branch for Apple Silicon / ARM and relevant instructions that I just pushed to this branch and opened a PR

(Note: it wasn't clear what value the "build scan" Gradle plugin was providing - and it was the only thing I couldn't get working on ARM). The builds, distribution and tests all work.

#3115

https://github.com/jeffsteinmetz/azkaban/tree/jeffs/apple-silicon-arm

@jeffsteinmetz
Copy link

@blackberrier we are internally using Gradle 5 and have no immediate requirement to move to Gradle 7+. However, if you are willing to upgrade to gradle 7 and contribute, I will help review the code and merge in the open source repo.

See PR ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants