Skip to content

Platform.RESOURCE_PREFIX on Darwin x64 and M1 #1313

@phxql

Description

@phxql
  • Version of JNA and related jars: 5.7.0
  • Version and vendor of the java virtual machine: OpenJDK 11
  • Operating system: OSX
  • System architecture (CPU type, bitness of the JVM): x64 and M1 aarch64

Hello! I maintain argon2-jvm, which includes a compiled argon2 library in the JAR for different operating systems (windows x86 & x64, linux x86, x64, arm, aarch64, etc.).

I now want to support both x64 macs and M1 macs. But there's a problem: Platform.RESOURCE_PREFIX returns darwin on both x64 and M1 architecture. It doesn't include the architecture, and it prevents me from supporting both the M1 and x64 macs at the same time when using the "extract library from classpath feature".

I expected the resource prefix to be something like darwin-aarch64. The argon2 lib for OSX x64 is stored in darwin subfolder, i can't put the M1 version in the same folder, as it would overwrite the x64 one.

See phxql/argon2-jvm#78

Is there any workaround for this?

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions