Skip to content

Error loading libdartcv.dylib on macos #358

Open
@pcrady

Description

@pcrady

Describe the bug
On m3 macos I cant find libdartcv.dylib.

(base) petercrady@pcrady-osx example % flutter run -d macos

Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006031-001A30C92E80011C, name:My Mac }
{ platform:macOS, arch:x86_64, id:00006031-001A30C92E80011C, name:My Mac }
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'DartCvMacOS' from project 'Pods')
Building macOS application...                                           
✓ Built build/macos/Build/Products/Debug/opencv_dart_example.app
flutter: Error loading libdartcv.dylib, error: Invalid argument(s): Failed to load dynamic library 'libdartcv.dylib': dlopen(libdartcv.dylib, 0x0001): tried: 'libdartcv.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibdartcv.dylib' (no such file), '/Users/petercrady/StudioProjects/opencv_dart/packages/opencv_dart/example/build/macos/Build/Products/Debug/opencv_dart_example.app/Contents/Frameworks/FlutterMacOS.framework/Versions/A/./libdartcv.dylib' (no such file), '/usr/local/lib/./libdartcv.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/./libdartcv.dylib' (no such file), '/Users/petercrady/StudioProjects/opencv_dart/packages/opencv_dart/example/build/macos/Build/Products/Debug/opencv_dart_example.app/Contents/Frameworks/FlutterMacOS.framework/Versions/A/../../../libdartcv.dylib' (no such file), '/Users/petercrady/StudioProjects/opencv_dart/packages/opencv_dart/example/build/macos/Build/Products/Debug/opencv_dart_example.app/Contents/MacOS/libdartcv.dylib' (no such file), '/usr/lib/swift/libdartcv.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/libdartcv.dylib' (no such file), '/Users/petercrady/StudioProjects/opencv_dart/packages/opencv_dart/example/build/macos/Build/Products/Debug/opencv_dart_example.app/Contents/Frameworks/libdartcv.dylib' (no such file), '/Users/petercrady/StudioProjects/opencv_dart/packages/opencv_dart/example/build/macos/Build/Products/Debug/opencv_dart_example.app/Contents/MacOS/Frameworks/libdartcv.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libdartcv.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libdartcv.dylib' (no such file), '/usr/lib/libdartcv.dylib' (no such file, not in dyld cache), 'libdartcv.dylib' (no such file)
fallback to process.
Syncing files to device macOS...                                    26ms

This is for the example project:

/Users/petercrady/StudioProjects/opencv_dart/packages/opencv_dart/example
(base) petercrady@pcrady-osx example % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.32.0, on macOS 15.5 24F74 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 16.3)
    ! CocoaPods 1.15.2 out of date (1.16.2 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.97.2)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 1 category.

To Reproduce
Try to run the example project on an M series mac.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions