You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/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:
Older versions of JNA always report the platform as darwin when on a Mac, which our scripts assume means an x86-64 architecture. New releases of JNA will change to reporting darwin-$(arch), which will break our build scripts in the places where they check for just darwin.
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.
/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 singledarwin
platform for Macs, and that it corresponds to anx86-64
environment: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:
darwin
when on a Mac, which our scripts assume means anx86-64
architecture. New releases of JNA will change to reportingdarwin-$(arch)
, which will break our build scripts in the places where they check for justdarwin
.x64-64
executable, which the OS helpfully runs transparently in a virtualized environment.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 virtualizedx86-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:
darwin
, perhaps initially erroring out fordarwin-arm64
.if PLATFORM == "darwin-arm64"
branches in our build scripts with something that works.┆Issue is synchronized with this Jira Bug
The text was updated successfully, but these errors were encountered: