instantiations / es_compression

Compression framework for Dart providing FFI implementations for Brotli, Lz4, Zstd (Zstandard) with ready-to-use prebuilt binaries for Win/Linux/Mac.
https://www.instantiations.com
BSD 3-Clause "New" or "Revised" License
41 stars 8 forks source link

Invalid argument(s): Failed to load dynamic library #51

Closed mgenware closed 4 months ago

mgenware commented 4 months ago

es_compression: ^2.0.12 (I've cleaned my project), seems like it's missing ARM64 macOS binaries.

ArgumentError (Invalid argument(s): Failed to load dynamic library '/Users/m/.pub-
cache/hosted/pub.dev/es_compression-2.0.12/lib/src/brotli/blobs/esbrotli-mac64.dylib': dlopen(/Users/m/.pub-
cache/hosted/pub.dev/es_compression-2.0.12/lib/src/brotli/blobs/esbrotli-mac64.dylib, 0x0001): tried: '/Users/m/.pub-
cache/hosted/pub.dev/es_compression-2.0.12/lib/src/brotli/blobs/esbrotli-mac64.dylib' (mach-o file, but is an 
incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), 
'/System/Volumes/Preboot/Cryptexes/OS/Users/m/.pub-cache/hosted/pub.dev/es_compression-
2.0.12/lib/src/brotli/blobs/esbrotli-mac64.dylib' (no such file), '/Users/m/.pub-cache/hosted/pub.dev/es_compression-
2.0.12/lib/src/brotli/blobs/esbrotli-mac64.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 
'arm64e' or 'arm64')))

flutter doctor:

[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale
    en-US)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.90.2)
[✓] Connected device (4 available)            
[✓] Network resources

Hardware: MacBook M3

sethloco commented 4 months ago

Currently the prebuilt library for Mac is Mac/Intel. When I get a Mac/Arm available and setup, I will be switching it over.

In the meantime you can compile Mac/Arm using the build script: https://github.com/instantiations/es_compression/blob/master/tool/blob_builder/CMakeLists.txt