Skip to content

libwhisper.dylib on Mac M4 Max cannot be loaded #386

@attilah

Description

@attilah

Describe the bug
From a clean build trying to run the coreml example and fails with the same error when tried my example app, cannot load libwhisper.dylib. Other libs were loaded before it from the package, only this one seems to be failed.

To Reproduce
Steps to reproduce the behavior:

  1. git clone whisper.net repo
  2. make apple_coreml_arm
  3. cd examples/CoreML
  4. dotnet run --framework net9.0

Expected behavior
Example should run

Desktop / Servers (please complete the following information):

  • OS Version: macos 15.4.1
  • Whisper Version latest submodule
  • Runtime Whisper.net.Runtime.CoreML
  • GPU Driver version: N/A

Error message

Debug: Failed to load whisper library from <path>/whisper.net/examples/CoreML/bin/Debug/net9.0/runtimes/coreml/macos-arm64/libwhisper.dylib. 
Error: Cannot load the library on this platform using NativeLibrary. PInvokeError: Undefined error: 0
Unhandled exception. System.Exception: Failed to load native whisper library. Error: Cannot load the library on this platform using NativeLibrary. PInvokeError: Undefined error: 0

The strange thing is that the get last error returns 0 which is usually a non-error, perhaps it is a library loader bug and not a binary issue?

I've checked the binary and it is correct MachO arm64.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions