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

Update build scripts for M1 Mac support and JNA 5.8 #4178

Closed
rfk opened this issue Jun 3, 2021 · 0 comments
Closed

Update build scripts for M1 Mac support and JNA 5.8 #4178

rfk opened this issue Jun 3, 2021 · 0 comments

Comments

@rfk
Copy link
Contributor

rfk commented Jun 3, 2021

/cc @skhamis, please correct any misunderstandings I have here.

Our Gradle build scripts currently have some platform-specific logic, where we read the value of com.sun.jna.Platform and then perform platform-specific logic based on that value. Some of these assume that there is a single darwin platform for Macs, and that it corresponds to an x86-64 environment:

  • Here where we fetch some platform-specific dependencies from TaskCluster.
  • Here where we decide how to build libs for the native target.

Based on some investigations today with @skhamis, these seem to be currently working on an M1 Mac, but perhaps working accidentally though a combination of two factors:

So our gradle build scripts are incorrectly assuming that the native platform is x86-64 because we're using an out-of-date JNA, but are working anyway because we happen to be executing gradle through a virtualized x86-64 environment. That's a pretty fragile setup, that we should figure out how to improve before it becomes urgent.

Probably the right thing here is:

  • Update to the latest JNA, which reports more details about architecture.
  • Update our build scripts to split anything that checks for darwin, perhaps initially erroring out for darwin-arm64.
  • Figure out how to get a native java on the M1.
  • Do the hard work of filling in all the if PLATFORM == "darwin-arm64" branches in our build scripts with something that works.

┆Issue is synchronized with this Jira Bug

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

2 participants