Skip to content

Jar only contains shared library for arm64 architecture #71

Closed
@infeo

Description

@infeo

Before version 1.3.1, the shared library contained in the jar was build for x86_64 architectures.

Starting with version 1.3.1 this changed to arm64. Unfortunately, x86 macs don't have a compatiblity layer (Rosetta), hence using the lib fails on x86 macOS with

java.lang.UnsatisfiedLinkError: /private/var/folders/n7/cm88fxj16b10cywgh4z4g620mxkj11/T/lib12917120000347311018.dylib: dlopen(/private/var/folders/n7/cm88fxj16b10cywgh4z4g620mxkj11/T/lib12917120000347311018.dylib, 0x0001): tried: '/private/var/folders/n7/cm88fxj16b10cywgh4z4g620mxkj11/T/lib12917120000347311018.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/n7/cm88fxj16b10cywgh4z4g620mxkj11/T/lib12917120000347311018.dylib' (no such file), '/private/var/folders/n7/cm88fxj16b10cywgh4z4g620mxkj11/T/lib12917120000347311018.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64'))

We need to change the build target to a universal binary (aka, arch agnostic). See also https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions